Only show bluetooth icon when connected && enabled
Test: visual Change-Id: Id1e6a483dec41d28f3679c37481a1538e8cadd57 Fixes: 71541936
This commit is contained in:
@@ -407,17 +407,17 @@ public class PhoneStatusBarPolicy implements Callback, Callbacks,
|
||||
int iconId = R.drawable.stat_sys_data_bluetooth;
|
||||
String contentDescription =
|
||||
mContext.getString(R.string.accessibility_quick_settings_bluetooth_on);
|
||||
boolean bluetoothEnabled = false;
|
||||
boolean bluetoothVisible = false;
|
||||
if (mBluetooth != null) {
|
||||
bluetoothEnabled = mBluetooth.isBluetoothEnabled();
|
||||
if (mBluetooth.isBluetoothConnected()) {
|
||||
iconId = R.drawable.stat_sys_data_bluetooth_connected;
|
||||
contentDescription = mContext.getString(R.string.accessibility_bluetooth_connected);
|
||||
bluetoothVisible = mBluetooth.isBluetoothEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
mIconController.setIcon(mSlotBluetooth, iconId, contentDescription);
|
||||
mIconController.setIconVisibility(mSlotBluetooth, bluetoothEnabled);
|
||||
mIconController.setIconVisibility(mSlotBluetooth, bluetoothVisible);
|
||||
}
|
||||
|
||||
private final void updateTTY() {
|
||||
|
||||
Reference in New Issue
Block a user