summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-04-10 13:16:11 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-10 13:16:11 +0000
commitf7b1a2fa162a14c937e242303426db610890a251 (patch)
treedbd8127028fe96a8b589a76530730534ff4c3a20
parent9deb58fe7a395ae9d9f956c723781de54bf5b637 (diff)
parentc5828a7af7877048b54b90d101d69fd7472140d2 (diff)
downloadNfc-f7b1a2fa162a14c937e242303426db610890a251.tar.gz
Merge "Update mAlwaysOnState during a recovery procedure." into main
-rw-r--r--src/com/android/nfc/NfcService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 7ce8860d..ca6971fe 100644
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -1126,6 +1126,10 @@ public class NfcService implements DeviceHostListener, ForegroundUtils.Callback
if (!mIsAlwaysOnSupported || mIsRecovering
|| (mAlwaysOnState != NfcAdapter.STATE_ON
&& mAlwaysOnState != NfcAdapter.STATE_TURNING_OFF)) {
+ if (mIsRecovering) {
+ // Recovering needs the full init. Put default value
+ mAlwaysOnState = NfcAdapter.STATE_OFF;
+ }
if (!mDeviceHost.initialize()) {
Log.w(TAG, "Error enabling NFC");
updateState(NfcAdapter.STATE_OFF);