diff options
| author | Matthew Xie <mattx@google.com> | 2011-12-05 20:00:46 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-12-05 20:00:46 -0800 |
| commit | 2016055a97ead396af84792480303ba9c4619a9d (patch) | |
| tree | 6106406017f670c3f5a3fe719b2bac2af37497ba /core/java/android/server/BluetoothAdapterStateMachine.java | |
| parent | deb86c63c33f766b1a7fd6916f56b757d40803b1 (diff) | |
| parent | 12479141dd3e63a5f26a4509d0922c9ef9e3d78c (diff) | |
| download | frameworks_base-2016055a97ead396af84792480303ba9c4619a9d.zip frameworks_base-2016055a97ead396af84792480303ba9c4619a9d.tar.gz frameworks_base-2016055a97ead396af84792480303ba9c4619a9d.tar.bz2 | |
am 12479141: am 0d9a41e7: Merge "Broadcast turning on/off intent as early as possible when switch on/off BT" into ics-mr1
* commit '12479141dd3e63a5f26a4509d0922c9ef9e3d78c':
Broadcast turning on/off intent as early as possible when switch on/off BT
Diffstat (limited to 'core/java/android/server/BluetoothAdapterStateMachine.java')
| -rw-r--r-- | core/java/android/server/BluetoothAdapterStateMachine.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/server/BluetoothAdapterStateMachine.java b/core/java/android/server/BluetoothAdapterStateMachine.java index c59a05a..f4a390e 100644 --- a/core/java/android/server/BluetoothAdapterStateMachine.java +++ b/core/java/android/server/BluetoothAdapterStateMachine.java @@ -186,8 +186,8 @@ final class BluetoothAdapterStateMachine extends StateMachine { switch(message.what) { case USER_TURN_ON: // starts turning on BT module, broadcast this out - transitionTo(mWarmUp); broadcastState(BluetoothAdapter.STATE_TURNING_ON); + transitionTo(mWarmUp); if (prepareBluetooth()) { // this is user request, save the setting if ((Boolean) message.obj) { @@ -209,8 +209,8 @@ final class BluetoothAdapterStateMachine extends StateMachine { case AIRPLANE_MODE_OFF: if (getBluetoothPersistedSetting()) { // starts turning on BT module, broadcast this out - transitionTo(mWarmUp); broadcastState(BluetoothAdapter.STATE_TURNING_ON); + transitionTo(mWarmUp); if (prepareBluetooth()) { // We will continue turn the BT on all the way to the BluetoothOn state deferMessage(obtainMessage(TURN_ON_CONTINUE)); @@ -366,9 +366,9 @@ final class BluetoothAdapterStateMachine extends StateMachine { // let it fall to TURN_ON_CONTINUE: //$FALL-THROUGH$ case TURN_ON_CONTINUE: + broadcastState(BluetoothAdapter.STATE_TURNING_ON); mBluetoothService.switchConnectable(true); transitionTo(mSwitching); - broadcastState(BluetoothAdapter.STATE_TURNING_ON); break; case AIRPLANE_MODE_ON: case TURN_COLD: @@ -378,9 +378,9 @@ final class BluetoothAdapterStateMachine extends StateMachine { break; case AIRPLANE_MODE_OFF: if (getBluetoothPersistedSetting()) { + broadcastState(BluetoothAdapter.STATE_TURNING_ON); transitionTo(mSwitching); mBluetoothService.switchConnectable(true); - broadcastState(BluetoothAdapter.STATE_TURNING_ON); } break; case PER_PROCESS_TURN_ON: @@ -526,8 +526,8 @@ final class BluetoothAdapterStateMachine extends StateMachine { } //$FALL-THROUGH$ to AIRPLANE_MODE_ON case AIRPLANE_MODE_ON: - transitionTo(mSwitching); broadcastState(BluetoothAdapter.STATE_TURNING_OFF); + transitionTo(mSwitching); if (mBluetoothService.getAdapterConnectionState() != BluetoothAdapter.STATE_DISCONNECTED) { mBluetoothService.disconnectDevices(); |
