From 2675639ef752359eed0c0fea58ead91842e9a64c Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Tue, 10 Dec 2019 14:50:38 +0800 Subject: [PATCH] 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 --- .../src/com/android/settingslib/bluetooth/BluetoothUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index 0d972c5e2e0e6..2f34b2bad0ada 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -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)); }