Skip to content

Commit 79d8493

Browse files
Matthew XieAndroid (Google) Code Review
authored andcommitted
Merge "Set Bluetooth adapter to PowerOff mode when turnoff with airplane on" into ics-mr1
2 parents a618eeb + f3171fb commit 79d8493

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/java/android/server/BluetoothAdapterStateMachine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public boolean processMessage(Message message) {
528528
}
529529

530530
// we turn all the way to PowerOff with AIRPLANE_MODE_ON
531-
if (message.what == AIRPLANE_MODE_ON) {
531+
if (message.what == AIRPLANE_MODE_ON || mBluetoothService.isAirplaneModeOn()) {
532532
// We inform all the per process callbacks
533533
allProcessesCallback(false);
534534
deferMessage(obtainMessage(AIRPLANE_MODE_ON));

core/java/android/server/BluetoothService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ private void registerForAirplaneMode(IntentFilter filter) {
17061706
}
17071707

17081708
/* Returns true if airplane mode is currently on */
1709-
private final boolean isAirplaneModeOn() {
1709+
/*package*/ final boolean isAirplaneModeOn() {
17101710
return Settings.System.getInt(mContext.getContentResolver(),
17111711
Settings.System.AIRPLANE_MODE_ON, 0) == 1;
17121712
}

0 commit comments

Comments
 (0)