Searched refs:mCachedDevice (Results 1 - 21 of 21) sorted by relevance

/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
H A DBluetoothProfileLineItem.java36 private final CachedBluetoothDevice mCachedDevice; field in class:BluetoothProfileLineItem
49 mCachedDevice = cachedBluetoothDevice;
57 mCachedDevice.disconnect(mProfile);
58 mProfile.setPreferred(mCachedDevice.getDevice(), false);
59 } else if (mProfile.isPreferred(mCachedDevice.getDevice())) {
61 mCachedDevice.connectProfile(mProfile);
63 mProfile.setPreferred(mCachedDevice.getDevice(), false);
66 mProfile.setPreferred(mCachedDevice.getDevice(), true);
67 mCachedDevice.connectProfile(mProfile);
90 BluetoothDevice device = mCachedDevice
[all...]
H A DBluetoothDetailFragment.java48 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDetailFragment
76 mCachedDevice = mDeviceManager.findDevice(mDevice);
77 if (mCachedDevice == null) {
78 mCachedDevice = mDeviceManager.addDevice(
107 mCachedDevice.getName());
117 for (LocalBluetoothProfile profile : mCachedDevice.getConnectableProfiles()) {
119 getContext(), profile, mCachedDevice, this));
128 mCachedDevice.unpair();
137 if (!mInputLineItem.getInput().equals(mCachedDevice.getName())) {
138 mCachedDevice
[all...]
/packages/apps/Settings/src/com/android/settings/bluetooth/
H A DBluetoothDevicePreference.java53 private final CachedBluetoothDevice mCachedDevice; field in class:BluetoothDevicePreference
76 mCachedDevice = cachedDevice;
77 mCachedDevice.registerCallback(this);
88 return mCachedDevice == null
89 || mCachedDevice.getBondState() != BluetoothDevice.BOND_BONDED
100 return mCachedDevice;
106 mCachedDevice.unregisterCallback(this);
114 return mCachedDevice;
127 setTitle(mCachedDevice.getName());
129 setSummary(mCachedDevice
[all...]
H A DBluetoothDetailsProfilesController.java55 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDetailsProfilesController
63 mCachedDevice = device;
87 pref.setTitle(profile.getNameResource(mCachedDevice.getDevice()));
97 BluetoothDevice device = mCachedDevice.getDevice();
98 profilePref.setEnabled(!mCachedDevice.isBusy());
100 profilePref.setChecked(mCachedDevice.getMessagePermissionChoice()
103 profilePref.setChecked(mCachedDevice.getPhonebookPermissionChoice()
121 highQualityPref.setEnabled(!mCachedDevice.isBusy());
135 mCachedDevice.setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
140 mCachedDevice
[all...]
H A DDeviceProfilesSettings.java63 private CachedBluetoothDevice mCachedDevice; field in class:DeviceProfilesSettings
90 mCachedDevice = deviceManager.findDevice(remoteDevice);
91 if (mCachedDevice == null) {
92 mCachedDevice = deviceManager.addDevice(mManager.getBluetoothAdapter(),
105 deviceName.setText(mCachedDevice.getName(), TextView.BufferType.EDITABLE);
119 mCachedDevice.setName(deviceName.getText().toString());
122 mCachedDevice.unpair();
134 if (mCachedDevice != null) {
135 mCachedDevice.unregisterCallback(this);
149 if (mCachedDevice !
[all...]
H A DBluetoothDetailsController.java41 protected final CachedBluetoothDevice mCachedDevice; field in class:BluetoothDetailsController
48 mCachedDevice = device;
54 mCachedDevice.unregisterCallback(this);
59 mCachedDevice.registerCallback(this);
H A DBluetoothDetailsButtonsController.java47 ForgetDeviceDialogFragment.newInstance(mCachedDevice.getAddress());
62 mActionButtons.setButton2Enabled(!mCachedDevice.isBusy());
65 mIsConnected = mCachedDevice.isConnected();
70 .setButton2OnClickListener(view -> mCachedDevice.disconnect())
79 view -> mCachedDevice.connect(true /* connectAllProfiles */))
H A DBluetoothDeviceDetailsFragment.java65 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDeviceDetailsFragment
101 mCachedDevice = getCachedDevice(mDeviceAddress);
131 RemoteDeviceNameDialogFragment.newInstance(mCachedDevice).show(
142 if (mCachedDevice != null) {
144 controllers.add(new BluetoothDetailsHeaderController(context, this, mCachedDevice,
146 controllers.add(new BluetoothDetailsButtonsController(context, this, mCachedDevice,
149 mCachedDevice, lifecycle));
150 controllers.add(new BluetoothDetailsMacAddressController(context, this, mCachedDevice,
H A DBluetoothDetailsHeaderController.java63 .getBtClassDrawableWithDescription(mContext, mCachedDevice,
65 String summaryText = mCachedDevice.getConnectionSummary();
68 .getHearingAidPairDeviceSummary(mCachedDevice);
72 mHeaderController.setLabel(mCachedDevice.getName());
H A DBluetoothDetailsMacAddressController.java48 R.string.bluetooth_device_mac_address, mCachedDevice.getAddress()));
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
H A DForgetDeviceDialogFragmentTest.java47 private CachedBluetoothDevice mCachedDevice; field in class:ForgetDeviceDialogFragmentTest
58 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
60 doReturn(mCachedDevice).when(mFragment).getDevice(any());
69 verify(mCachedDevice, never()).unpair();
76 verify(mCachedDevice).unpair();
H A DBluetoothDetailsButtonsControllerTest.java60 new BluetoothDetailsButtonsController(mContext, mFragment, mCachedDevice, mLifecycle);
77 when(mCachedDevice.isBusy()).thenReturn(false);
93 verify(mCachedDevice).disconnect();
98 when(mCachedDevice.isConnected()).thenReturn(false);
104 verify(mCachedDevice).connect(eq(true));
114 when(mCachedDevice.isConnected()).thenReturn(false);
120 verify(mCachedDevice).connect(eq(true));
126 when(mCachedDevice.isConnected()).thenReturn(false);
133 when(mCachedDevice.isConnected()).thenReturn(true);
139 verify(mCachedDevice)
[all...]
H A DBluetoothDetailsControllerEventsTest.java44 spy(new TestController(mContext, mFragment, mCachedDevice, mLifecycle));
48 verify(mCachedDevice, times(1)).registerCallback(controller);
53 verify(mCachedDevice).unregisterCallback(controller);
57 verify(mCachedDevice, times(2)).registerCallback(controller);
H A DRemoteDeviceNameDialogFragmentTest.java51 private CachedBluetoothDevice mCachedDevice; field in class:RemoteDeviceNameDialogFragmentTest
61 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
62 mFragment = spy(RemoteDeviceNameDialogFragment.newInstance(mCachedDevice));
63 doReturn(mCachedDevice).when(mFragment).getDevice(any());
73 when(mCachedDevice.getName()).thenReturn(deviceName);
112 verify(mCachedDevice).setName(deviceNameModified);
127 verify(mCachedDevice, never()).setName(anyString());
H A DBluetoothDetailsControllerTestBase.java58 protected CachedBluetoothDevice mCachedDevice; field in class:BluetoothDetailsControllerTestBase
149 when(mCachedDevice.getName()).thenReturn(config.getName());
151 when(mCachedDevice.isConnected()).thenReturn(config.isConnected());
152 when(mCachedDevice.getConnectionSummary()).thenReturn(config.getConnectionSummary());
155 when(mCachedDevice.getDevice()).thenReturn(mDevice);
156 when(mCachedDevice.getAddress()).thenReturn(config.getAddress());
H A DBluetoothDetailsHeaderControllerTest.java67 when(mCachedDeviceManager.getHearingAidPairDeviceSummary(mCachedDevice)).thenReturn("abc");
69 new BluetoothDetailsHeaderController(mContext, mFragment, mCachedDevice, mLifecycle,
106 when(mCachedDevice.getConnectionSummary())
112 when(mCachedDevice.getConnectionSummary()).thenReturn(null);
116 when(mCachedDevice.getConnectionSummary())
H A DBluetoothDetailsMacAddressControllerTest.java38 new BluetoothDetailsMacAddressController(mContext, mFragment, mCachedDevice, mLifecycle);
H A DBluetoothDeviceDetailsFragmentTest.java59 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDeviceDetailsFragmentTest
73 doReturn(mCachedDevice).when(mFragment).getCachedDevice(any());
75 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
H A DBluetoothDetailsProfilesControllerTest.java78 when(mCachedDevice.getConnectableProfiles()).thenAnswer(invocation ->
84 mCachedDevice, mLifecycle);
244 when(mCachedDevice.isBusy()).thenReturn(true);
292 when(mCachedDevice.getPhonebookPermissionChoice())
308 verify(mCachedDevice).setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
314 when(mCachedDevice.getPhonebookPermissionChoice())
330 verify(mCachedDevice).setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
340 when(mCachedDevice.getMessagePermissionChoice())
351 verify(mCachedDevice).setMessagePermissionChoice(BluetoothDevice.ACCESS_ALLOWED);
406 when(mCachedDevice
[all...]
H A DDeviceProfilesSettingsTest.java65 private CachedBluetoothDevice mCachedDevice; field in class:DeviceProfilesSettingsTest
78 when(mCachedDevice.getConnectableProfiles()).thenReturn(profiles);
88 when(mDeviceManager.findDevice(any())).thenReturn(mCachedDevice);
117 when(mCachedDevice.isBusy()).thenReturn(true);
/packages/apps/Settings/tests/unit/src/com/android/settings/bluetooth/
H A DBluetoothDeviceDetailsRotationTest.java52 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDeviceDetailsRotationTest
67 when(mCachedDevice.getAddress()).thenReturn(mDeviceAddress);
68 when(mCachedDevice.getName()).thenReturn("Mock Device");
74 return mCachedDevice;

Completed in 4230 milliseconds