Home
last modified time | relevance | path

Searched refs:cachedDevice (Results 1 – 13 of 13) sorted by relevance

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceManager.java56 public static boolean onDeviceDisappeared(CachedBluetoothDevice cachedDevice) { in onDeviceDisappeared() argument
57 cachedDevice.setJustDiscovered(false); in onDeviceDisappeared()
58 return cachedDevice.getBondState() == BluetoothDevice.BOND_NONE; in onDeviceDisappeared()
62 CachedBluetoothDevice cachedDevice = findDevice(device); in onDeviceNameUpdated() local
63 if (cachedDevice != null) { in onDeviceNameUpdated()
64 cachedDevice.refreshName(); in onDeviceNameUpdated()
79 for (CachedBluetoothDevice cachedDevice : mCachedDevices) { in findDevice()
80 if (cachedDevice.getDevice().equals(device)) { in findDevice()
81 return cachedDevice; in findDevice()
84 CachedBluetoothDevice subDevice = cachedDevice.getSubDevice(); in findDevice()
[all …]
DHearingAidDeviceManager.java82 CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); in getCachedDevice() local
83 if (cachedDevice.getHiSyncId() == hiSyncId) { in getCachedDevice()
84 return cachedDevice; in getCachedDevice()
93 for (CachedBluetoothDevice cachedDevice : mCachedDevices) { in updateHearingAidsDevices()
95 if (!isValidHiSyncId(cachedDevice.getHiSyncId())) { in updateHearingAidsDevices()
96 final long newHiSyncId = getHiSyncId(cachedDevice.getDevice()); in updateHearingAidsDevices()
99 cachedDevice.setHiSyncId(newHiSyncId); in updateHearingAidsDevices()
115 CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); in onHiSyncIdChanged() local
116 if (cachedDevice.getHiSyncId() != hiSyncId) { in onHiSyncIdChanged()
134 if (cachedDevice.isConnected()) { in onHiSyncIdChanged()
[all …]
DBluetoothEventManager.java181 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in readPairedDevices() local
182 if (cachedDevice == null) { in readPairedDevices()
191 void dispatchDeviceAdded(CachedBluetoothDevice cachedDevice) { in dispatchDeviceAdded() argument
194 callback.onDeviceAdded(cachedDevice); in dispatchDeviceAdded()
199 void dispatchDeviceRemoved(CachedBluetoothDevice cachedDevice) { in dispatchDeviceRemoved() argument
202 callback.onDeviceDeleted(cachedDevice); in dispatchDeviceRemoved()
216 private void dispatchConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in dispatchConnectionStateChanged() argument
219 callback.onConnectionStateChanged(cachedDevice, state); in dispatchConnectionStateChanged()
314 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in onReceive() local
315 if (cachedDevice == null) { in onReceive()
[all …]
DBluetoothCallback.java57 default void onDeviceAdded(CachedBluetoothDevice cachedDevice) {} in onDeviceAdded() argument
64 default void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {} in onDeviceDeleted() argument
76 default void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) {} in onDeviceBondStateChanged() argument
92 default void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {} in onConnectionStateChanged() argument
127 default void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, in onProfileConnectionStateChanged() argument
141 default void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onAclConnectionStateChanged() argument
DLocalBluetoothProfileManager.java270 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in onReceive() local
271 if (cachedDevice == null) { in onReceive()
273 cachedDevice = mDeviceManager.addDevice(device); in onReceive()
275 onReceiveInternal(intent, cachedDevice); in onReceive()
278 protected void onReceiveInternal(Intent intent, CachedBluetoothDevice cachedDevice) { in onReceiveInternal() argument
290 if (cachedDevice.getHiSyncId() == BluetoothHearingAid.HI_SYNC_ID_INVALID) { in onReceiveInternal()
291 long newHiSyncId = getHearingAidProfile().getHiSyncId(cachedDevice.getDevice()); in onReceiveInternal()
293 cachedDevice.setHiSyncId(newHiSyncId); in onReceiveInternal()
297 cachedDevice.onProfileStateChanged(mProfile, newState); in onReceiveInternal()
299 if (!(cachedDevice.getHiSyncId() != BluetoothHearingAid.HI_SYNC_ID_INVALID in onReceiveInternal()
[all …]
DBluetoothUtils.java65 CachedBluetoothDevice cachedDevice) { in getBtClassDrawableWithDescription() argument
66 BluetoothClass btClass = cachedDevice.getBtClass(); in getBtClassDrawableWithDescription()
96 List<LocalBluetoothProfile> profiles = cachedDevice.getProfiles(); in getBtClassDrawableWithDescription()
134 CachedBluetoothDevice cachedDevice) { in getBtRainbowDrawableWithDescription() argument
136 context, cachedDevice); in getBtRainbowDrawableWithDescription()
137 final BluetoothDevice bluetoothDevice = cachedDevice.getDevice(); in getBtRainbowDrawableWithDescription()
173 pair.first, cachedDevice.getAddress().hashCode()), pair.second); in getBtRainbowDrawableWithDescription()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DBluetoothMediaManager.java101 final CachedBluetoothDevice cachedDevice = in addConnectableA2dpDevices() local
104 if (cachedDevice == null) { in addConnectableA2dpDevices()
109 Log.d(TAG, "addConnectableA2dpDevices() device : " + cachedDevice.getName() in addConnectableA2dpDevices()
110 + ", is connected : " + cachedDevice.isConnected() in addConnectableA2dpDevices()
114 && BluetoothDevice.BOND_BONDED == cachedDevice.getBondState()) { in addConnectableA2dpDevices()
115 addMediaDevice(cachedDevice); in addConnectableA2dpDevices()
133 final CachedBluetoothDevice cachedDevice = in addConnectableHearingAidDevices() local
136 if (cachedDevice == null) { in addConnectableHearingAidDevices()
141 Log.d(TAG, "addConnectableHearingAidDevices() device : " + cachedDevice.getName() in addConnectableHearingAidDevices()
142 + ", is connected : " + cachedDevice.isConnected() in addConnectableHearingAidDevices()
[all …]
DMediaDeviceUtils.java34 public static String getId(CachedBluetoothDevice cachedDevice) { in getId() argument
35 return cachedDevice.getAddress(); in getId()
DLocalMediaManager.java116 final CachedBluetoothDevice cachedDevice = in connectDevice() local
118 if (!cachedDevice.isConnected() && !cachedDevice.isBusy()) { in connectDevice()
119 cachedDevice.connect(true); in connectDevice()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImpl.java255 public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
256 if (DEBUG) Log.d(TAG, "DeviceAdded=" + cachedDevice.getAddress()); in onDeviceAdded()
257 cachedDevice.registerCallback(this); in onDeviceAdded()
263 public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { in onDeviceDeleted() argument
264 if (DEBUG) Log.d(TAG, "DeviceDeleted=" + cachedDevice.getAddress()); in onDeviceDeleted()
265 mCachedState.remove(cachedDevice); in onDeviceDeleted()
271 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
272 if (DEBUG) Log.d(TAG, "DeviceBondStateChanged=" + cachedDevice.getAddress()); in onDeviceBondStateChanged()
273 mCachedState.remove(cachedDevice); in onDeviceBondStateChanged()
286 public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onConnectionStateChanged() argument
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/
DBluetoothMediaManagerTest.java92 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() local
97 when(mCachedDeviceManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice()
98 when(cachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice()
109 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in startScan_haveA2dpProfileDeviceIsPreferredAndBondNone_shouldNotAddDevice() local
114 when(mCachedDeviceManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in startScan_haveA2dpProfileDeviceIsPreferredAndBondNone_shouldNotAddDevice()
115 when(cachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_NONE); in startScan_haveA2dpProfileDeviceIsPreferredAndBondNone_shouldNotAddDevice()
137 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in startScan_haveHapProfileDeviceIsPreferredAndBonded_shouldAddDevice() local
142 when(mCachedDeviceManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in startScan_haveHapProfileDeviceIsPreferredAndBonded_shouldAddDevice()
143 when(cachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in startScan_haveHapProfileDeviceIsPreferredAndBonded_shouldAddDevice()
165 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in starScan_a2dpAndHapProfileNotReady_shouldRegisterCallback() local
[all …]
DLocalMediaManagerTest.java119 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice() local
123 when(((BluetoothMediaDevice) device).getCachedDevice()).thenReturn(cachedDevice); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice()
124 when(cachedDevice.isConnected()).thenReturn(false); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice()
125 when(cachedDevice.isBusy()).thenReturn(false); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice()
130 verify(cachedDevice).connect(true); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyboard/
DKeyboardUI.java320 CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(d); in getCachedBluetoothDevice() local
321 if (cachedDevice == null) { in getCachedBluetoothDevice()
322 cachedDevice = mCachedDeviceManager.addDevice(d); in getCachedBluetoothDevice()
324 return cachedDevice; in getCachedBluetoothDevice()
497 CachedBluetoothDevice cachedDevice = getCachedBluetoothDevice(d); in handleMessage() local
498 onDeviceAddedInternal(cachedDevice); in handleMessage()
598 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
600 bondState, 0, cachedDevice).sendToTarget(); in onDeviceBondStateChanged()