Home
last modified time | relevance | path

Searched refs:deviceId (Results 1 – 25 of 70) sorted by relevance

123

/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/
DConnectedDeviceManager.java362 public void removeActiveUserAssociatedDevice(@NonNull String deviceId) { in removeActiveUserAssociatedDevice() argument
363 mStorage.removeAssociatedDeviceForActiveUser(deviceId); in removeActiveUserAssociatedDevice()
364 disconnectDevice(deviceId); in removeActiveUserAssociatedDevice()
372 public void enableAssociatedDeviceConnection(@NonNull String deviceId) { in enableAssociatedDeviceConnection() argument
373 logd(TAG, "enableAssociatedDeviceConnection() called on " + deviceId); in enableAssociatedDeviceConnection()
374 mStorage.updateAssociatedDeviceConnectionEnabled(deviceId, in enableAssociatedDeviceConnection()
384 public void disableAssociatedDeviceConnection(@NonNull String deviceId) { in disableAssociatedDeviceConnection() argument
385 logd(TAG, "disableAssociatedDeviceConnection() called on " + deviceId); in disableAssociatedDeviceConnection()
386 mStorage.updateAssociatedDeviceConnectionEnabled(deviceId, in disableAssociatedDeviceConnection()
388 disconnectDevice(deviceId); in disableAssociatedDeviceConnection()
[all …]
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/
DConnectedDeviceManagerTest.java126 String deviceId = connectNewDevice(mMockCentralManager); in getActiveUserConnectedDevices_includesNewlyConnectedDevice() local
129 ConnectedDevice expectedDevice = new ConnectedDevice(deviceId, /* deviceName = */ null, in getActiveUserConnectedDevices_includesNewlyConnectedDevice()
136 String deviceId = UUID.randomUUID().toString(); in getActiveUserConnectedDevices_excludesDevicesNotBelongingToActiveUser() local
140 mConnectedDeviceManager.addConnectedDevice(deviceId, mMockCentralManager); in getActiveUserConnectedDevices_excludesDevicesNotBelongingToActiveUser()
146 String deviceId = connectNewDevice(mMockCentralManager); in getActiveUserConnectedDevices_reflectsSecureChannelEstablished() local
147 mConnectedDeviceManager.onSecureChannelEstablished(deviceId, mMockCentralManager); in getActiveUserConnectedDevices_reflectsSecureChannelEstablished()
155 String deviceId = connectNewDevice(mMockCentralManager); in getActiveUserConnectedDevices_excludesDisconnectedDevice() local
156 mConnectedDeviceManager.removeConnectedDevice(deviceId, mMockCentralManager); in getActiveUserConnectedDevices_excludesDisconnectedDevice()
162 String deviceId = connectNewDevice(mMockCentralManager); in getActiveUserConnectedDevices_unaffectedByOtherManagerDisconnect() local
163 mConnectedDeviceManager.removeConnectedDevice(deviceId, mMockPeripheralManager); in getActiveUserConnectedDevices_unaffectedByOtherManagerDisconnect()
[all …]
/packages/apps/TV/jni/
Dtunertvinput_jni.cpp41 JNIEnv *, jobject, jlong deviceId) { in Java_com_android_tv_tuner_TunerHal_nativeFinalize() argument
42 std::map<jlong, DvbManager *>::iterator it = sDvbManagers.find(deviceId); in Java_com_android_tv_tuner_TunerHal_nativeFinalize()
56 JNIEnv *env, jobject thiz, jlong deviceId, jint frequency, in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I() argument
58 std::map<jlong, DvbManager *>::iterator it = sDvbManagers.find(deviceId); in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I()
62 sDvbManagers.insert(std::pair<jlong, DvbManager *>(deviceId, dvbManager)); in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I()
78 JNIEnv *env, jobject thiz, jlong deviceId, jint deliverySystemType, in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I() argument
80 std::map<jlong, DvbManager *>::iterator it = sDvbManagers.find(deviceId); in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I()
85 std::pair<jlong, DvbManager *>(deviceId, dvbManager)); in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I()
101 jlong deviceId) { in Java_com_android_tv_tuner_TunerHal_nativeCloseAllPidFilters() argument
102 std::map<jlong, DvbManager *>::iterator it = sDvbManagers.find(deviceId); in Java_com_android_tv_tuner_TunerHal_nativeCloseAllPidFilters()
[all …]
/packages/apps/TV/tuner/tests/unittests/javatests/com/android/tv/tuner/
DFileTunerHal.java99 protected void nativeFinalize(long deviceId) { in nativeFinalize() argument
100 if (deviceId != DEVICE_ID) { in nativeFinalize()
108 long deviceId, int frequency, @ModulationType String modulation, int timeoutMs) { in nativeTune() argument
109 if (deviceId != DEVICE_ID) { in nativeTune()
142 protected void nativeAddPidFilter(long deviceId, int pid, @FilterType int filterType) { in nativeAddPidFilter() argument
143 if (deviceId != DEVICE_ID) { in nativeAddPidFilter()
150 protected void nativeCloseAllPidFilters(long deviceId) { in nativeCloseAllPidFilters() argument
151 if (deviceId != DEVICE_ID) { in nativeCloseAllPidFilters()
158 protected void nativeStopTune(long deviceId) { in nativeStopTune() argument
159 if (deviceId != DEVICE_ID) { in nativeStopTune()
[all …]
DFakeTunerHal.java50 protected void nativeFinalize(long deviceId) {} in nativeFinalize() argument
54 long deviceId, int frequency, @ModulationType String modulation, int timeoutMs) { in nativeTune() argument
59 protected void nativeAddPidFilter(long deviceId, int pid, @FilterType int filterType) {} in nativeAddPidFilter() argument
62 protected void nativeCloseAllPidFilters(long deviceId) {} in nativeCloseAllPidFilters() argument
65 protected void nativeStopTune(long deviceId) {} in nativeStopTune() argument
68 protected int nativeWriteInBuffer(long deviceId, byte[] javaBuffer, int javaBufferSize) { in nativeWriteInBuffer() argument
73 protected void nativeSetHasPendingTune(long deviceId, boolean hasPendingTune) {} in nativeSetHasPendingTune() argument
76 protected int nativeGetDeliverySystemType(long deviceId) { in nativeGetDeliverySystemType() argument
/packages/apps/TV/tuner/src/com/android/tv/tuner/hdhomerun/
DHdHomeRunInterface.java46 public static Set<HdHomeRunDevice> scanDevices(Integer deviceId) { in scanDevices() argument
48 if (deviceId != null) { in scanDevices()
51 0, HdHomeRunUtils.HDHOMERUN_DEVICE_TYPE_TUNER, deviceId, 1); in scanDevices()
53 Log.i(TAG, "Can't find device with ID: " + deviceId); in scanDevices()
102 public static boolean isDeviceAvailable(int deviceId, int deviceIp, int tunerIndex) { in isDeviceAvailable() argument
104 if ((deviceId == 0) && (deviceIp == 0)) { in isDeviceAvailable()
110 if ((deviceId == 0) || (deviceId == HdHomeRunUtils.HDHOMERUN_DEVICE_ID_WILDCARD)) { in isDeviceAvailable()
112 new HdHomeRunControlSocket(deviceId, deviceIp)) { in isDeviceAvailable()
113 deviceId = controlSock.getDeviceId(); in isDeviceAvailable()
116 return deviceId != 0; in isDeviceAvailable()
[all …]
DHdHomeRunDiscover.java69 int targetIp, int deviceType, int deviceId, int maxCount) { in findDevices() argument
75 int localIpSent = send(targetIp, deviceType, deviceId); in findDevices()
93 if (deviceId != HdHomeRunUtils.HDHOMERUN_DEVICE_ID_WILDCARD in findDevices()
94 && deviceId != result.mDeviceId) { in findDevices()
97 if (isObsoleteDevice(deviceId)) { in findDevices()
196 private int send(int targetIp, int deviceType, int deviceId) { in send() argument
198 ? sendWildcardIp(deviceType, deviceId) in send()
199 : sendTargetIp(targetIp, deviceType, deviceId); in send()
202 private int sendWildcardIp(int deviceType, int deviceId) { in sendWildcardIp() argument
211 localIpSent += discoverSocket.send(targetIp, deviceType, deviceId) ? 1 : 0; in sendWildcardIp()
[all …]
/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/ble/
DCarBleManager.java91 public void sendMessage(@NonNull String deviceId, @NonNull DeviceMessage message) { in sendMessage() argument
92 BleDevice device = getConnectedDevice(deviceId); in sendMessage()
108 String deviceId = device.mDeviceId; in sendMessage() local
109 if (deviceId == null) { in sendMessage()
110 deviceId = "Unidentified device"; in sendMessage()
113 logd(TAG, "Writing " + message.getMessage().length + " bytes to " + deviceId + "."); in sendMessage()
158 BleDevice getConnectedDevice(@NonNull String deviceId) { in getConnectedDevice() argument
160 if (deviceId.equals(device.mDeviceId)) { in getConnectedDevice()
184 public abstract void disconnectDevice(@NonNull String deviceId); in disconnectDevice() argument
222 void onDeviceConnected(@NonNull String deviceId); in onDeviceConnected() argument
[all …]
DCarBlePeripheralManager.java159 public void disconnectDevice(@NonNull String deviceId) { in disconnectDevice() argument
161 if (connectedDevice == null || !deviceId.equals(connectedDevice.mDeviceId)) { in disconnectDevice()
177 public void connectToDevice(@NonNull UUID deviceId, int timeoutSeconds) { in connectToDevice() argument
179 if (UUID.fromString(device.mDeviceId).equals(deviceId)) { in connectToDevice()
180 logd(TAG, "Already connected to device " + deviceId + "."); in connectToDevice()
195 logd(TAG, "Successfully started advertising for device " + deviceId in connectToDevice()
202 startAdvertising(deviceId, mAdvertiseCallback, /* includeDeviceName = */ false); in connectToDevice()
323 private void setDeviceId(@NonNull String deviceId) { in setDeviceId() argument
324 logd(TAG, "Setting device id: " + deviceId); in setDeviceId()
331 connectedDevice.mDeviceId = deviceId; in setDeviceId()
[all …]
/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/storage/
DConnectedDeviceStorage.java119 public byte[] getEncryptionKey(@NonNull String deviceId) { in getEncryptionKey() argument
121 mAssociatedDeviceDatabase.getAssociatedDeviceKey(deviceId); in getEncryptionKey()
144 public void saveEncryptionKey(@NonNull String deviceId, @NonNull byte[] encryptionKey) { in saveEncryptionKey() argument
146 AssociatedDeviceKeyEntity entity = new AssociatedDeviceKeyEntity(deviceId, encryptedKey); in saveEncryptionKey()
405 public void updateAssociatedDeviceName(@NonNull String deviceId, @NonNull String name) { in updateAssociatedDeviceName() argument
406 AssociatedDeviceEntity entity = mAssociatedDeviceDatabase.getAssociatedDevice(deviceId); in updateAssociatedDeviceName()
408 logw(TAG, "Attempt to update name on an unrecognized device " + deviceId in updateAssociatedDeviceName()
415 mAssociatedDeviceCallback.onAssociatedDeviceUpdated(new AssociatedDevice(deviceId, in updateAssociatedDeviceName()
426 public void removeAssociatedDevice(int userId, @NonNull String deviceId) { in removeAssociatedDevice() argument
427 AssociatedDeviceEntity entity = mAssociatedDeviceDatabase.getAssociatedDevice(deviceId); in removeAssociatedDevice()
[all …]
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/feature/
DLocalFeature.java99 public void sendMessageSecurely(@NonNull String deviceId, @NonNull byte[] message) { in sendMessageSecurely() argument
100 ConnectedDevice device = getConnectedDeviceById(deviceId); in sendMessageSecurely()
102 loge(TAG, "No matching device found with id " + deviceId + " when trying to send " in sendMessageSecurely()
104 onMessageFailedToSend(deviceId, message); in sendMessageSecurely()
117 public void sendMessageUnsecurely(@NonNull String deviceId, @NonNull byte[] message) { in sendMessageUnsecurely() argument
118 ConnectedDevice device = getConnectedDeviceById(deviceId); in sendMessageUnsecurely()
120 loge(TAG, "No matching device found with id " + deviceId + " when trying to send " in sendMessageUnsecurely()
122 onMessageFailedToSend(deviceId, message); in sendMessageUnsecurely()
139 public ConnectedDevice getConnectedDeviceById(@NonNull String deviceId) { in getConnectedDeviceById() argument
144 if (device.getDeviceId().equals(deviceId)) { in getConnectedDeviceById()
[all …]
DRemoteFeature.java111 public void sendMessageSecurely(@NonNull String deviceId, @NonNull byte[] message) { in sendMessageSecurely() argument
112 CompanionDevice device = getConnectedDeviceById(deviceId); in sendMessageSecurely()
114 loge(TAG, "No matching device found with id " + deviceId + " when trying to send " in sendMessageSecurely()
116 onMessageFailedToSend(deviceId, message, false); in sendMessageSecurely()
134 public void sendMessageUnsecurely(@NonNull String deviceId, @NonNull byte[] message) { in sendMessageUnsecurely() argument
135 CompanionDevice device = getConnectedDeviceById(deviceId); in sendMessageUnsecurely()
137 loge(TAG, "No matching device found with id " + deviceId + " when trying to send " in sendMessageUnsecurely()
139 onMessageFailedToSend(deviceId, message, false); in sendMessageUnsecurely()
159 public CompanionDevice getConnectedDeviceById(@NonNull String deviceId) { in getConnectedDeviceById() argument
169 if (device.getDeviceId().equals(deviceId)) { in getConnectedDeviceById()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/
DTunerHal.java88 protected native void nativeFinalize(long deviceId); in nativeFinalize() argument
190 long deviceId, int frequency, in nativeTune() argument
194 long deviceId, int deliverySystemType, int frequency, in nativeTune() argument
217 protected native void nativeAddPidFilter(long deviceId, int pid, @FilterType int filterType); in nativeAddPidFilter() argument
219 protected native void nativeCloseAllPidFilters(long deviceId); in nativeCloseAllPidFilters() argument
221 protected native void nativeSetHasPendingTune(long deviceId, boolean hasPendingTune); in nativeSetHasPendingTune() argument
223 protected native int nativeGetDeliverySystemType(long deviceId); in nativeGetDeliverySystemType() argument
225 protected native int[] nativeGetDeliverySystemTypes(long deviceId); in nativeGetDeliverySystemTypes() argument
227 protected native int nativeGetSignalStrength(long deviceId); in nativeGetSignalStrength() argument
261 protected native void nativeStopTune(long deviceId); in nativeStopTune() argument
[all …]
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/feature/notificationmsg/
DNotificationMsgFeature.java112 protected void sendData(@NonNull String deviceId, @NonNull byte[] message) { in sendData() argument
113 if (mSecureDeviceForActiveUser == null || !isSecureDeviceForActiveUser(deviceId)) { in sendData()
114 logw(TAG, "Could not send message to device: " + deviceId); in sendData()
118 sendMessageSecurely(deviceId, message); in sendData()
122 protected void onMessageFailedToSend(String deviceId, byte[] message, boolean isTransient) { in onMessageFailedToSend() argument
126 private boolean isSecureDeviceForActiveUser(String deviceId) { in isSecureDeviceForActiveUser() argument
128 && mSecureDeviceForActiveUser.getDeviceId().equals(deviceId); in isSecureDeviceForActiveUser()
/packages/services/Car/service/src/com/android/car/trust/
DCarTrustedDeviceService.java248 byte[] getEncryptionKey(String deviceId) { in getEncryptionKey() argument
250 String key = PREF_ENCRYPTION_KEY_PREFIX + deviceId; in getEncryptionKey()
274 boolean saveEncryptionKey(@Nullable String deviceId, @Nullable byte[] encryptionKey) { in saveEncryptionKey() argument
275 if (encryptionKey == null || deviceId == null) { in saveEncryptionKey()
282 if (getSharedPrefs().contains(deviceId)) { in saveEncryptionKey()
283 clearEncryptionKey(deviceId); in saveEncryptionKey()
288 .putString(PREF_ENCRYPTION_KEY_PREFIX + deviceId, encryptedKey) in saveEncryptionKey()
297 void clearEncryptionKey(@Nullable String deviceId) { in clearEncryptionKey() argument
298 if (deviceId == null) { in clearEncryptionKey()
301 getSharedPrefs().edit().remove(deviceId); in clearEncryptionKey()
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/api/internal/association/
DAssociationBinder.java122 public void removeAssociatedDevice(String deviceId) { in removeAssociatedDevice() argument
123 mConnectedDeviceManager.removeActiveUserAssociatedDevice(deviceId); in removeAssociatedDevice()
237 public void enableAssociatedDeviceConnection(String deviceId) { in enableAssociatedDeviceConnection() argument
238 mConnectedDeviceManager.enableAssociatedDeviceConnection(deviceId); in enableAssociatedDeviceConnection()
242 public void disableAssociatedDeviceConnection(String deviceId) { in disableAssociatedDeviceConnection() argument
243 mConnectedDeviceManager.disableAssociatedDeviceConnection(deviceId); in disableAssociatedDeviceConnection()
304 public void onAssociationCompleted(String deviceId) {
307 "onAssociationCompleted, deviceId: " + deviceId);
/packages/apps/Car/libs/car-messenger-common/src/com/android/car/messenger/common/
DMessage.java70 public static Message parseFromMessage(String deviceId, in parseFromMessage() argument
84 deviceId, in parseFromMessage()
94 private Message(String senderName, String deviceId, String messageText, long receiveTime, in Message() argument
98 boolean missingDeviceId = (deviceId == null); in Message()
122 this.mDeviceId = deviceId; in Message()
130 this.mSenderKey = new SenderKey(deviceId, senderName, senderKeyMetadata); in Message()
DConversationNotificationInfo.java66 @NonNull String deviceName, @NonNull String deviceId, in createConversationNotificationInfo() argument
80 return new ConversationNotificationInfo(deviceName, deviceId, in createConversationNotificationInfo()
88 private ConversationNotificationInfo(@Nullable String deviceName, String deviceId, in ConversationNotificationInfo() argument
92 boolean missingDeviceId = (deviceId == null); in ConversationNotificationInfo()
105 this.mDeviceId = deviceId; in ConversationNotificationInfo()
DCompositeKey.java30 protected CompositeKey(String deviceId, String subKey) { in CompositeKey() argument
31 mDeviceId = deviceId; in CompositeKey()
56 public boolean matches(String deviceId) { in matches() argument
57 return mDeviceId.equals(deviceId); in matches()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/inputmethod/
DGameControllerPreferenceController.java72 for (int deviceId : devices) { in getAvailabilityStatus()
73 InputDevice device = mIm.getInputDevice(deviceId); in getAvailabilityStatus()
104 public void onInputDeviceAdded(int deviceId) { in onInputDeviceAdded() argument
109 public void onInputDeviceRemoved(int deviceId) { in onInputDeviceRemoved() argument
114 public void onInputDeviceChanged(int deviceId) { in onInputDeviceChanged() argument
DKeyboardLayoutPickerController.java123 public void onInputDeviceAdded(int deviceId) { in onInputDeviceAdded() argument
128 public void onInputDeviceRemoved(int deviceId) { in onInputDeviceRemoved() argument
129 if (mInputDeviceId >= 0 && deviceId == mInputDeviceId) { in onInputDeviceRemoved()
135 public void onInputDeviceChanged(int deviceId) { in onInputDeviceChanged() argument
136 if (mInputDeviceId >= 0 && deviceId == mInputDeviceId) { in onInputDeviceChanged()
/packages/apps/Settings/src/com/android/settings/inputmethod/
DGameControllerPreferenceController.java72 for (int deviceId : devices) { in getAvailabilityStatus()
73 InputDevice device = mIm.getInputDevice(deviceId); in getAvailabilityStatus()
104 public void onInputDeviceAdded(int deviceId) { in onInputDeviceAdded() argument
109 public void onInputDeviceRemoved(int deviceId) { in onInputDeviceRemoved() argument
114 public void onInputDeviceChanged(int deviceId) { in onInputDeviceChanged() argument
DKeyboardLayoutPickerController.java123 public void onInputDeviceAdded(int deviceId) { in onInputDeviceAdded() argument
128 public void onInputDeviceRemoved(int deviceId) { in onInputDeviceRemoved() argument
129 if (mInputDeviceId >= 0 && deviceId == mInputDeviceId) { in onInputDeviceRemoved()
135 public void onInputDeviceChanged(int deviceId) { in onInputDeviceChanged() argument
136 if (mInputDeviceId >= 0 && deviceId == mInputDeviceId) { in onInputDeviceChanged()
/packages/apps/Contacts/src/com/android/contacts/util/
DSharedPreferenceUtil.java224 public static void addRestoredDevice(Context context, String deviceId) { in addRestoredDevice() argument
226 restoredDevices.add(deviceId); in addRestoredDevice()
232 public static void addDismissedDevice(Context context, String deviceId) { in addDismissedDevice() argument
234 dismissedDevices.add(deviceId); in addDismissedDevice()
240 public static void removeDismissedDevice(Context context, String deviceId) { in removeDismissedDevice() argument
242 dismissedDevices.remove(deviceId); in removeDismissedDevice()
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/storage/
DConnectedDeviceStorageTest.java116 String deviceId = addRandomAssociatedDevice(mActiveUserId).getDeviceId(); in getEncryptionKey_returnsSavedKey() local
118 mConnectedDeviceStorage.saveEncryptionKey(deviceId, key); in getEncryptionKey_returnsSavedKey()
119 assertThat(mConnectedDeviceStorage.getEncryptionKey(deviceId)).isEqualTo(key); in getEncryptionKey_returnsSavedKey()
124 String deviceId = addRandomAssociatedDevice(mActiveUserId).getDeviceId(); in getEncryptionKey_returnsNullForUnrecognizedDeviceId() local
125 mConnectedDeviceStorage.saveEncryptionKey(deviceId, ByteUtils.randomBytes(16)); in getEncryptionKey_returnsNullForUnrecognizedDeviceId()

123