summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Chang <georgekgchang@google.com>2021-04-14 15:28:59 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-14 15:28:59 +0000
commita8e168dc77cc7703058a8504d8c9745454d876fd (patch)
treed6e94aeee7118843aed94a6ab2e74ed4139b0524
parent171b624c02f5d2618c3cc741b612f85f5721fc04 (diff)
parente8b9e101708b578c869e5ff6dbcaf58df11b63c5 (diff)
downloadSecureElement-a8e168dc77cc7703058a8504d8c9745454d876fd.tar.gz
Improve isNfcEventAllowed am: cba6328078 am: e8b9e10170
Original change: https://android-review.googlesource.com/c/platform/packages/apps/SecureElement/+/1673187 Change-Id: I868489737a52d48fe458d1bc794a9e409f980303
-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) {