summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornxf56319 <sai.shwethas@nxp.com>2021-05-31 17:35:34 +0530
committernxf35421 <sangeetha.agarwal@nxp.com>2021-07-02 11:16:42 +0530
commitec9381d17bfbd20b7df2b1a8849eb0915eca41af (patch)
tree33c214e73377049666bb58f6c8a0319a692cf3c1
parentd2d0f7bff9b8154cb14fc3aab7466f803be38247 (diff)
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
-rwxr-xr-xsrc/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 99a14f5..059607d 100755
--- a/src/com/android/se/Terminal.java
+++ b/src/com/android/se/Terminal.java
@@ -763,18 +763,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);