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
This commit is contained in:
Antony Sargent
2017-07-20 09:54:29 -07:00
parent f7d3537fcd
commit 64fab6f4cd
3 changed files with 11 additions and 28 deletions

View File

@@ -1,27 +0,0 @@
<!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorAccent">
<path
android:fillColor="#FF000000"
android:pathData="M19,8L5,8c-1.66,0 -3,1.34 -3,3v6h4v4h12v-4h4v-6c0,-1.66 -1.34,-3
-3,-3zM16,19L8,19v-5h8v5zM19,12c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1
-1,1zM18,3L6,3v4h12L18,3z"/>
</vector>

View File

@@ -169,7 +169,7 @@ public final class Utils {
R.string.bluetooth_talkback_input_peripheral));
case BluetoothClass.Device.Major.IMAGING:
return new Pair<Integer, String>(R.drawable.ic_bt_imaging,
return new Pair<Integer, String>(R.drawable.ic_settings_print,
r.getString(R.string.bluetooth_talkback_imaging));
default:

View File

@@ -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));
}
}