diff options
author | nxf56319 <sai.shwethas@nxp.com> | 2021-05-26 21:57:38 +0530 |
---|---|---|
committer | nxf35421 <sangeetha.agarwal@nxp.com> | 2021-07-02 11:16:42 +0530 |
commit | d2d0f7bff9b8154cb14fc3aab7466f803be38247 (patch) | |
tree | 995afb0019bebef9f00ef6997015b307eb96c584 | |
parent | 0b87a5eb441379f3d3606e6973949c195b6bcc49 (diff) |
Improve isNfcEventAllowed
Return when SE is not connected
Bug: 185198557
Test: manual
Change-Id: I0c90862585f311bc6695235e316023aeceb9df7a
-rwxr-xr-x | src/com/android/se/Terminal.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/se/Terminal.java b/src/com/android/se/Terminal.java index d268da2..99a14f5 100755 --- a/src/com/android/se/Terminal.java +++ b/src/com/android/se/Terminal.java @@ -759,11 +759,16 @@ public class Terminal { */ public boolean[] isNfcEventAllowed(PackageManager packageManager, byte[] aid, String[] packageNames) { + if (!mIsConnected) { + // 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. 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) { |