Home
last modified time | relevance | path

Searched refs:CachedBluetoothDevice (Results 1 – 25 of 41) sorted by relevance

12

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceManager.java41 final List<CachedBluetoothDevice> mCachedDevices = new ArrayList<CachedBluetoothDevice>();
51 public synchronized Collection<CachedBluetoothDevice> getCachedDevicesCopy() { in getCachedDevicesCopy()
55 public static boolean onDeviceDisappeared(CachedBluetoothDevice cachedDevice) { in onDeviceDisappeared()
61 CachedBluetoothDevice cachedDevice = findDevice(device); in onDeviceNameUpdated()
77 public synchronized CachedBluetoothDevice findDevice(BluetoothDevice device) { in findDevice()
78 for (CachedBluetoothDevice cachedDevice : mCachedDevices) { in findDevice()
83 CachedBluetoothDevice subDevice = cachedDevice.getSubDevice(); in findDevice()
98 public CachedBluetoothDevice addDevice(BluetoothDevice device) { in addDevice()
99 CachedBluetoothDevice newDevice; in addDevice()
104 newDevice = new CachedBluetoothDevice(mContext, profileManager, device); in addDevice()
[all …]
DHearingAidDeviceManager.java37 private final List<CachedBluetoothDevice> mCachedDevices;
39 List<CachedBluetoothDevice> CachedDevices) { in HearingAidDeviceManager()
44 void initHearingAidDeviceIfNeeded(CachedBluetoothDevice newDevice) { in initHearingAidDeviceIfNeeded()
61 boolean setSubDeviceIfNeeded(CachedBluetoothDevice newDevice) { in setSubDeviceIfNeeded()
64 final CachedBluetoothDevice hearingAidDevice = getCachedDevice(hiSyncId); in setSubDeviceIfNeeded()
80 private CachedBluetoothDevice getCachedDevice(long hiSyncId) { in getCachedDevice()
82 CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); in getCachedDevice()
93 for (CachedBluetoothDevice cachedDevice : mCachedDevices) { in updateHearingAidsDevices()
115 CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); in onHiSyncIdChanged()
126 CachedBluetoothDevice subDevice; in onHiSyncIdChanged()
[all …]
DBluetoothCallback.java57 default void onDeviceAdded(CachedBluetoothDevice cachedDevice) {} in onDeviceAdded()
64 default void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {} in onDeviceDeleted()
76 default void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) {} in onDeviceBondStateChanged()
92 default void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {} in onConnectionStateChanged()
104 default void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {} in onActiveDeviceChanged()
127 default void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, in onProfileConnectionStateChanged()
141 default void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onAclConnectionStateChanged()
DBluetoothEventManager.java180 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in readPairedDevices()
190 void dispatchDeviceAdded(CachedBluetoothDevice cachedDevice) { in dispatchDeviceAdded()
196 void dispatchDeviceRemoved(CachedBluetoothDevice cachedDevice) { in dispatchDeviceRemoved()
202 void dispatchProfileConnectionStateChanged(CachedBluetoothDevice device, int state, in dispatchProfileConnectionStateChanged()
209 private void dispatchConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in dispatchConnectionStateChanged()
216 for (CachedBluetoothDevice cachedDevice : mDeviceManager.getCachedDevicesCopy()) { in dispatchAudioModeChanged()
225 void dispatchActiveDeviceChanged(CachedBluetoothDevice activeDevice, in dispatchActiveDeviceChanged()
227 for (CachedBluetoothDevice cachedDevice : mDeviceManager.getCachedDevicesCopy()) { in dispatchActiveDeviceChanged()
236 private void dispatchAclStateChanged(CachedBluetoothDevice activeDevice, int state) { in dispatchAclStateChanged()
299 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in onReceive()
[all …]
DPbapClientProfile.java66 CachedBluetoothDevice device = mDeviceManager.findDevice(nextDevice); in onServiceConnected()
84 Collection<CachedBluetoothDevice> cachedDevices = mDeviceManager.getCachedDevicesCopy(); in refreshProfiles()
85 for (CachedBluetoothDevice device : cachedDevices) { in refreshProfiles()
DCachedBluetoothDevice.java61 public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> { class
110 private CachedBluetoothDevice mSubDevice;
136 CachedBluetoothDevice(Context context, LocalBluetoothProfileManager profileManager, in CachedBluetoothDevice() method in CachedBluetoothDevice
797 if ((o == null) || !(o instanceof CachedBluetoothDevice)) { in equals()
800 return mDevice.equals(((CachedBluetoothDevice) o).mDevice); in equals()
811 public int compareTo(CachedBluetoothDevice another) { in compareTo()
1196 public CachedBluetoothDevice getSubDevice() { in getSubDevice()
1200 public void setSubDevice(CachedBluetoothDevice subDevice) { in setSubDevice()
DBluetoothUtils.java74 CachedBluetoothDevice cachedDevice) { in getBtClassDrawableWithDescription()
143 CachedBluetoothDevice cachedDevice) { in getBtRainbowDrawableWithDescription()
181 CachedBluetoothDevice cachedDevice) { in getBtDrawableWithDescription()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceManagerTest.java78 private CachedBluetoothDevice mCachedDevice1;
79 private CachedBluetoothDevice mCachedDevice2;
80 private CachedBluetoothDevice mCachedDevice3;
111 mCachedDevice1 = spy(new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice1)); in setUp()
112 mCachedDevice2 = spy(new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice2)); in setUp()
113 mCachedDevice3 = spy(new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice3)); in setUp()
121 CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1); in addDevice_validCachedDevices_devicesAdded()
123 CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2); in addDevice_validCachedDevices_devicesAdded()
126 Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy(); in addDevice_validCachedDevices_devicesAdded()
141 CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1); in addDevice_sameHiSyncId_validSubDevice()
[all …]
DCachedBluetoothDeviceTest.java80 private CachedBluetoothDevice mCachedDevice;
97 mCachedDevice = spy(new CachedBluetoothDevice(mContext, mProfileManager, mDevice)); in setUp()
718 CachedBluetoothDevice cachedBluetoothDevice = in deviceName_testAliasNameAvailable()
719 new CachedBluetoothDevice(mContext, mProfileManager, mDevice); in deviceName_testAliasNameAvailable()
728 CachedBluetoothDevice cachedBluetoothDevice = in deviceName_testNameNotAvailable()
729 new CachedBluetoothDevice(mContext, mProfileManager, mDevice); in deviceName_testNameNotAvailable()
745 CachedBluetoothDevice cachedBluetoothDevice = in deviceName_testRenameDevice()
746 new CachedBluetoothDevice(mContext, mProfileManager, mDevice); in deviceName_testRenameDevice()
907 CachedBluetoothDevice subCachedDevice = new CachedBluetoothDevice(mContext, mProfileManager, in getSubDevice_setSubDevice()
916 CachedBluetoothDevice subCachedDevice = new CachedBluetoothDevice(mContext, mProfileManager, in switchSubDeviceContent()
DBluetoothEventManagerTest.java63 private CachedBluetoothDevice mCachedBluetoothDevice;
84 private CachedBluetoothDevice mCachedDevice1;
85 private CachedBluetoothDevice mCachedDevice2;
99 mCachedDevice1 = new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice1); in setUp()
100 mCachedDevice2 = new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice2); in setUp()
235 final List<CachedBluetoothDevice> cachedDevices = new ArrayList<>(); in dispatchActiveDeviceChanged_connectedDevices_activeDeviceChanged()
301 final List<CachedBluetoothDevice> cachedDevices = new ArrayList<>(); in dispatchActiveDeviceChanged_withA2dpAndHearingAid()
DHearingAidDeviceManagerTest.java64 private CachedBluetoothDevice mCachedDevice1;
65 private CachedBluetoothDevice mCachedDevice2;
89 mCachedDevice1 = spy(new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice1)); in setUp()
90 mCachedDevice2 = spy(new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice2)); in setUp()
DHearingAidProfileTest.java51 private CachedBluetoothDevice mCachedBluetoothDevice;
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothController.java19 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
38 Collection<CachedBluetoothDevice> getDevices(); in getDevices()
39 void connect(CachedBluetoothDevice device); in connect()
40 void disconnect(CachedBluetoothDevice device); in disconnect()
43 int getMaxConnectionState(CachedBluetoothDevice device); in getMaxConnectionState()
44 int getBondState(CachedBluetoothDevice device); in getBondState()
45 List<CachedBluetoothDevice> getConnectedDevices(); in getConnectedDevices()
DBluetoothControllerImpl.java36 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
59 CachedBluetoothDevice.Callback, LocalBluetoothProfileManager.ServiceListener {
67 private final WeakHashMap<CachedBluetoothDevice, ActuallyCachedState> mCachedState =
71 private final List<CachedBluetoothDevice> mConnectedDevices = new ArrayList<>();
126 for (CachedBluetoothDevice device : getDevices()) { in dump()
145 private String getDeviceString(CachedBluetoothDevice device) { in getDeviceString()
150 public int getBondState(CachedBluetoothDevice device) { in getBondState()
155 public List<CachedBluetoothDevice> getConnectedDevices() { in getConnectedDevices()
156 List<CachedBluetoothDevice> out; in getConnectedDevices()
164 public int getMaxConnectionState(CachedBluetoothDevice device) { in getMaxConnectionState()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/
DFakeBluetoothController.java19 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
80 public Collection<CachedBluetoothDevice> getDevices() { in getDevices()
85 public void connect(CachedBluetoothDevice device) { in connect()
90 public void disconnect(CachedBluetoothDevice device) { in disconnect()
100 public int getMaxConnectionState(CachedBluetoothDevice device) { in getMaxConnectionState()
105 public int getBondState(CachedBluetoothDevice device) { in getBondState()
110 public List<CachedBluetoothDevice> getConnectedDevices() { in getConnectedDevices()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImplTest.java37 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
65 private List<CachedBluetoothDevice> mDevices;
91 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testNoConnectionWithDevices()
104 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testDefaultConnectionState()
112 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testAsyncBondState()
128 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testAsyncConnectionState()
146 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testNullAsync_DoesNotCrash()
199 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testOnACLConnectionStateChange_updatesBluetoothStateOnConnection()
218 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testOnActiveDeviceChanged_updatesAudioActive()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DBluetoothMediaDevice.java28 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
37 private CachedBluetoothDevice mCachedDevice;
39 BluetoothMediaDevice(Context context, CachedBluetoothDevice device, in BluetoothMediaDevice()
81 public CachedBluetoothDevice getCachedDevice() { in getCachedDevice()
DMediaDeviceUtils.java21 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
33 public static String getId(CachedBluetoothDevice cachedDevice) { in getId()
DLocalMediaManager.java36 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
164 final CachedBluetoothDevice cachedDevice = in connectDevice()
440 private boolean isActiveDevice(CachedBluetoothDevice device) { in isActiveDevice()
521 final List<CachedBluetoothDevice> cachedBluetoothDeviceList = new ArrayList<>(); in buildDisconnectedBluetoothDevice()
524 final CachedBluetoothDevice cachedDevice = in buildDisconnectedBluetoothDevice()
541 for (CachedBluetoothDevice cachedDevice : cachedBluetoothDeviceList) { in buildDisconnectedBluetoothDevice()
553 private boolean isA2dpOrHearingAidDevice(CachedBluetoothDevice device) { in isA2dpOrHearingAidDevice()
673 class DeviceAttributeChangeCallback implements CachedBluetoothDevice.Callback {
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyboard/
DKeyboardUI.java47 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
245 CachedBluetoothDevice device = getPairedKeyboard(); in processKeyboardState()
302 private CachedBluetoothDevice getPairedKeyboard() { in getPairedKeyboard()
312 private CachedBluetoothDevice getDiscoveredKeyboard() { in getDiscoveredKeyboard()
313 Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy(); in getDiscoveredKeyboard()
314 for (CachedBluetoothDevice d : devices) { in getDiscoveredKeyboard()
323 private CachedBluetoothDevice getCachedBluetoothDevice(BluetoothDevice d) { in getCachedBluetoothDevice()
324 CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(d); in getCachedBluetoothDevice()
371 private void onDeviceAddedInternal(CachedBluetoothDevice d) { in onDeviceAddedInternal()
387 private void onDeviceBondStateChangedInternal(CachedBluetoothDevice d, int bondState) { in onDeviceBondStateChangedInternal()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DBluetoothTile.java40 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
199 List<CachedBluetoothDevice> connectedDevices = mController.getConnectedDevices(); in getSecondaryLabel()
209 CachedBluetoothDevice lastDevice = connectedDevices.get(0); in getSecondaryLabel()
391 final Collection<CachedBluetoothDevice> devices = mController.getDevices(); in updateItems()
395 for (CachedBluetoothDevice device : devices) { in updateItems()
434 final CachedBluetoothDevice device = (CachedBluetoothDevice) item.tag; in onDetailItemClick()
444 final CachedBluetoothDevice device = (CachedBluetoothDevice) item.tag; in onDetailItemDisconnect()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/
DLocalMediaManagerTest.java41 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
180 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice()
496 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in onDeviceAttributesChanged_failingTransferring_shouldResetState()
571 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in onDeviceListAdded_haveDisconnectedDevice_addDisconnectedDevice()
604 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in onDeviceListAdded_transferToDisconnectedBluetooth_verifyConnectDevice()
660 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in onDeviceListAdded_haveDisconnectedDevice_list5DisconnectedDevice()
740 final CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class); in updateCurrentConnectedDevice_bluetoothDeviceIsActive_returnBluetoothDevice()
741 final CachedBluetoothDevice cachedDevice2 = mock(CachedBluetoothDevice.class); in updateCurrentConnectedDevice_bluetoothDeviceIsActive_returnBluetoothDevice()
768 final CachedBluetoothDevice cachedDevice1 = mock(CachedBluetoothDevice.class); in updateCurrentConnectedDevice_phoneDeviceIsActive_returnPhoneDevice()
769 final CachedBluetoothDevice cachedDevice2 = mock(CachedBluetoothDevice.class); in updateCurrentConnectedDevice_phoneDeviceIsActive_returnPhoneDevice()
DMediaDeviceUtilsTest.java26 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
42 private CachedBluetoothDevice mCachedDevice;
DBluetoothMediaDeviceTest.java29 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
43 private CachedBluetoothDevice mDevice;
DMediaDeviceTest.java36 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
79 private CachedBluetoothDevice mCachedDevice1;
81 private CachedBluetoothDevice mCachedDevice2;
83 private CachedBluetoothDevice mCachedDevice3;

12