Loading services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java +3 −2 Original line number Diff line number Diff line Loading @@ -92,9 +92,10 @@ class CompanionDeviceShellCommand extends ShellCommand { int userId = getNextIntArgRequired(); String packageName = getNextArgRequired(); String address = getNextArgRequired(); String deviceProfile = getNextArg(); final MacAddress macAddress = MacAddress.fromString(address); mService.createNewAssociation(userId, packageName, macAddress, null, null, false); null, deviceProfile, false); } break; Loading Loading @@ -350,7 +351,7 @@ class CompanionDeviceShellCommand extends ShellCommand { pw.println(" Print this help text."); pw.println(" list USER_ID"); pw.println(" List all Associations for a user."); pw.println(" associate USER_ID PACKAGE MAC_ADDRESS"); pw.println(" associate USER_ID PACKAGE MAC_ADDRESS [DEVICE_PROFILE]"); pw.println(" Create a new Association."); pw.println(" disassociate USER_ID PACKAGE MAC_ADDRESS"); pw.println(" Remove an existing Association."); Loading services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,12 @@ public class VirtualDeviceManagerService extends SystemService { if (associationInfo == null) { throw new IllegalArgumentException("No association with ID " + associationId); } if (!VIRTUAL_DEVICE_COMPANION_DEVICE_PROFILES .contains(associationInfo.getDeviceProfile()) && Flags.persistentDeviceIdApi()) { throw new IllegalArgumentException("Unsupported CDM Association device profile " + associationInfo.getDeviceProfile() + " for virtual device creation."); } Objects.requireNonNull(params); Objects.requireNonNull(activityListener); Objects.requireNonNull(soundEffectListener); Loading Loading
services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java +3 −2 Original line number Diff line number Diff line Loading @@ -92,9 +92,10 @@ class CompanionDeviceShellCommand extends ShellCommand { int userId = getNextIntArgRequired(); String packageName = getNextArgRequired(); String address = getNextArgRequired(); String deviceProfile = getNextArg(); final MacAddress macAddress = MacAddress.fromString(address); mService.createNewAssociation(userId, packageName, macAddress, null, null, false); null, deviceProfile, false); } break; Loading Loading @@ -350,7 +351,7 @@ class CompanionDeviceShellCommand extends ShellCommand { pw.println(" Print this help text."); pw.println(" list USER_ID"); pw.println(" List all Associations for a user."); pw.println(" associate USER_ID PACKAGE MAC_ADDRESS"); pw.println(" associate USER_ID PACKAGE MAC_ADDRESS [DEVICE_PROFILE]"); pw.println(" Create a new Association."); pw.println(" disassociate USER_ID PACKAGE MAC_ADDRESS"); pw.println(" Remove an existing Association."); Loading
services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,12 @@ public class VirtualDeviceManagerService extends SystemService { if (associationInfo == null) { throw new IllegalArgumentException("No association with ID " + associationId); } if (!VIRTUAL_DEVICE_COMPANION_DEVICE_PROFILES .contains(associationInfo.getDeviceProfile()) && Flags.persistentDeviceIdApi()) { throw new IllegalArgumentException("Unsupported CDM Association device profile " + associationInfo.getDeviceProfile() + " for virtual device creation."); } Objects.requireNonNull(params); Objects.requireNonNull(activityListener); Objects.requireNonNull(soundEffectListener); Loading