From 64fab6f4cdefad56ee867456cf47d0549a1124e3 Mon Sep 17 00:00:00 2001 From: Antony Sargent Date: Thu, 20 Jul 2017 09:54:29 -0700 Subject: [PATCH] Switch to using gray icon for Bluetooth imaging devices All the other Bluetooth icons were switched to gray at some point in the past, but we must have missed this one. Bug: 63858978 Test: make RunSettingsRoboTests Change-Id: I2ebefa42f3ecff8ae6d58f4bdb22dce39ae4dbd4 --- res/drawable/ic_bt_imaging.xml | 27 ------------------- src/com/android/settings/bluetooth/Utils.java | 2 +- .../BluetoothDevicePreferenceTest.java | 10 +++++++ 3 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 res/drawable/ic_bt_imaging.xml diff --git a/res/drawable/ic_bt_imaging.xml b/res/drawable/ic_bt_imaging.xml deleted file mode 100644 index 01e78c0d413..00000000000 --- a/res/drawable/ic_bt_imaging.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java index b370c11beb1..26edd84d2e2 100755 --- a/src/com/android/settings/bluetooth/Utils.java +++ b/src/com/android/settings/bluetooth/Utils.java @@ -169,7 +169,7 @@ public final class Utils { R.string.bluetooth_talkback_input_peripheral)); case BluetoothClass.Device.Major.IMAGING: - return new Pair(R.drawable.ic_bt_imaging, + return new Pair(R.drawable.ic_settings_print, r.getString(R.string.bluetooth_talkback_imaging)); default: diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDevicePreferenceTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDevicePreferenceTest.java index 8a651a726e0..d60571c0f03 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDevicePreferenceTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDevicePreferenceTest.java @@ -15,6 +15,7 @@ */ package com.android.settings.bluetooth; +import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.content.Context; import android.os.UserManager; @@ -136,4 +137,13 @@ public class BluetoothDevicePreferenceTest { assertThat(mPreference.shouldHideSecondTarget()).isFalse(); } + + @Test + public void imagingDeviceIcon_isICSettingsPrint() { + when(mCachedBluetoothDevice.getBtClass()).thenReturn( + new BluetoothClass(BluetoothClass.Device.Major.IMAGING)); + mPreference.onDeviceAttributesChanged(); + assertThat(mPreference.getIcon()).isEqualTo( + mContext.getDrawable(R.drawable.ic_settings_print)); + } }