Home
last modified time | relevance | path

Searched refs:mCachedDevice (Results 1 – 5 of 5) sorted by relevance

/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceTest.java115 private CachedBluetoothDevice mCachedDevice; field in CachedBluetoothDeviceTest
155 mCachedDevice = spy(new CachedBluetoothDevice(mContext, mProfileManager, mDevice)); in setUp()
156 mCachedDevice.setLocalBluetoothManager(mLocalBluetoothManager); in setUp()
158 doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel(); in setUp()
176 assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(expectedSummary); in testTransitionFromConnectingToDisconnected()
225 assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Pairing…"); in getConnectionSummary_testProfilesInactive_returnPairing()
236 assertThat(mCachedDevice.getTvConnectionSummary().toString()).isEqualTo("Pairing…"); in getTvConnectionSummary_testProfilesInactive_returnPairing()
244 assertThat(mCachedDevice.getConnectionSummary()).isNull(); in getConnectionSummary_testSingleProfileConnectDisconnect()
248 assertThat(mCachedDevice.getConnectionSummary()).isNull(); in getConnectionSummary_testSingleProfileConnectDisconnect()
254 assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("10% battery"); in getConnectionSummary_testSingleProfileConnectDisconnect()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DBluetoothMediaDevice.java42 private final CachedBluetoothDevice mCachedDevice; field in BluetoothMediaDevice
51 mCachedDevice = device; in BluetoothMediaDevice()
58 return mCachedDevice.getName(); in getName()
63 return isConnected() || mCachedDevice.isBusy() in getSummary()
64 ? mCachedDevice.getConnectionSummary() in getSummary()
70 return isConnected() || mCachedDevice.isBusy() in getSummaryForTv()
71 ? mCachedDevice.getTvConnectionSummary(lowBatteryColorRes) in getSummaryForTv()
83 return BluetoothUtils.isAdvancedUntetheredDevice(mCachedDevice.getDevice()) in getIcon()
85 : BluetoothUtils.getBtClassDrawableWithDescription(mContext, mCachedDevice).first; in getIcon()
90 return BluetoothUtils.isAdvancedUntetheredDevice(mCachedDevice.getDevice()) in getIconWithoutBackground()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/accessibility/hearingaid/
DHearingDevicesCheckerTest.java62 private CachedBluetoothDevice mCachedDevice; field in HearingDevicesCheckerTest
73 when(mCachedDevice.getDevice()).thenReturn(mDevice); in setUp()
97 when(mCachedDevice.isHearingAidDevice()).thenReturn(true); in isAnyPairedHearingDevice_hearingAidBonded_returnTrue()
98 when(mCachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in isAnyPairedHearingDevice_hearingAidBonded_returnTrue()
99 mCachedDevices.add(mCachedDevice); in isAnyPairedHearingDevice_hearingAidBonded_returnTrue()
107 when(mCachedDevice.isActiveDevice(BluetoothProfile.HEARING_AID)).thenReturn(true); in isAnyActiveHearingDevice_hearingAidActiveAndConnected_returnTrue()
108 when(mCachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in isAnyActiveHearingDevice_hearingAidActiveAndConnected_returnTrue()
111 when(mCachedDevice.isConnectedHearingAidDevice()).thenReturn(true); in isAnyActiveHearingDevice_hearingAidActiveAndConnected_returnTrue()
112 mCachedDevices.add(mCachedDevice); in isAnyActiveHearingDevice_hearingAidActiveAndConnected_returnTrue()
DHearingDevicesListAdapterTest.java56 private CachedBluetoothDevice mCachedDevice; field in HearingDevicesListAdapterTest
63 when(mCachedDevice.getAddress()).thenReturn(DEVICE_ADDRESS); in setUp()
64 when(mHearingDeviceItem.getCachedBluetoothDevice()).thenReturn(mCachedDevice); in setUp()
DHearingDevicesDialogDelegateTest.java119 private CachedBluetoothDevice mCachedDevice; field in HearingDevicesDialogDelegateTest
144 when(mCachedDevice.getAddress()).thenReturn(DEVICE_ADDRESS); in setUp()
145 when(mHearingDeviceItem.getCachedBluetoothDevice()).thenReturn(mCachedDevice); in setUp()
192 verify(mCachedDevice).disconnect(); in onDeviceItemOnClicked_connectedDevice_disconnect()