HomeSort by relevance Sort by last modified time
    Searched refs:mCachedDevice (Results 1 - 22 of 22) sorted by null

  /frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
CachedBluetoothDeviceTest.java 65 private CachedBluetoothDevice mCachedDevice;
81 mCachedDevice = spy(
83 doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel();
90 mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_CONNECTED);
91 assertThat(mCachedDevice.getConnectionSummary()).isNull();
94 mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_DISCONNECTED);
95 assertThat(mCachedDevice.getConnectionSummary()).isNull();
100 mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_CONNECTED);
101 assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("10% battery");
104 mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_DISCONNECTED)
    [all...]
  /packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
BluetoothProfileLineItem.java 36 private final CachedBluetoothDevice mCachedDevice;
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.getDevice()
    [all...]
BluetoothDetailFragment.java 48 private CachedBluetoothDevice mCachedDevice;
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.setName(mInputLineItem.getInput())
    [all...]
  /packages/apps/Settings/src/com/android/settings/bluetooth/
BluetoothDevicePreference.java 53 private final CachedBluetoothDevice mCachedDevice;
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.getConnectionSummary())
    [all...]
BluetoothDetailsProfilesController.java 55 private CachedBluetoothDevice mCachedDevice;
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.setMessagePermissionChoice(BluetoothDevice.ACCESS_ALLOWED)
    [all...]
DeviceProfilesSettings.java 63 private CachedBluetoothDevice mCachedDevice;
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 != null)
    [all...]
BluetoothDetailsController.java 41 protected final CachedBluetoothDevice mCachedDevice;
48 mCachedDevice = device;
54 mCachedDevice.unregisterCallback(this);
59 mCachedDevice.registerCallback(this);
BluetoothDetailsButtonsController.java 47 ForgetDeviceDialogFragment.newInstance(mCachedDevice.getAddress());
62 mActionButtons.setButton2Enabled(!mCachedDevice.isBusy());
65 mIsConnected = mCachedDevice.isConnected();
70 .setButton2OnClickListener(view -> mCachedDevice.disconnect())
79 view -> mCachedDevice.connect(true /* connectAllProfiles */))
BluetoothDeviceDetailsFragment.java 65 private CachedBluetoothDevice mCachedDevice;
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,
BluetoothDetailsHeaderController.java 63 .getBtClassDrawableWithDescription(mContext, mCachedDevice,
65 String summaryText = mCachedDevice.getConnectionSummary();
68 .getHearingAidPairDeviceSummary(mCachedDevice);
72 mHeaderController.setLabel(mCachedDevice.getName());
BluetoothDetailsMacAddressController.java 48 R.string.bluetooth_device_mac_address, mCachedDevice.getAddress()));
  /packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
ForgetDeviceDialogFragmentTest.java 47 private CachedBluetoothDevice mCachedDevice;
58 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
60 doReturn(mCachedDevice).when(mFragment).getDevice(any());
69 verify(mCachedDevice, never()).unpair();
76 verify(mCachedDevice).unpair();
BluetoothDetailsButtonsControllerTest.java 60 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).disconnect()
    [all...]
BluetoothDetailsControllerEventsTest.java 44 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);
RemoteDeviceNameDialogFragmentTest.java 51 private CachedBluetoothDevice mCachedDevice;
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());
BluetoothDetailsControllerTestBase.java 58 protected CachedBluetoothDevice mCachedDevice;
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());
BluetoothDetailsHeaderControllerTest.java 67 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())
BluetoothDetailsMacAddressControllerTest.java 38 new BluetoothDetailsMacAddressController(mContext, mFragment, mCachedDevice, mLifecycle);
BluetoothDeviceDetailsFragmentTest.java 59 private CachedBluetoothDevice mCachedDevice;
73 doReturn(mCachedDevice).when(mFragment).getCachedDevice(any());
75 when(mCachedDevice.getAddress()).thenReturn(deviceAddress);
BluetoothDetailsProfilesControllerTest.java 78 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.isBusy()).thenReturn(true)
    [all...]
DeviceProfilesSettingsTest.java 65 private CachedBluetoothDevice mCachedDevice;
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/
BluetoothDeviceDetailsRotationTest.java 52 private CachedBluetoothDevice mCachedDevice;
67 when(mCachedDevice.getAddress()).thenReturn(mDeviceAddress);
68 when(mCachedDevice.getName()).thenReturn("Mock Device");
74 return mCachedDevice;

Completed in 356 milliseconds