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.java179 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in readPairedDevices() local
180 if (cachedDevice == null) { in readPairedDevices()
189 void dispatchDeviceAdded(CachedBluetoothDevice cachedDevice) { in dispatchDeviceAdded() argument
191 callback.onDeviceAdded(cachedDevice); in dispatchDeviceAdded()
195 void dispatchDeviceRemoved(CachedBluetoothDevice cachedDevice) { in dispatchDeviceRemoved() argument
197 callback.onDeviceDeleted(cachedDevice); in dispatchDeviceRemoved()
208 private void dispatchConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in dispatchConnectionStateChanged() argument
210 callback.onConnectionStateChanged(cachedDevice, state); in dispatchConnectionStateChanged()
292 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in onReceive() local
293 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.java271 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in onReceive() local
272 if (cachedDevice == null) { in onReceive()
274 cachedDevice = mDeviceManager.addDevice(device); in onReceive()
276 onReceiveInternal(intent, cachedDevice); in onReceive()
279 protected void onReceiveInternal(Intent intent, CachedBluetoothDevice cachedDevice) { in onReceiveInternal() argument
291 if (cachedDevice.getHiSyncId() == BluetoothHearingAid.HI_SYNC_ID_INVALID) { in onReceiveInternal()
292 long newHiSyncId = getHearingAidProfile().getHiSyncId(cachedDevice.getDevice()); in onReceiveInternal()
294 cachedDevice.setHiSyncId(newHiSyncId); in onReceiveInternal()
298 cachedDevice.onProfileStateChanged(mProfile, newState); in onReceiveInternal()
300 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(); in connectDevice()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImpl.java312 public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
313 if (DEBUG) Log.d(TAG, "DeviceAdded=" + cachedDevice.getAddress()); in onDeviceAdded()
314 cachedDevice.registerCallback(this); in onDeviceAdded()
320 public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { in onDeviceDeleted() argument
321 if (DEBUG) Log.d(TAG, "DeviceDeleted=" + cachedDevice.getAddress()); in onDeviceDeleted()
322 mCachedState.remove(cachedDevice); in onDeviceDeleted()
328 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
329 if (DEBUG) Log.d(TAG, "DeviceBondStateChanged=" + cachedDevice.getAddress()); in onDeviceBondStateChanged()
330 mCachedState.remove(cachedDevice); in onDeviceBondStateChanged()
343 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(); 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()