summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Yu <jackcwyu@google.com>2021-04-29 15:59:12 +0800
committerJack Yu <jackcwyu@google.com>2021-04-29 08:08:19 +0000
commit8ca26b9e6c7381ac51c3bfe4d774b5d61b1b30c3 (patch)
treec99f60c94ffcda4bd5a95acb02b4a0f5cc8528a8
parentcba6328078700b0d3adc92c8a95da9337718597a (diff)
downloadSecureElement-8ca26b9e6c7381ac51c3bfe4d774b5d61b1b30c3.tar.gz
Do not try to initialze the access control enforcer in NFC APIandroid-s-beta-2android-s-beta-1
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
-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 139390b..d97dd2f 100644
--- a/src/com/android/se/Terminal.java
+++ b/src/com/android/se/Terminal.java
@@ -688,18 +688,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);