summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Yu <jackcwyu@google.com>2021-04-29 15:59:12 +0800
committeralk3pInjection <webmaster@raspii.tech>2021-09-14 11:26:25 +0800
commit734b7eb48b7deb06c45370a6120ca5487ce6dedd (patch)
tree1a61ccf03e8e85f01bc2d38f4e5665ab0c7ec209
parentb299711dd053a468d7f9aa5677a45593ad576ae0 (diff)
SecureElement: Do not try to initialze the access control enforcer in NFC API
If there is temporary failures in access rules retrieval, Secure Element service should handle the re-initialization. NFC transactions usually need to be completed in short time and should not wait for the access control enforcer re-initialization. Bug: 186588474 Test: HCE test in CtsVerifier Change-Id: I6e6dd8c05622ff67f6b75a8a93d0db0d35bc7056 (cherry picked from commit 8ca26b9e6c7381ac51c3bfe4d774b5d61b1b30c3)
-rw-r--r--src/com/android/se/Terminal.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/com/android/se/Terminal.java b/src/com/android/se/Terminal.java
index d8033ed..3be9749 100644
--- a/src/com/android/se/Terminal.java
+++ b/src/com/android/se/Terminal.java
@@ -674,18 +674,10 @@ public class Terminal {
// Return if not connected
return null;
}
- // Attempt to initialize the access control enforcer if it failed in the previous attempt
- // due to a kind of temporary failure or no rule was found.
+ // Return if the access control enforcer failed in previous attempt or no rule was found.
if (mAccessControlEnforcer == null || mAccessControlEnforcer.isNoRuleFound()) {
- try {
- initializeAccessControl();
- Log.i(mTag, "AccessControlEnforcer initialized");
- // Just finished to initialize the access control enforcer.
- // It is too much to check the refresh tag in this case.
- } catch (Exception e) {
- Log.i(mTag, "isNfcEventAllowed Exception: " + e.getMessage());
- return null;
- }
+ Log.i(mTag, "isNfcEventAllowed: No access rules for checking.");
+ return null;
}
mAccessControlEnforcer.setPackageManager(packageManager);