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

/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
H A DBluetoothProfileLineItem.java35 private final CachedBluetoothDevice mCachedDevice; field in class:BluetoothProfileLineItem
48 mCachedDevice = cachedBluetoothDevice;
56 mCachedDevice.disconnect(mProfile);
57 mProfile.setPreferred(mCachedDevice.getDevice(), false);
58 } else if (mProfile.isPreferred(mCachedDevice.getDevice())) {
60 mCachedDevice.connectProfile(mProfile);
62 mProfile.setPreferred(mCachedDevice.getDevice(), false);
65 mProfile.setPreferred(mCachedDevice.getDevice(), true);
66 mCachedDevice.connectProfile(mProfile);
89 BluetoothDevice device = mCachedDevice
[all...]
H A DBluetoothDetailFragment.java53 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDetailFragment
80 mCachedDevice = mDeviceManager.findDevice(mDevice);
81 if (mCachedDevice == null) {
82 mCachedDevice = mDeviceManager.addDevice(
111 mCachedDevice.getName());
121 for (LocalBluetoothProfile profile : mCachedDevice.getConnectableProfiles()) {
123 getContext(), profile, mCachedDevice, this));
132 mCachedDevice.unpair();
141 if (!mInputLineItem.getInput().equals(mCachedDevice.getName())) {
142 mCachedDevice
[all...]
/packages/apps/Settings/src/com/android/settings/bluetooth/
H A DBluetoothDevicePreference.java53 private final CachedBluetoothDevice mCachedDevice; field in class:BluetoothDevicePreference
75 mCachedDevice = cachedDevice;
76 mCachedDevice.registerCallback(this);
87 return mCachedDevice == null
88 || mCachedDevice.getBondState() != BluetoothDevice.BOND_BONDED
98 return mCachedDevice;
104 mCachedDevice.unregisterCallback(this);
112 return mCachedDevice;
121 setTitle(mCachedDevice.getName());
123 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.java48 ForgetDeviceDialogFragment.newInstance(mCachedDevice.getAddress());
65 leftButton.setEnabled(!mCachedDevice.isBusy());
69 mIsConnected = mCachedDevice.isConnected();
74 mCachedDevice.disconnect();
81 mCachedDevice.connect(true);
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.java55 mContext, mCachedDevice,
57 String summaryText = mCachedDevice.getConnectionSummary();
58 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 DBluetoothDetailsButtonsControllerTest.java54 mController = new BluetoothDetailsButtonsController(mContext, mFragment, mCachedDevice,
64 when(mCachedDevice.isBusy()).thenReturn(false);
79 verify(mCachedDevice).disconnect();
84 when(mCachedDevice.isConnected()).thenReturn(false);
91 verify(mCachedDevice).connect(eq(true));
102 when(mCachedDevice.isConnected()).thenReturn(false);
109 verify(mCachedDevice).connect(eq(true));
115 when(mCachedDevice.isConnected()).thenReturn(false);
122 when(mCachedDevice.isConnected()).thenReturn(true);
129 verify(mCachedDevice)
[all...]
H A DBluetoothDetailsControllerEventsTest.java65 TestController controller = spy(new TestController(mContext, mFragment, mCachedDevice,
70 verify(mCachedDevice, times(1)).registerCallback(controller);
75 verify(mCachedDevice).unregisterCallback(controller);
79 verify(mCachedDevice, times(2)).registerCallback(controller);
H A DForgetDeviceDialogFragmentTest.java54 private CachedBluetoothDevice mCachedDevice; field in class:ForgetDeviceDialogFragmentTest
67 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
69 doReturn(mCachedDevice).when(mFragment).getDevice(any());
78 verify(mCachedDevice, never()).unpair();
85 verify(mCachedDevice).unpair();
H A DRemoteDeviceNameDialogFragmentTest.java57 private CachedBluetoothDevice mCachedDevice; field in class:RemoteDeviceNameDialogFragmentTest
69 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
70 mFragment = spy(RemoteDeviceNameDialogFragment.newInstance(mCachedDevice));
71 doReturn(mCachedDevice).when(mFragment).getDevice(any());
81 when(mCachedDevice.getName()).thenReturn(deviceName);
120 verify(mCachedDevice).setName(deviceNameModified);
135 verify(mCachedDevice, never()).setName(anyString());
H A DBluetoothDetailsControllerTestBase.java52 protected CachedBluetoothDevice mCachedDevice; field in class:BluetoothDetailsControllerTestBase
140 when(mCachedDevice.getName()).thenReturn(config.getName());
142 when(mCachedDevice.isConnected()).thenReturn(config.isConnected());
143 when(mCachedDevice.getConnectionSummary()).thenReturn(config.getConnectionSummary());
146 when(mCachedDevice.getDevice()).thenReturn(mDevice);
147 when(mCachedDevice.getAddress()).thenReturn(config.getAddress());
H A DBluetoothDetailsHeaderControllerTest.java63 mController = new BluetoothDetailsHeaderController(mContext, mFragment, mCachedDevice,
99 when(mCachedDevice.getConnectionSummary()).thenReturn(
105 when(mCachedDevice.getConnectionSummary()).thenReturn(null);
109 when(mCachedDevice.getConnectionSummary()).thenReturn(
H A DBluetoothDeviceDetailsFragmentTest.java62 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDeviceDetailsFragmentTest
76 doReturn(mCachedDevice).when(mFragment).getCachedDevice(any());
78 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
H A DBluetoothDetailsMacAddressControllerTest.java38 mController = new BluetoothDetailsMacAddressController(mContext, mFragment, mCachedDevice,
H A DBluetoothDetailsProfilesControllerTest.java78 when(mCachedDevice.getConnectableProfiles()).thenAnswer(invocation ->
84 mCachedDevice, mLifecycle);
240 when(mCachedDevice.isBusy()).thenReturn(true);
288 when(mCachedDevice.getPhonebookPermissionChoice()).thenReturn(
304 verify(mCachedDevice).setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
310 when(mCachedDevice.getPhonebookPermissionChoice()).thenReturn(
326 verify(mCachedDevice).setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
336 when(mCachedDevice.getMessagePermissionChoice()).thenReturn(
347 verify(mCachedDevice).setMessagePermissionChoice(BluetoothDevice.ACCESS_ALLOWED);
402 when(mCachedDevice
[all...]
H A DDeviceProfilesSettingsTest.java69 @Mock CachedBluetoothDevice mCachedDevice; field in class:DeviceProfilesSettingsTest
83 when(mCachedDevice.getConnectableProfiles()).thenReturn(mProfiles);
93 when(mDeviceManager.findDevice(any())).thenReturn(mCachedDevice);
122 when(mCachedDevice.isBusy()).thenReturn(true);
/packages/apps/Settings/tests/app/src/com/android/settings/bluetooth/
H A DBluetoothDeviceDetailsRotationTest.java50 private CachedBluetoothDevice mCachedDevice; field in class:BluetoothDeviceDetailsRotationTest
65 when(mCachedDevice.getAddress()).thenReturn(mDeviceAddress);
66 when(mCachedDevice.getName()).thenReturn("Mock Device");
72 return mCachedDevice;

Completed in 208 milliseconds