/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePreferenceTest.java | 69 private CachedBluetoothDevice mCachedDevice; field in BluetoothDevicePreferenceTest 78 mPreference = new BluetoothDevicePreference(mContext, mCachedDevice); in setUp() 95 verify(mCachedDevice).registerCallback(any(CachedBluetoothDevice.Callback.class)); in onAttached_registersDeviceCallback() 101 when(mCachedDevice.getName()).thenReturn(name); in onAttached_setsDeviceNameAsTitle() 111 when(mCachedDevice.isConnected()).thenReturn(false); in onAttached_notConnected_setsCarConnectionSummaryAsSummary() 112 when(mCachedDevice.getCarConnectionSummary(anyBoolean(), anyBoolean())).thenReturn(summary); in onAttached_notConnected_setsCarConnectionSummaryAsSummary() 121 when(mCachedDevice.isConnected()).thenReturn(true); in onAttached_connected_setsCarConnectionSummaryAsSummary() 123 when(mCachedDevice.getCarConnectionSummary(anyBoolean(), anyBoolean())).thenReturn(summary); in onAttached_connected_setsCarConnectionSummaryAsSummary() 132 when(mCachedDevice.isConnected()).thenReturn(true); in onAttached_connected_carConnectionSummaryIsNull_setsSummary() 135 when(mCachedDevice.getCarConnectionSummary(anyBoolean(), anyBoolean())).thenReturn(summary); in onAttached_connected_carConnectionSummaryIsNull_setsSummary() [all …]
|
D | BluetoothDeviceActionButtonsPreferenceControllerTest.java | 62 private CachedBluetoothDevice mCachedDevice; field in BluetoothDeviceActionButtonsPreferenceControllerTest 77 when(mCachedDevice.getAddress()).thenReturn(address); in setUp() 82 mPreferenceController.setCachedDevice(mCachedDevice); in setUp() 93 verify(mCachedDevice).unpair(); in forgetButtonClicked_unpairsDevice() 107 when(mCachedDevice.isConnected()).thenReturn(true); in connectionButtonClicked_deviceConnected_disconnectsDevice() 112 verify(mCachedDevice).disconnect(); in connectionButtonClicked_deviceConnected_disconnectsDevice() 117 when(mCachedDevice.isConnected()).thenReturn(false); in connectionButtonClicked_deviceNotConnected_connectsDevice() 122 verify(mCachedDevice).connect(); in connectionButtonClicked_deviceNotConnected_connectsDevice() 127 when(mCachedDevice.isConnected()).thenReturn(true); in deviceConnected_connectionButtonShowsDisconnect() 136 when(mCachedDevice.isConnected()).thenReturn(false); in deviceNotConnected_connectionButtonShowsConnect() [all …]
|
D | BluetoothDeviceNamePreferenceControllerTest.java | 74 private CachedBluetoothDevice mCachedDevice; field in BluetoothDeviceNamePreferenceControllerTest 94 mPreferenceController.setCachedDevice(mCachedDevice); in setUp() 102 when(mCachedDevice.getName()).thenReturn(name); in refreshUi_setsDeviceNameAsTitle() 112 when(mCachedDevice.isConnected()).thenReturn(true); in refreshUi_connected_setsCarConnectionSummaryAsSummary() 113 when(mCachedDevice.getCarConnectionSummary()).thenReturn(summary); in refreshUi_connected_setsCarConnectionSummaryAsSummary() 123 when(mCachedDevice.isConnected()).thenReturn(false); in refreshUi_notConnectedsetsCarConnectionSummaryAsSummary() 124 when(mCachedDevice.getCarConnectionSummary()).thenReturn(summary); in refreshUi_notConnectedsetsCarConnectionSummaryAsSummary() 133 when(mCachedDevice.getBtClass()).thenReturn( in refreshUi_setsIcon() 144 when(mCachedDevice.isConnected()).thenReturn(true); in refreshUi_hearingAidDevice_setsBatteryStatusesAsSummary() 145 when(mCachedDevice.getCarConnectionSummary()).thenReturn(summary); in refreshUi_hearingAidDevice_setsBatteryStatusesAsSummary() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothDetailsPairOtherControllerTest.java | 58 mController = new BluetoothDetailsPairOtherController(mContext, mFragment, mCachedDevice, in setUp() 71 when(mCachedDevice.getDeviceSide()).thenReturn(HearingAidInfo.DeviceSide.SIDE_LEFT); in init_deviceIsLeftSide_showPairRightSideTitle() 82 when(mCachedDevice.getDeviceSide()).thenReturn(HearingAidInfo.DeviceSide.SIDE_RIGHT); in init_deviceIsRightSide_showPairLeftSideTitle() 93 when(mCachedDevice.isConnectedHearingAidDevice()).thenReturn(false); in init_deviceIsNotConnectedHearingAid_preferenceIsNotVisible() 111 when(mCachedDevice.isConnectedHearingAidDevice()).thenReturn(false); in isAvailable_deviceIsNotConnectedHearingAid_notAvailable() 126 when(mCachedDevice.isConnectedHearingAidDevice()).thenReturn(true); in isAvailable_deviceIsConnectedHearingAid_isMonaural_notAvailable() 127 when(mCachedDevice.getDeviceMode()).thenReturn(HearingAidInfo.DeviceMode.MODE_MONAURAL); in isAvailable_deviceIsConnectedHearingAid_isMonaural_notAvailable() 143 when(mCachedDevice.isConnectedHearingAidDevice()).thenReturn(true); in isAvailable_deviceIsConnectedHearingAid_subDeviceIsBonded_notAvailable() 144 when(mCachedDevice.getDeviceMode()).thenReturn(HearingAidInfo.DeviceMode.MODE_BINAURAL); in isAvailable_deviceIsConnectedHearingAid_subDeviceIsBonded_notAvailable() 146 when(mCachedDevice.getSubDevice()).thenReturn(mSubCachedDevice); in isAvailable_deviceIsConnectedHearingAid_subDeviceIsBonded_notAvailable() [all …]
|
D | BluetoothDetailsButtonsControllerTest.java | 63 new BluetoothDetailsButtonsController(mContext, mFragment, mCachedDevice, in setUp() 81 when(mCachedDevice.isBusy()).thenReturn(false); in setUp() 97 verify(mCachedDevice).disconnect(); in clickOnDisconnect() 102 when(mCachedDevice.isConnected()).thenReturn(false); in clickOnConnect() 108 verify(mCachedDevice).connect(); in clickOnConnect() 118 when(mCachedDevice.isConnected()).thenReturn(false); in becomeDisconnected() 124 verify(mCachedDevice).connect(); in becomeDisconnected() 130 when(mCachedDevice.isConnected()).thenReturn(false); in becomeConnected() 137 when(mCachedDevice.isConnected()).thenReturn(true); in becomeConnected() 143 verify(mCachedDevice).disconnect(); in becomeConnected() [all …]
|
D | AdvancedBluetoothDetailsHeaderControllerTest.java | 86 private CachedBluetoothDevice mCachedDevice; field in AdvancedBluetoothDetailsHeaderControllerTest 98 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp() 99 mController.init(mCachedDevice); in setUp() 104 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp() 105 when(mCachedDevice.getAddress()).thenReturn(MAC_ADDRESS); in setUp() 106 when(mCachedDevice.getIdentityAddress()).thenReturn(MAC_ADDRESS); in setUp() 129 when(mCachedDevice.isConnected()).thenReturn(true); in refresh_connectedWatch_behaveAsExpected() 154 when(mCachedDevice.isConnected()).thenReturn(true); in refresh_connectedWatch_unknownBatteryLevel_shouldNotShowBatteryLevel() 176 when(mCachedDevice.isConnected()).thenReturn(true); in refresh_connectedStylus_behaveAsExpected() 196 when(mCachedDevice.isConnected()).thenReturn(true); in refresh_connectedUnknownType_behaveAsExpected() [all …]
|
D | ForgetDeviceDialogFragmentTest.java | 61 private CachedBluetoothDevice mCachedDevice; field in ForgetDeviceDialogFragmentTest 77 when(mCachedDevice.getAddress()).thenReturn(deviceAddress); in setUp() 78 when(mCachedDevice.getIdentityAddress()).thenReturn(deviceAddress); in setUp() 79 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp() 80 when(mCachedDevice.getName()).thenReturn(DEVICE_NAME); in setUp() 82 doReturn(mCachedDevice).when(mFragment).getDevice(any()); in setUp() 91 verify(mCachedDevice, never()).unpair(); in cancelDialog() 100 verify(mCachedDevice).unpair(); in confirmDialog()
|
D | RemoteDeviceNameDialogFragmentTest.java | 55 private CachedBluetoothDevice mCachedDevice; field in RemoteDeviceNameDialogFragmentTest 65 when(mCachedDevice.getAddress()).thenReturn(deviceAddress); in setUp() 66 when(mCachedDevice.getIdentityAddress()).thenReturn(deviceAddress); in setUp() 67 mFragment = spy(RemoteDeviceNameDialogFragment.newInstance(mCachedDevice)); in setUp() 68 doReturn(mCachedDevice).when(mFragment).getDevice(any()); in setUp() 78 when(mCachedDevice.getName()).thenReturn(deviceName); in startDialog() 120 verify(mCachedDevice).setName(deviceNameModified); in deviceNameEditSucceeds() 136 verify(mCachedDevice, never()).setName(anyString()); in deviceNameEditThenCancelDoesntRename()
|
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePreference.java | 44 private final CachedBluetoothDevice mCachedDevice; field in BluetoothDevicePreference 58 mCachedDevice = cachedDevice; in BluetoothDevicePreference() 81 return mCachedDevice; in getCachedDevice() 95 mCachedDevice.registerCallback(mDeviceCallback); in onAttached() 102 mCachedDevice.unregisterCallback(mDeviceCallback); in onDetached() 106 setTitle(mCachedDevice.getName()); in refreshUi() 107 setSummary(mCachedDevice.getCarConnectionSummary(/* shortSummary= */ true, in refreshUi() 111 .getBtClassDrawableWithDescription(getContext(), mCachedDevice); in refreshUi() 117 setEnabled(!mCachedDevice.isBusy()); in refreshUi() 118 setVisible(mShowDevicesWithoutNames || mCachedDevice.hasHumanReadableName()); in refreshUi() [all …]
|
D | BluetoothDeviceProfilePreference.java | 36 private final CachedBluetoothDevice mCachedDevice; field in BluetoothDeviceProfilePreference 43 mCachedDevice = cachedDevice; in BluetoothDeviceProfilePreference() 59 return mCachedDevice; in getCachedDevice() 65 mCachedDevice.registerCallback(mDeviceCallback); in onAttached() 72 mCachedDevice.unregisterCallback(mDeviceCallback); in onDetached() 77 setEnabled(!mCachedDevice.isBusy()); in refreshUi() 80 mProfile.getConnectionStatus(mCachedDevice.getDevice()) == STATE_CONNECTED); in refreshUi() 82 setChecked(mProfile.isEnabled(mCachedDevice.getDevice())); in refreshUi()
|
D | BluetoothDeviceDetailsFragment.java | 39 private CachedBluetoothDevice mCachedDevice; field in BluetoothDeviceDetailsFragment 69 mCachedDevice = manager.getCachedDeviceManager().findDevice(remoteDevice); in onAttach() 70 if (mCachedDevice == null) { in onAttach() 76 R.string.pk_bluetooth_device_name).setCachedDevice(mCachedDevice); in onAttach() 78 R.string.pk_bluetooth_device_action_buttons).setCachedDevice(mCachedDevice); in onAttach() 80 R.string.pk_bluetooth_device_profiles).setCachedDevice(mCachedDevice); in onAttach() 82 R.string.pk_bluetooth_device_address).setCachedDevice(mCachedDevice); in onAttach()
|
D | RemoteRenameDialogFragment.java | 38 private CachedBluetoothDevice mCachedDevice; field in RemoteRenameDialogFragment 56 mCachedDevice = manager.getCachedDeviceManager().findDevice(device); in onAttach() 67 if (mCachedDevice != null) { in getDeviceName() 68 return mCachedDevice.getName(); in getDeviceName() 75 if (mCachedDevice != null) { in setDeviceName() 76 mCachedDevice.setName(deviceName); in setDeviceName()
|
D | BluetoothDevicePreferenceController.java | 47 private CachedBluetoothDevice mCachedDevice; field in BluetoothDevicePreferenceController 68 mCachedDevice = device; in setCachedDevice() 75 return mCachedDevice; in getCachedDevice() 81 if (mCachedDevice == null) { in checkInitialized() 99 mCachedDevice.registerCallback(mDeviceCallback); in onStartInternal() 105 mCachedDevice.unregisterCallback(mDeviceCallback); in onStopInternal()
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | BluetoothDevicePreference.java | 78 private final CachedBluetoothDevice mCachedDevice; field in BluetoothDevicePreference 133 mCachedDevice = cachedDevice; in BluetoothDevicePreference() 148 return mCachedDevice == null in shouldHideSecondTarget() 149 || mCachedDevice.getBondState() != BluetoothDevice.BOND_BONDED in shouldHideSecondTarget() 160 return mCachedDevice; in getCachedDevice() 167 mCachedDevice.unregisterCallback(mCallback); in onPrepareForRemoval() 181 mCachedDevice.registerCallback(mCallback); in onAttached() 192 mCachedDevice.unregisterCallback(mCallback); in onDetached() 207 if (mCachedDevice.getDevice() != null) { in registerMetadataChangedListener() 208 mBluetoothDevices.add(mCachedDevice.getDevice()); in registerMetadataChangedListener() [all …]
|
D | BluetoothDeviceDetailsFragment.java | 98 CachedBluetoothDevice mCachedDevice; field in BluetoothDeviceDetailsFragment 201 mCachedDevice = getCachedDevice(mDeviceAddress); in onAttach() 210 if (mCachedDevice == null) { in onAttach() 216 use(AdvancedBluetoothDetailsHeaderController.class).init(mCachedDevice); in onAttach() 217 use(LeAudioBluetoothDetailsHeaderController.class).init(mCachedDevice, mManager); in onAttach() 218 use(KeyboardSettingsPreferenceController.class).init(mCachedDevice); in onAttach() 226 ? featureProvider.getBluetoothDeviceSettingsUri(mCachedDevice.getDevice()) in onAttach() 231 mCachedDevice.getDevice(), in onAttach() 241 mCachedDevice.getDevice(), mExtraControlMetadataListener); in onDetach() 250 String uri = featureProvider.getBluetoothDeviceControlUri(mCachedDevice.getDevice()); in updateExtraControlUri() [all …]
|
D | BluetoothDetailsMacAddressController.java | 49 R.string.bluetooth_device_mac_address, mCachedDevice.getIdentityAddress())); in init() 54 if (mCachedDevice.getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) { in refresh() 57 mCachedDevice.getIdentityAddress())); in refresh() 58 for (CachedBluetoothDevice member: mCachedDevice.getMemberDevice()) { in refresh() 62 } else if (mCachedDevice.getSubDevice() != null) { in refresh() 65 mCachedDevice.getIdentityAddress())); in refresh() 66 title.append("\n").append(mCachedDevice.getSubDevice().getIdentityAddress()); in refresh() 70 R.string.bluetooth_device_mac_address, mCachedDevice.getIdentityAddress())); in refresh()
|
D | LeAudioBluetoothDetailsHeaderController.java | 92 private CachedBluetoothDevice mCachedDevice; field in LeAudioBluetoothDetailsHeaderController 107 if (mCachedDevice == null || mProfileManager == null) { in getAvailabilityStatus() 110 boolean hasLeAudio = mCachedDevice.getConnectableProfiles() in getAvailabilityStatus() 114 return !BluetoothUtils.isAdvancedDetailsHeader(mCachedDevice.getDevice()) && hasLeAudio in getAvailabilityStatus() 155 mCachedDevice = cachedBluetoothDevice; in init() 158 mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); in init() 163 if (mLayoutPreference == null || mCachedDevice == null) { in refresh() 169 BluetoothUtils.getBtRainbowDrawableWithDescription(mContext, mCachedDevice); in refresh() 176 title.setText(mCachedDevice.getName()); in refresh() 180 summary.setText(mCachedDevice.getConnectionSummary(true /* shortSummary */)); in refresh() [all …]
|
D | BluetoothDetailsSpatialAudioController.java | 256 mCachedDevice.getAddress()); in getAvailableDevice() 260 mCachedDevice.getAddress()); in getAvailableDevice() 264 mCachedDevice.getAddress()); in getAvailableDevice() 268 mCachedDevice.getAddress()); in getAvailableDevice() 272 mCachedDevice.getAddress()); in getAvailableDevice() 289 + mCachedDevice.getDevice().getAnonymizedAddress() in getAvailableDevice() 298 + mCachedDevice in getAvailableDeviceByProfileState() 300 + mCachedDevice.getProfiles()); in getAvailableDeviceByProfileState() 303 for (LocalBluetoothProfile profile : mCachedDevice.getProfiles()) { in getAvailableDeviceByProfileState() 306 && profile.isEnabled(mCachedDevice.getDevice())) { in getAvailableDeviceByProfileState() [all …]
|
D | BluetoothDetailsHearingAidsPresetsController.java | 121 mCachedDevice.getDevice()); in onPreferenceChange() 122 int hapGroupId = mHapClientProfile.getHapGroup(mCachedDevice.getDevice()); in onPreferenceChange() 159 mPreference.setEnabled(mCachedDevice.isConnectedHapClientDevice()); in refresh() 169 mCachedDevice.getDevice()); in refresh() 184 return mCachedDevice.getProfiles().stream().anyMatch( in isAvailable() 190 if (device.equals(mCachedDevice.getDevice())) { in onPresetSelected() 201 if (device.equals(mCachedDevice.getDevice())) { in onPresetSelectionFailed() 213 if (hapGroupId == mHapClientProfile.getHapGroup(mCachedDevice.getDevice())) { in onPresetSelectionForGroupFailed() 226 if (device.equals(mCachedDevice.getDevice())) { in onPresetInfoChanged() 240 if (device.equals(mCachedDevice.getDevice())) { in onSetPresetNameFailed() [all …]
|
D | BluetoothDetailsAudioDeviceTypeController.java | 87 a2dpProfileEnabled = a2dpProfile.isEnabled(mCachedDevice.getDevice()); in isAvailable() 93 leAudioProfileEnabled = leAudioProfile.isEnabled(mCachedDevice.getDevice()); in isAvailable() 112 mCachedDevice.getAddress(), Integer.parseInt(value)); in onPreferenceChange() 115 mCachedDevice.getAddress(), in onPreferenceChange() 116 mCachedDevice.getDevice().getType() == DEVICE_TYPE_LE, in onPreferenceChange() 119 mCachedDevice.onAudioDeviceCategoryChanged(); in onPreferenceChange() 176 mCachedDevice.getAddress()); in createAudioDeviceTypePreference() 179 mCachedDevice.getAddress(), in createAudioDeviceTypePreference() 180 mCachedDevice.getDevice().getType() == DEVICE_TYPE_LE); in createAudioDeviceTypePreference() 184 + mCachedDevice.getDevice().getAnonymizedAddress() in createAudioDeviceTypePreference() [all …]
|
D | BluetoothDetailsProfilesController.java | 92 private CachedBluetoothDevice mCachedDevice; field in BluetoothDetailsProfilesController 107 mCachedDevice = device; in BluetoothDetailsProfilesController() 108 mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); in BluetoothDetailsProfilesController() 133 pref.setTitle(profile.getNameResource(mCachedDevice.getDevice())); in createProfilePreference() 141 BluetoothUtils.getStringMetaData(mCachedDevice.getDevice(), in createProfilePreference() 167 BluetoothDevice device = mCachedDevice.getDevice(); in refreshProfilePreference() 181 profilePref.setEnabled(!mCachedDevice.isBusy()); in refreshProfilePreference() 194 profilePref.setSummary(profile.getSummaryResourceForDevice(mCachedDevice.getDevice())); in refreshProfilePreference() 211 highQualityPref.setEnabled(!mCachedDevice.isBusy()); in refreshProfilePreference() 237 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in enableProfile() [all …]
|
D | AdvancedBluetoothDetailsHeaderController.java | 102 private CachedBluetoothDevice mCachedDevice; field in AdvancedBluetoothDetailsHeaderController 132 if (mCachedDevice == null) { in getAvailabilityStatus() 135 return BluetoothUtils.isAdvancedDetailsHeader(mCachedDevice.getDevice()) in getAvailabilityStatus() 172 mCachedDevice = cachedBluetoothDevice; in init() 184 if (mCachedDevice.getDevice() != null) { in registerBluetoothDevice() 185 mBluetoothDevices.add(mCachedDevice.getDevice()); in registerBluetoothDevice() 187 mCachedDevice.getMemberDevice().forEach(cbd -> { in registerBluetoothDevice() 196 mCachedDevice.registerCallback(this); in registerBluetoothDevice() 229 mCachedDevice.unregisterCallback(this); in unRegisterBluetoothDevice() 244 if (mLayoutPreference != null && mCachedDevice != null) { in refresh() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | HearingDevicePairingFragmentTest.java | 81 private CachedBluetoothDevice mCachedDevice; field in HearingDevicePairingFragmentTest 102 doReturn(mDevice).when(mCachedDevice).getDevice(); in setUp() 104 doReturn(pair).when(mCachedDevice).getDrawableWithDescription(); in setUp() 106 mDevicePreference = new BluetoothDevicePreference(mContext, mCachedDevice, true, in setUp() 123 mFragment.mDevicePreferenceMap.put(mCachedDevice, mDevicePreference); in onDeviceDeleted_stateIsCorrect() 127 mFragment.onDeviceDeleted(mCachedDevice); in onDeviceDeleted_stateIsCorrect() 139 mFragment.addDevice(mCachedDevice); in addDevice_bluetoothOff_doNothing() 151 mFragment.addDevice(mCachedDevice); in addDevice_addToAvailableHearingDeviceGroup() 161 doReturn(mCachedDevice).when(mCachedDeviceManager).findDevice(mDevice); in handleLeScanResult_markDeviceAsHearingAid() 165 verify(mCachedDevice).setHearingAidInfo(new HearingAidInfo.Builder().build()); in handleLeScanResult_markDeviceAsHearingAid() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/ |
D | AudioSharingDevicePreferenceControllerTest.java | 113 @Mock private CachedBluetoothDevice mCachedDevice; field in AudioSharingDevicePreferenceControllerTest 163 doReturn(mDevice).when(mCachedDevice).getDevice(); in setUp() 164 when(mDeviceManager.findDevice(mDevice)).thenReturn(mCachedDevice); in setUp() 300 doReturn(ImmutableList.of()).when(mCachedDevice).getConnectableProfiles(); in onProfileConnectionStateChanged_notMediaDevice_doNothing() 302 mCachedDevice, BluetoothAdapter.STATE_CONNECTED, BluetoothProfile.HID_DEVICE); in onProfileConnectionStateChanged_notMediaDevice_doNothing() 310 doReturn(ImmutableList.of(mLeAudioProfile)).when(mCachedDevice).getConnectableProfiles(); in onProfileConnectionStateChanged_leaDeviceDisconnected_closeOpeningDialogsForIt() 311 doReturn(ImmutableList.of(mLeAudioProfile)).when(mCachedDevice).getProfiles(); in onProfileConnectionStateChanged_leaDeviceDisconnected_closeOpeningDialogsForIt() 313 mCachedDevice, in onProfileConnectionStateChanged_leaDeviceDisconnected_closeOpeningDialogsForIt() 316 verify(mDialogHandler).closeOpeningDialogsForLeaDevice(mCachedDevice); in onProfileConnectionStateChanged_leaDeviceDisconnected_closeOpeningDialogsForIt() 322 doReturn(ImmutableList.of(mLeAudioProfile)).when(mCachedDevice).getConnectableProfiles(); in onProfileConnectionStateChanged_assistantProfileConnecting_doNothing() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/ |
D | BluetoothDeviceProfilePreferenceTest.java | 53 private CachedBluetoothDevice mCachedDevice; field in BluetoothDeviceProfilePreferenceTest 63 when(mCachedDevice.getDevice()).thenReturn(mDevice); in setUp() 66 mPreference = new BluetoothDeviceProfilePreference(mContext, mProfile, mCachedDevice); in setUp() 83 verify(mCachedDevice).registerCallback(any(CachedBluetoothDevice.Callback.class)); in onAttached_registersDeviceCallback() 88 when(mCachedDevice.isBusy()).thenReturn(false); in onAttached_deviceNotBusy_setsEnabled() 97 when(mCachedDevice.isBusy()).thenReturn(true); in onAttached_deviceBusy_setsNotEnabled() 128 mPreference = new BluetoothDeviceProfilePreference(mContext, mProfile, mCachedDevice); in onAttached_panProfile_connected_setsChecked() 141 mPreference = new BluetoothDeviceProfilePreference(mContext, mProfile, mCachedDevice); in onAttached_panProfile_notConnected_setsUnchecked() 151 when(mCachedDevice.isBusy()).thenReturn(false); in onDeviceAttributesChanged_refreshesUi() 155 verify(mCachedDevice).registerCallback(callbackCaptor.capture()); in onDeviceAttributesChanged_refreshesUi() [all …]
|