From 9341f389dbad2df1a30dabfbada8e3a92a4a39f3 Mon Sep 17 00:00:00 2001 From: Jake Hamby Date: Mon, 23 Apr 2012 16:15:42 -0700 Subject: 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 --- services/java/com/android/server/SystemServer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 729c3f3..d68a1ef 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -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(); } } -- cgit v1.1