Skip to content

Commit b702e5d

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Fix Bluetooth QS tile." into jb-mr1-dev
2 parents 25e1456 + ebaefec commit b702e5d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ public QuickSettings(Context context, QuickSettingsContainerView container) {
145145
IntentFilter filter = new IntentFilter();
146146
filter.addAction(DisplayManager.ACTION_WIFI_DISPLAY_STATUS_CHANGED);
147147
filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
148+
filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
148149
filter.addAction(Intent.ACTION_USER_SWITCHED);
149150
mContext.registerReceiver(mReceiver, filter);
150151

@@ -854,6 +855,11 @@ public void onReceive(Context context, Intent intent) {
854855
DisplayManager.EXTRA_WIFI_DISPLAY_STATUS);
855856
mWifiDisplayStatus = status;
856857
applyWifiDisplayStatus();
858+
} else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) {
859+
int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
860+
BluetoothAdapter.ERROR);
861+
mBluetoothState.enabled = (state == BluetoothAdapter.STATE_ON);
862+
applyBluetoothStatus();
857863
} else if (BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED.equals(action)) {
858864
int status = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE,
859865
BluetoothAdapter.STATE_DISCONNECTED);

0 commit comments

Comments
 (0)