After reboot with airplane mode and BT enabled, keep BT enabled.

Enabling airplane mode disables Wi-Fi and Bluetooth as well as the
cell radio. Bluetooth and Wi-Fi can then be reenabled if desired.
After a reboot, Bluetooth was always disabled if airplane mode
was enabled. Changed to set Bluetooth to its previous state after
reboot, regardless of the airplane mode setting. This is already
the behavior for Wi-Fi after a reboot.

Bug: 5623624
Change-Id: I1c44500221aa0e5d1d7a5c9046d6c1380d28b5c0
This commit is contained in:
Jake Hamby
2012-04-23 16:15:42 -07:00
parent 003952ba33
commit 9341f389db

View File

@@ -251,11 +251,9 @@ class ServerThread extends Thread {
bluetooth.initAfterA2dpRegistration();
}
int airplaneModeOn = Settings.System.getInt(mContentResolver,
Settings.System.AIRPLANE_MODE_ON, 0);
int bluetoothOn = Settings.Secure.getInt(mContentResolver,
Settings.Secure.BLUETOOTH_ON, 0);
if (airplaneModeOn == 0 && bluetoothOn != 0) {
if (bluetoothOn != 0) {
bluetooth.enable();
}
}