summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-02 00:25:46 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-02 00:25:46 +0000
commitda6f5e99bb95f524c548f9a510b1ec46c041fd02 (patch)
treeac1afb17d586c9bbbed3c4853e3430a1a166e3b1
parentc8951e773c6a41a1ffa16a99ece9d0fe06019802 (diff)
parent533a1594b41e6404ab69de56cde31b778ab8c13e (diff)
downloadNfc-android13-d4-release.tar.gz
Change-Id: If7a16aa71f90ced8d636d30458a5a03a56c0680a
-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);
}
}