summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-02 00:26:18 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-02 00:26:18 +0000
commitebf3e42dfe4718be47946b1692953373281e33d0 (patch)
treeac1afb17d586c9bbbed3c4853e3430a1a166e3b1
parentf3a1427629a4703e0a5460a5c85453bc408b0ca8 (diff)
parent533a1594b41e6404ab69de56cde31b778ab8c13e (diff)
Snap for 9358956 from 533a1594b41e6404ab69de56cde31b778ab8c13e to tm-qpr2-release
Change-Id: I375f99e467063fa211873144dd06a8371798c200
-rw-r--r--src/com/android/nfc/NfcService.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index cb094fc2..c5094be2 100644
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -1045,17 +1045,12 @@ public class NfcService implements DeviceHostListener {
updateAlwaysOnState(NfcAdapter.STATE_OFF);
} else if (mState == NfcAdapter.STATE_OFF) {
/* Special case when mState is OFF but NFCC is already initialized.
- * Temperatorily enable NfcAdapter without initialize NFCC and applyRouting.
- * And disable NfcAdapter normally with deinitialize.
- * All state will switch back to OFF in the end.
+ * Deinitialize mDevicehost directly.
*/
updateAlwaysOnState(NfcAdapter.STATE_TURNING_OFF);
mDeviceHost.setNfceePowerAndLinkCtrl(false);
- if (!enableInternal()) {
- updateAlwaysOnState(NfcAdapter.STATE_OFF);
- return;
- }
- disableInternal();
+ boolean result = mDeviceHost.deinitialize();
+ if (DBG) Log.d(TAG, "mDeviceHost.deinitialize() = " + result);
updateAlwaysOnState(NfcAdapter.STATE_OFF);
}
}