Merge "Corrected comment on when BT is not disabled on entering airplane mode." am: 2a1dc3a8e9 am: fcfa8b5345 am: 34ff50af3b

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1916077

Change-Id: Id251ef11d17031fecdfd465cec67d4391faaf721
This commit is contained in:
Himanshu Rawat
2021-12-10 09:00:28 +00:00
committed by Automerger Merge Worker

View File

@@ -112,9 +112,9 @@ class BluetoothAirplaneModeListener {
void handleAirplaneModeChange() { void handleAirplaneModeChange() {
if (shouldSkipAirplaneModeChange()) { if (shouldSkipAirplaneModeChange()) {
Log.i(TAG, "Ignore airplane mode change"); Log.i(TAG, "Ignore airplane mode change");
// We have to store Bluetooth state here, so if user turns off Bluetooth // Airplane mode enabled when Bluetooth is being used for audio/headering aid.
// after airplane mode is turned on, we don't forget to turn on Bluetooth // Bluetooth is not disabled in such case, only state is changed to
// when airplane mode turns off. // BLUETOOTH_ON_AIRPLANE mode.
mAirplaneHelper.setSettingsInt(Settings.Global.BLUETOOTH_ON, mAirplaneHelper.setSettingsInt(Settings.Global.BLUETOOTH_ON,
BluetoothManagerService.BLUETOOTH_ON_AIRPLANE); BluetoothManagerService.BLUETOOTH_ON_AIRPLANE);
if (shouldPopToast()) { if (shouldPopToast()) {