summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasatoshi Akasaka <masatoshi.akasaka@sony.com>2018-03-08 19:46:35 +0900
committerRuchi Kandoi <kandoiruchi@google.com>2018-03-09 14:19:35 -0800
commit9b663698599d91154ec74adcd7424af79817c156 (patch)
treed575382321d7e98437f31ccc4a941fdfc7fd71b3
parent5091d61f6760b87dc00d48040fad9da6509a522b (diff)
downloadSecureElement-9b663698599d91154ec74adcd7424af79817c156.tar.gz
Missing MissingResourceException
If the terminal cannot get available logical channel when attempting to check ARF, MissingResourceException shall be propagated to the upper layer. It shall not be ignored. Bug: 74094532 Test: Confirmed that MissingResourceException is expectedly propagated. Change-Id: I744e613c9fb2d7c154fbd497895a3c207d4843f1
-rw-r--r--src/com/android/se/security/arf/SecureElement.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/se/security/arf/SecureElement.java b/src/com/android/se/security/arf/SecureElement.java
index 99f490c..f3accc0 100644
--- a/src/com/android/se/security/arf/SecureElement.java
+++ b/src/com/android/se/security/arf/SecureElement.java
@@ -100,7 +100,8 @@ public class SecureElement {
* @param aid Applet identifier
* @return Handle to "Logical Channel" allocated by the SE; <code>0</code> if error occurred
*/
- public Channel openLogicalArfChannel(byte[] aid) throws IOException, NoSuchElementException {
+ public Channel openLogicalArfChannel(byte[] aid) throws IOException, MissingResourceException,
+ NoSuchElementException {
try {
mArfChannel = mTerminalHandle.openLogicalChannelWithoutChannelAccess(aid);
if (mArfChannel == null) {
@@ -110,6 +111,8 @@ public class SecureElement {
return mArfChannel;
} catch (IOException e) {
throw e;
+ } catch (MissingResourceException e) {
+ throw e;
} catch (NoSuchElementException e) {
throw e;
} catch (Exception e) {