Home
last modified time | relevance | path

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

12

/packages/apps/Settings/src/com/android/settings/bluetooth/
DBluetoothDeviceUpdater.java153 public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
154 update(cachedDevice); in onDeviceAdded()
158 public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { in onDeviceDeleted() argument
162 removePreference(cachedDevice); in onDeviceDeleted()
166 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
167 update(cachedDevice); in onDeviceBondStateChanged()
171 public void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state, in onProfileConnectionStateChanged() argument
174 Log.d(TAG, "onProfileConnectionStateChanged() device: " + cachedDevice.getName() in onProfileConnectionStateChanged()
177 update(cachedDevice); in onProfileConnectionStateChanged()
181 public void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onAclConnectionStateChanged() argument
[all …]
DSavedBluetoothDeviceUpdater.java67 final CachedBluetoothDevice cachedDevice = cachedManager.findDevice(device); in forceUpdate() local
68 if (cachedDevice != null) { in forceUpdate()
69 update(cachedDevice); in forceUpdate()
81 final CachedBluetoothDevice cachedDevice = cachedManager.findDevice(device); in removePreferenceIfNecessary() local
82 if (cachedDevice != null) { in removePreferenceIfNecessary()
83 removePreference(cachedDevice); in removePreferenceIfNecessary()
90 public void update(CachedBluetoothDevice cachedDevice) { in update() argument
91 if (isFilterMatched(cachedDevice)) { in update()
93 addPreference(cachedDevice, BluetoothDevicePreference.SortType.TYPE_NO_SORT); in update()
95 removePreference(cachedDevice); in update()
[all …]
DDeviceListPreferenceFragment.java143 for (CachedBluetoothDevice cachedDevice : cachedDevices) { in addCachedDevices()
144 onDeviceAdded(cachedDevice); in addCachedDevices()
172 public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
173 if (mDevicePreferenceMap.get(cachedDevice) != null) { in onDeviceAdded()
180 if (mFilter.matches(cachedDevice.getDevice())) { in onDeviceAdded()
181 createDevicePreference(cachedDevice); in onDeviceAdded()
185 void createDevicePreference(CachedBluetoothDevice cachedDevice) { in createDevicePreference() argument
192 String key = cachedDevice.getDevice().getAddress(); in createDevicePreference()
196 preference = new BluetoothDevicePreference(getPrefContext(), cachedDevice, in createDevicePreference()
205 mDevicePreferenceMap.put(cachedDevice, preference); in createDevicePreference()
[all …]
DConnectedBluetoothDeviceUpdater.java54 public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) { in isFilterMatched() argument
69 if (isDeviceConnected(cachedDevice)) { in isFilterMatched()
75 if (cachedDevice.isConnectedHearingAidDevice()) { in isFilterMatched()
87 isFilterMatched = !cachedDevice.isConnectedA2dpDevice(); in isFilterMatched()
90 isFilterMatched = !cachedDevice.isConnectedHfpDevice(); in isFilterMatched()
95 cachedDevice.getName() + ", isFilterMatched : " + isFilterMatched); in isFilterMatched()
102 protected void addPreference(CachedBluetoothDevice cachedDevice) { in addPreference() argument
103 super.addPreference(cachedDevice); in addPreference()
104 final BluetoothDevice device = cachedDevice.getDevice(); in addPreference()
DBluetoothPairingDetail.java177 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
183 if (mSelectedDevice != null && cachedDevice != null) { in onDeviceBondStateChanged()
184 BluetoothDevice device = cachedDevice.getDevice(); in onDeviceBondStateChanged()
194 public void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state, in onProfileConnectionStateChanged() argument
201 if (cachedDevice != null && cachedDevice.isConnected()) { in onProfileConnectionStateChanged()
202 final BluetoothDevice device = cachedDevice.getDevice(); in onProfileConnectionStateChanged()
205 } else if (mDevicePreferenceMap.containsKey(cachedDevice)) { in onProfileConnectionStateChanged()
206 onDeviceDeleted(cachedDevice); in onProfileConnectionStateChanged()
DAvailableMediaBluetoothDeviceUpdater.java54 public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) { in isFilterMatched() argument
69 if (isDeviceConnected(cachedDevice)) { in isFilterMatched()
75 if (cachedDevice.isConnectedHearingAidDevice()) { in isFilterMatched()
86 isFilterMatched = cachedDevice.isConnectedA2dpDevice(); in isFilterMatched()
89 isFilterMatched = cachedDevice.isConnectedHfpDevice(); in isFilterMatched()
94 cachedDevice.getName() + ", isFilterMatched : " + isFilterMatched); in isFilterMatched()
DBluetoothPermissionRequest.java234 CachedBluetoothDevice cachedDevice = cachedDeviceManager.findDevice(mDevice); in checkUserChoice() local
235 if (cachedDevice == null) { in checkUserChoice()
236 cachedDevice = cachedDeviceManager.addDevice(mDevice); in checkUserChoice()
DDevicePickerFragment.java157 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, in onDeviceBondStateChanged() argument
159 BluetoothDevice device = cachedDevice.getDevice(); in onDeviceBondStateChanged()
DBluetoothDevicePreference.java95 public BluetoothDevicePreference(Context context, CachedBluetoothDevice cachedDevice, in BluetoothDevicePreference() argument
108 mCachedDevice = cachedDevice; in BluetoothDevicePreference()
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothBondedDevicesPreferenceController.java77 protected BluetoothDevicePreference createDevicePreference(CachedBluetoothDevice cachedDevice) { in createDevicePreference() argument
78 BluetoothDevicePreference pref = super.createDevicePreference(cachedDevice); in createDevicePreference()
90 protected void onDeviceClicked(CachedBluetoothDevice cachedDevice) { in onDeviceClicked() argument
93 BluetoothDeviceDetailsFragment.newInstance(cachedDevice)); in onDeviceClicked()
98 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
147 private void toggleBluetoothConnectivity(boolean connect, CachedBluetoothDevice cachedDevice) { in toggleBluetoothConnectivity() argument
149 cachedDevice.connect(); in toggleBluetoothConnectivity()
150 } else if (cachedDevice.isConnected()) { in toggleBluetoothConnectivity()
151 cachedDevice.disconnect(); in toggleBluetoothConnectivity()
156 CachedBluetoothDevice cachedDevice = preference.getCachedDevice(); in setButtonsCheckedAndListeners() local
[all …]
DBluetoothDevicesGroupPreferenceController.java93 protected BluetoothDevicePreference createDevicePreference(CachedBluetoothDevice cachedDevice) { in createDevicePreference() argument
94 return new BluetoothDevicePreference(getContext(), cachedDevice); in createDevicePreference()
102 protected abstract void onDeviceClicked(CachedBluetoothDevice cachedDevice); in onDeviceClicked() argument
124 for (CachedBluetoothDevice cachedDevice : cachedDevices) { in updateState()
125 if (getDeviceFilter().matches(cachedDevice.getDevice())) { in updateState()
126 addPreference(cachedDevice); in updateState()
128 removePreference(cachedDevice); in updateState()
147 public final void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
152 public final void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { in onDeviceDeleted() argument
156 private void addPreference(CachedBluetoothDevice cachedDevice) { in addPreference() argument
[all …]
DBluetoothDevicePickerPreferenceController.java91 protected void onDeviceClickedInternal(CachedBluetoothDevice cachedDevice) { in onDeviceClickedInternal() argument
92 mSelectedDevice = cachedDevice; in onDeviceClickedInternal()
93 BluetoothUtils.persistSelectedDeviceInPicker(getContext(), cachedDevice.getAddress()); in onDeviceClickedInternal()
95 if (cachedDevice.getBondState() == BluetoothDevice.BOND_BONDED || !mNeedAuth) { in onDeviceClickedInternal()
96 sendDevicePickedIntent(cachedDevice.getDevice()); in onDeviceClickedInternal()
101 if (cachedDevice.startPairing()) { in onDeviceClickedInternal()
104 BluetoothUtils.showError(getContext(), cachedDevice.getName(), in onDeviceClickedInternal()
126 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
127 super.onDeviceBondStateChanged(cachedDevice, bondState); in onDeviceBondStateChanged()
128 if (bondState == BluetoothDevice.BOND_BONDED && cachedDevice.equals(mSelectedDevice)) { in onDeviceBondStateChanged()
DBluetoothDeviceNamePreferenceController.java58 CachedBluetoothDevice cachedDevice = getCachedDevice(); in updateState() local
62 cachedDevice); in updateState()
69 if (!cachedDevice.isConnected()) { in updateState()
73 String summaryText = cachedDevice.getCarConnectionSummary(); in updateState()
79 String pairDeviceSummary = getCachedDeviceManager().getSubDeviceSummary(cachedDevice); in updateState()
83 preference.setTitle(cachedDevice.getName()); in updateState()
DBluetoothScanningDevicesGroupPreferenceController.java59 protected final void onDeviceClicked(CachedBluetoothDevice cachedDevice) { in onDeviceClicked() argument
60 LOG.d("onDeviceClicked: " + cachedDevice); in onDeviceClicked()
62 onDeviceClickedInternal(cachedDevice); in onDeviceClicked()
70 protected abstract void onDeviceClickedInternal(CachedBluetoothDevice cachedDevice); in onDeviceClickedInternal() argument
134 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
135 LOG.d("onDeviceBondStateChanged device: " + cachedDevice + " state: " + bondState); in onDeviceBondStateChanged()
DBluetoothUnbondedDevicesPreferenceController.java59 protected void onDeviceClickedInternal(CachedBluetoothDevice cachedDevice) { in onDeviceClickedInternal() argument
60 if (cachedDevice.startPairing()) { in onDeviceClickedInternal()
64 cachedDevice.getDevice().setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in onDeviceClickedInternal()
65 cachedDevice.getDevice().setMessageAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in onDeviceClickedInternal()
67 BluetoothUtils.showError(getContext(), cachedDevice.getName(), in onDeviceClickedInternal()
DBluetoothPreferenceController.java118 public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
122 public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { in onDeviceDeleted() argument
126 public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() argument
130 public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onConnectionStateChanged() argument
DBluetoothDeviceProfilePreference.java38 CachedBluetoothDevice cachedDevice) { in BluetoothDeviceProfilePreference() argument
41 mCachedDevice = cachedDevice; in BluetoothDeviceProfilePreference()
43 setTitle(profile.getNameResource(cachedDevice.getDevice())); in BluetoothDeviceProfilePreference()
DBluetoothDevicePreference.java55 public BluetoothDevicePreference(Context context, CachedBluetoothDevice cachedDevice) { in BluetoothDevicePreference() argument
57 mCachedDevice = cachedDevice; in BluetoothDevicePreference()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DDevicePickerFragmentTest.java73 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage() local
76 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage()
82 mFragment.onDeviceBondStateChanged(cachedDevice, BluetoothDevice.BOND_BONDED); in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage()
92 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in callingPackageIsNotEqualToLaunchPackage_broadcastNotSend() local
95 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in callingPackageIsNotEqualToLaunchPackage_broadcastNotSend()
101 mFragment.onDeviceBondStateChanged(cachedDevice, BluetoothDevice.BOND_BONDED); in callingPackageIsNotEqualToLaunchPackage_broadcastNotSend()
DBluetoothPairingDetailTest.java295 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in onProfileConnectionStateChanged_deviceNotInPreferenceMap_doNothing() local
305 when(cachedDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceNotInPreferenceMap_doNothing()
306 when(cachedDevice.getDevice()).thenReturn(device2); in onProfileConnectionStateChanged_deviceNotInPreferenceMap_doNothing()
307 when(cachedDevice.getAddress()).thenReturn(TEST_DEVICE_ADDRESS_B); in onProfileConnectionStateChanged_deviceNotInPreferenceMap_doNothing()
309 mFragment.onProfileConnectionStateChanged(cachedDevice, BluetoothProfile.A2DP, in onProfileConnectionStateChanged_deviceNotInPreferenceMap_doNothing()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
DBluetoothDevicesService.java199 CachedBluetoothDevice cachedDevice = in connectDevice() local
201 if (cachedDevice != null) { in connectDevice()
202 cachedDevice.connect(); in connectDevice()
209 CachedBluetoothDevice cachedDevice = in disconnectDevice() local
211 if (cachedDevice != null) { in disconnectDevice()
212 cachedDevice.disconnect(); in disconnectDevice()
DConnectedDevicesSliceProvider.java215 CachedBluetoothDevice cachedDevice = in createBluetoothDeviceSlice() local
231 if (cachedDevice != null && !cachedDevice.isBusy()) { in createBluetoothDeviceSlice()
233 boolean isConnected = AccessoryUtils.isConnected(device) && cachedDevice.isConnected(); in createBluetoothDeviceSlice()
429 CachedBluetoothDevice cachedDevice = in updateConnectedDevices() local
434 if (cachedDevice != null && cachedDevice.isConnected()) { in updateConnectedDevices()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DBluetoothUpdateWorker.java85 public void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onAclConnectionStateChanged() argument
100 public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { in onConnectionStateChanged() argument
105 public void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state, in onProfileConnectionStateChanged() argument
/packages/apps/Settings/src/com/android/settings/sound/
DAudioSwitchPreferenceController.java165 public void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state, in onProfileConnectionStateChanged() argument
175 public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { in onDeviceAdded() argument
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DBluetoothScanningDevicesGroupPreferenceControllerTest.java331 protected void onDeviceClickedInternal(CachedBluetoothDevice cachedDevice) { in onDeviceClickedInternal() argument
332 mLastClickedDevice = cachedDevice; in onDeviceClickedInternal()

12