diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-09-01 13:38:34 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-09-01 13:38:34 +0000 |
commit | 807efaf718b5c2ff4a9ed63a947edf64e361d72b (patch) | |
tree | 3e5190cb220c9ed298de3874b11a0579ddf9d5c0 | |
parent | 97887f8c54c972ba4d0b38f5a46b041e300488b4 (diff) | |
parent | b623b8c3e3f128bb6a5b7534c2961334f9838ac0 (diff) | |
download | Nfc-android13-qpr3-c-s11-release.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/23518589'] into tm-qpr3-c-release.android-13.0.0_r82android-13.0.0_r81android-13.0.0_r80android13-qpr3-c-s12-releaseandroid13-qpr3-c-s11-releaseandroid13-qpr3-c-s10-release
Change-Id: I650cf00d5176c38ab2521e725d8da6251742312d
-rw-r--r-- | src/com/android/nfc/NfcService.java | 6 | ||||
-rw-r--r-- | src/com/android/nfc/cardemulation/HostEmulationManager.java | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index 7e99b8b9..edbdda91 100644 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -1166,6 +1166,12 @@ public class NfcService implements DeviceHostListener { } } + public boolean isSecureNfcEnabled() { + synchronized (NfcService.this) { + return mIsSecureNfcEnabled; + } + } + final class NfcAdapterService extends INfcAdapter.Stub { @Override public boolean enable() throws RemoteException { diff --git a/src/com/android/nfc/cardemulation/HostEmulationManager.java b/src/com/android/nfc/cardemulation/HostEmulationManager.java index 81462024..8849cca5 100644 --- a/src/com/android/nfc/cardemulation/HostEmulationManager.java +++ b/src/com/android/nfc/cardemulation/HostEmulationManager.java @@ -188,7 +188,9 @@ public class HostEmulationManager { // Resolve to default // Check if resolvedService requires unlock ApduServiceInfo defaultServiceInfo = resolveInfo.defaultService; - if (defaultServiceInfo.requiresUnlock() && mKeyguard.isKeyguardLocked()) { + if ((defaultServiceInfo.requiresUnlock() + || NfcService.getInstance().isSecureNfcEnabled()) + && mKeyguard.isKeyguardLocked()) { NfcService.getInstance().sendRequireUnlockIntent(); NfcService.getInstance().sendData(AID_NOT_FOUND); if (DBG) Log.d(TAG, "requiresUnlock()! show toast"); |