Merge "Switch to using gray icon for Bluetooth imaging devices" into oc-dr1-dev

This commit is contained in:
TreeHugger Robot
2017-07-21 20:03:41 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 28 deletions

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