/cts/tests/tests/companion/multidevice/client/src/android/companion/cts/multidevice/ |
D | BluetoothConnector.kt | 45 fun attachClientSocket(associationId: Int) { in attachClientSocket() 47 val device = getRemoteDevice(associationId) in attachClientSocket() 49 if (clientSockets.containsKey(associationId)) { in attachClientSocket() 50 detachClientSocket(associationId) in attachClientSocket() 51 clientSockets[associationId] = socket in attachClientSocket() 53 clientSockets += associationId to socket in attachClientSocket() 59 associationId, in attachClientSocket() 69 fun attachServerSocket(associationId: Int) { in attachServerSocket() 71 if (serverThreads.containsKey(associationId)) { in attachServerSocket() 72 serverThread = serverThreads[associationId]!! in attachServerSocket() [all …]
|
D | CompanionDeviceManagerSnippet.kt | 107 fun requestPermissionTransferUserConsent(associationId: Int) { in requestPermissionTransferUserConsent() 109 companionDeviceManager.buildPermissionTransferUserConsentIntent(associationId) in requestPermissionTransferUserConsent() 136 fun disassociate(associationId: Int) { in disassociate() 137 companionDeviceManager.disassociate(associationId) in disassociate() 155 fun startPermissionsSync(associationId: Int) { in startPermissionsSync() 157 companionDeviceManager.startSystemDataTransfer(associationId, executor, callback) in startPermissionsSync() 162 fun removeBond(associationId: Int): Boolean { in removeBond() 163 return companionDeviceManager.removeBond(associationId) in removeBond() 167 fun attachClientSocket(associationId: Int) { in attachClientSocket() 168 btConnector.attachClientSocket(associationId) in attachClientSocket() [all …]
|
/cts/tests/tests/companion/core/src/android/companion/cts/core/ |
D | DeviceEventDeviceLockedTest.kt | 60 val associationId = cdm.myAssociations[0].id in test_ble_event_on_device_locked() constant 63 .setAssociationId(associationId).build() in test_ble_event_on_device_locked() 72 associationId, in test_ble_event_on_device_locked() 82 PrimaryCompanionService.waitAssociationToAppear(associationId) in test_ble_event_on_device_locked() 89 simulateDeviceEvent(associationId, DevicePresenceEvent.EVENT_BLE_DISAPPEARED) in test_ble_event_on_device_locked() 100 val associationId = cdm.myAssociations[0].id in test_bt_event_on_device_locked() constant 103 .setAssociationId(associationId).build() in test_bt_event_on_device_locked() 112 associationId, in test_bt_event_on_device_locked() 122 PrimaryCompanionService.waitAssociationToBtConnect(associationId) in test_bt_event_on_device_locked() 129 simulateDeviceEvent(associationId, DevicePresenceEvent.EVENT_BT_DISCONNECTED) in test_bt_event_on_device_locked() [all …]
|
D | ObservingDevicePresenceTest.kt | 58 val associationId = cdm.myAssociations[0].id in test_observingDevicePresence_isOffByDefault() constant 60 simulateDeviceEvent(associationId, EVENT_BLE_APPEARED) in test_observingDevicePresence_isOffByDefault() 62 simulateDeviceAppeared(associationId) in test_observingDevicePresence_isOffByDefault() 73 simulateDeviceEvent(associationId, EVENT_BLE_DISAPPEARED) in test_observingDevicePresence_isOffByDefault() 75 simulateDeviceDisappeared(associationId) in test_observingDevicePresence_isOffByDefault() 101 val associationId = cdm.myAssociations[0].id in test_startObservingDevicePresence_singleDevice() constant 109 simulateDeviceEvent(associationId, EVENT_BLE_APPEARED) in test_startObservingDevicePresence_singleDevice() 111 simulateDeviceAppeared(associationId) in test_startObservingDevicePresence_singleDevice() 122 assertOnlyPrimaryCompanionDeviceServiceNotified(associationId, appeared = true) in test_startObservingDevicePresence_singleDevice() 128 simulateDeviceEvent(associationId, EVENT_BLE_DISAPPEARED) in test_startObservingDevicePresence_singleDevice() [all …]
|
D | DeviceEventTest.kt | 40 val associationId = cdm.myAssociations[0].id in test_ble_device_event() constant 46 simulateDeviceEvent(associationId, EVENT_BLE_APPEARED) in test_ble_device_event() 47 PrimaryCompanionService.waitAssociationToAppear(associationId) in test_ble_device_event() 54 simulateDeviceEvent(associationId, EVENT_BLE_DISAPPEARED) in test_ble_device_event() 55 PrimaryCompanionService.waitAssociationToDisappear(associationId) in test_ble_device_event() 61 PrimaryCompanionService.forgetDevicePresence(associationId) in test_ble_device_event() 100 val associationId = cdm.myAssociations[0].id in test_both_bt_ble_device_event() constant 106 simulateDeviceEvent(associationId, EVENT_BLE_APPEARED) in test_both_bt_ble_device_event() 107 PrimaryCompanionService.waitAssociationToAppear(associationId) in test_both_bt_ble_device_event() 111 simulateDeviceEvent(associationId, EVENT_BT_CONNECTED) in test_both_bt_ble_device_event() [all …]
|
D | DumpSysTest.kt | 53 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in test_dump_singleDevice() constant 56 assertTrue(out[0].contains("mId=$associationId")) // Device is associated in test_dump_singleDevice() 57 assertFalse(out[1].contains("id=$associationId")) // But not present yet in test_dump_singleDevice() 62 cdm.notifyDeviceAppeared(associationId) in test_dump_singleDevice() 64 assertOnlyPrimaryCompanionDeviceServiceNotified(associationId, appeared = true) in test_dump_singleDevice() 67 assertTrue(out[0].contains("mId=$associationId")) // Device is still associated in test_dump_singleDevice() 68 assertTrue(out[1].contains("id=$associationId")) // And also present in test_dump_singleDevice() 73 cdm.notifyDeviceDisappeared(associationId) in test_dump_singleDevice()
|
D | SelfPresenceReportingTest.kt | 58 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in test_selfReporting_singleDevice_multipleServices() constant 61 cdm.notifyDeviceAppeared(associationId) in test_selfReporting_singleDevice_multipleServices() 69 assertOnlyPrimaryCompanionDeviceServiceNotified(associationId, appeared = true) in test_selfReporting_singleDevice_multipleServices() 79 cdm.notifyDeviceDisappeared(associationId) in test_selfReporting_singleDevice_multipleServices() 83 assertOnlyPrimaryCompanionDeviceServiceNotified(associationId, appeared = false) in test_selfReporting_singleDevice_multipleServices() 204 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in test_notifyAppears_from_onAssociationCreated() constant 207 cdm.notifyDeviceAppeared(associationId) in test_notifyAppears_from_onAssociationCreated() 211 PrimaryCompanionService.waitAssociationToAppear(associationId) in test_notifyAppears_from_onAssociationCreated() 218 cdm.notifyDeviceDisappeared(associationId) in test_notifyAppears_from_onAssociationCreated()
|
D | TransportsListenerTest.kt | 113 val associationId = cdm.myAssociations[0].id in <lambda>() constant 119 cdm.sendMessage(MESSAGE_REQUEST_PING, byteArrayOf(), intArrayOf(associationId)) in <lambda>() 124 cdm.sendMessage(MESSAGE_REQUEST_PING, byteArrayOf(), intArrayOf(associationId)) in <lambda>() 132 val associationId = cdm.myAssociations[0].id in <lambda>() constant 143 cdm.attachSystemDataTransport(associationId, input, output) in <lambda>() 153 cdm.attachSystemDataTransport(associationId, input, output) in <lambda>() 163 val associationId = cdm.myAssociations[0].id in <lambda>() constant 169 cdm.attachSystemDataTransport(associationId, input, output) in <lambda>()
|
D | ObservingDeviceUuidEventTest.kt | 105 val associationId = cdm.myAssociations[0].id in test_DevicePresenceRequest_set_both_uuid_mac_address() constant 109 .setUuid(UUID_A).setAssociationId(associationId).build() in test_DevicePresenceRequest_set_both_uuid_mac_address() 191 val associationId = cdm.myAssociations[0].id in test_observingDevicePresence_bothAssociationAndUuid() constant 193 associationId in test_observingDevicePresence_bothAssociationAndUuid() 200 simulateDeviceEvent(associationId, EVENT_BLE_APPEARED) in test_observingDevicePresence_bothAssociationAndUuid() 201 PrimaryCompanionService.waitAssociationToAppear(associationId) in test_observingDevicePresence_bothAssociationAndUuid() 213 simulateDeviceEvent(associationId, EVENT_BLE_DISAPPEARED) in test_observingDevicePresence_bothAssociationAndUuid()
|
/cts/tests/tests/companion/common/src/android/companion/cts/common/ |
D | CompanionService.kt | 96 var associationId: Int = devicePresenceEvent.associationId in onDevicePresenceEvent() variable 98 associationIdsForBtBondDevices.add(associationId) in onDevicePresenceEvent() 100 associationIdsForBtBondDevices.remove(associationId) in onDevicePresenceEvent() 138 fun removeConnectedDevice(associationId: Int) { in removeConnectedDevice() 139 _connectedDevices.remove(associationId) in removeConnectedDevice() 185 fun waitAssociationToAppear(associationId: Int, timeout: Duration = 1.seconds) { 187 associationIdsForConnectedDevices.contains(associationId) 190 throw AssertionError("""Association with $associationId hasn't "appeared"""") 240 fun forgetDevicePresence(associationId: Int) { 241 instance?.removeConnectedDevice(associationId)
|
D | TestBase.kt | 185 fun simulateDeviceEvent(associationId: Int, event: Int) = in simulateDeviceEvent() 186 runShellCommand("cmd companiondevice simulate-device-event $associationId $event") in simulateDeviceEvent() 194 fun simulateDeviceEventDeviceLocked(associationId: Int, userId: Int, event: Int, uuid: String) { in simulateDeviceEvent() 197 "$associationId $userId $event $uuid" in simulateDeviceEvent() 328 fun assertOnlyPrimaryCompanionDeviceServiceNotified(associationId: Int, appeared: Boolean) { in assertOnlyPrimaryCompanionDeviceServiceNotified() 335 PrimaryCompanionService.waitAssociationToAppear(associationId) in assertOnlyPrimaryCompanionDeviceServiceNotified() 336 assertContains(PrimaryCompanionService.associationIdsForConnectedDevices, associationId) in assertOnlyPrimaryCompanionDeviceServiceNotified() 338 PrimaryCompanionService.waitAssociationToDisappear(associationId) in assertOnlyPrimaryCompanionDeviceServiceNotified() 340 PrimaryCompanionService.associationIdsForConnectedDevices.contains(associationId) in assertOnlyPrimaryCompanionDeviceServiceNotified()
|
/cts/tests/tests/companion/multiprocess/src/android/companion/cts/multiprocess/ |
D | BinderLifecycleTest.kt | 45 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in test_binderDied_primaryProcess() constant 49 cdm.notifyDeviceAppeared(associationId) in test_binderDied_primaryProcess() 64 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in test_binderDied_secondaryProcess() constant 68 cdm.notifyDeviceAppeared(associationId) in test_binderDied_secondaryProcess()
|
D | RebindServiceTest.kt | 52 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in <lambda>() constant 55 cdm.notifyDeviceAppeared(associationId) in <lambda>() 71 cdm.notifyDeviceAppeared(associationId) in <lambda>() 82 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in <lambda>() constant 86 cdm.notifyDeviceAppeared(associationId) in <lambda>()
|
/cts/tests/tests/companion/noservices/src/android/companion/cts/noservices/ |
D | NoCompanionDeviceServiceTest.kt | 54 val associationId = createSelfManagedAssociation(DEVICE_DISPLAY_NAME_A) in test_noService() constant 60 cdm.notifyDeviceAppeared(associationId) in test_noService() 82 cdm.notifyDeviceDisappeared(associationId) in test_noService()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/companion/ |
D | DevicePresenceListener.java | 41 public static boolean isDeviceNearby(int associationId) { in isDeviceNearby() argument 42 return NEARBY_DEVICES.contains(associationId); in isDeviceNearby()
|
/cts/tests/tests/companion/uiautomation/src/android/companion/cts/uiautomation/ |
D | SystemDataTransferTest.kt | 303 private fun requestPermissionTransferUserConsent(associationId: Int, action: Int): Int { in <lambda>() 304 val pendingUserConsent = cdm.buildPermissionTransferUserConsentIntent(associationId) in <lambda>() 324 associationId: Int, in <lambda>() 338 cdm.attachSystemDataTransport(associationId, pipedInput, monitoredOutput) in <lambda>() 353 cdm.startSystemDataTransfer(associationId, context.mainExecutor, callback) in <lambda>() 366 cdm.detachSystemDataTransport(associationId) in <lambda>()
|
/cts/tests/tests/companion/CompanionDeviceTestApp/src/android.os.cts.companiondevicetestapp/ |
D | CompanionDeviceTestAppActivity.kt | 145 val associationId = associationInfo.id in <lambda>() constant 146 toast("requestSystemDataTransfer $associationId") in <lambda>() 148 associationId) in <lambda>()
|
/cts/tests/tests/virtualdevice/common/src/android/virtualdevice/cts/common/ |
D | FakeAssociationRule.java | 183 private void disassociate(int associationId) { in disassociate() argument 185 mCompanionDeviceManager.disassociate(associationId); in disassociate()
|
/cts/tests/wearable/src/android/wearable/cts/ |
D | WearableSensingManagerIsolatedServiceTest.java | 653 private byte[] receiveMessageFromCdm(int associationId) throws InterruptedException { in receiveMessageFromCdm() argument 660 if (associationIdForMessage == associationId) { in receiveMessageFromCdm()
|