Merge "Add virtual device id to exceptions in createVirtualDisplay" into main
diff --git a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java
index f9996cf..9b78ed4 100644
--- a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java
@@ -498,13 +498,16 @@
synchronized (mVirtualDeviceManagerLock) {
virtualDeviceImpl = mVirtualDevices.get(virtualDevice.getDeviceId());
if (virtualDeviceImpl == null) {
- throw new SecurityException("Invalid VirtualDevice");
+ throw new SecurityException(
+ "Invalid VirtualDevice (deviceId = " + virtualDevice.getDeviceId()
+ + ")");
}
}
if (virtualDeviceImpl.getOwnerUid() != callingUid) {
throw new SecurityException(
"uid " + callingUid
- + " is not the owner of the supplied VirtualDevice");
+ + " is not the owner of the supplied VirtualDevice (deviceId = "
+ + virtualDevice.getDeviceId() + ")");
}
return virtualDeviceImpl.createVirtualDisplay(