Fix bluetooth icon has wrong color

- ic_settings_bluetooth is used in two different places, one of them
is set background, but they share same drawable state. Need to set
mutate() to make drawables have different state.

Fixes: 145555150
Fixes: 143090956
Test: 1. Open Bluetooth settings
      2. Pair new device
      3. Wait more Available devices are shown
      4. hit the back arrow
      5. Observe the color of Bluetooth icon

Change-Id: I9574e6c22c401c4b88eb7285b15a59a1dd57b8ee
This commit is contained in:
Raff Tsai
2019-12-10 14:50:38 +08:00
parent 69cad8ffbb
commit 2675639ef7

View File

@@ -116,7 +116,7 @@ public class BluetoothUtils {
}
return new Pair<>(
getBluetoothDrawable(context,
com.android.internal.R.drawable.ic_settings_bluetooth),
com.android.internal.R.drawable.ic_settings_bluetooth).mutate(),
context.getString(R.string.bluetooth_talkback_bluetooth));
}