summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Chang <georgekgchang@google.com>2021-04-14 16:54:50 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-14 16:54:50 +0000
commitd95acaf5aa9e542e2b410d44f15964a97966c4a3 (patch)
tree9a4ea21037a00a65f99c5fd26c011ea597810c52
parent8b9ff302c98b14a749513b8ce2e8499873ef51ec (diff)
parent1b93ebc5b07fc90f670da24a29c47e7b2f0b505f (diff)
downloadSecureElement-d95acaf5aa9e542e2b410d44f15964a97966c4a3.tar.gz
Improve isNfcEventAllowed am: cba6328078 am: e8b9e10170 am: a8e168dc77 am: 1b93ebc5b0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/SecureElement/+/1673187 Change-Id: I8340d8be7321dc46682e78d1b27a76a407660a6e
-rw-r--r--src/com/android/se/Terminal.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/se/Terminal.java b/src/com/android/se/Terminal.java
index d858426..139390b 100644
--- a/src/com/android/se/Terminal.java
+++ b/src/com/android/se/Terminal.java
@@ -684,11 +684,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) {