Loading core/java/android/companion/virtual/VirtualDeviceManager.java +0 −20 Original line number Diff line number Diff line Loading @@ -107,26 +107,6 @@ public final class VirtualDeviceManager { private static final String TAG = "VirtualDeviceManager"; /** * Broadcast Action: A Virtual Device was removed. * * <p class="note">This is a protected intent that can only be sent by the system.</p> * * @hide */ @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_VIRTUAL_DEVICE_REMOVED = "android.companion.virtual.action.VIRTUAL_DEVICE_REMOVED"; /** * Int intent extra to be used with {@link #ACTION_VIRTUAL_DEVICE_REMOVED}. * Contains the identifier of the virtual device, which was removed. * * @hide */ public static final String EXTRA_VIRTUAL_DEVICE_ID = "android.companion.virtual.extra.VIRTUAL_DEVICE_ID"; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef( Loading services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java +1 −11 Original line number Diff line number Diff line Loading @@ -305,8 +305,7 @@ public class VirtualDeviceManagerService extends SystemService { } /** * Remove the virtual device. Sends the * {@link VirtualDeviceManager#ACTION_VIRTUAL_DEVICE_REMOVED} broadcast as a result. * Removes the virtual device and notifies all registered listeners about this. * * @param deviceId deviceId to be removed * @return {@code true} if the device was removed, {@code false} if the operation was a no-op Loading @@ -330,15 +329,6 @@ public class VirtualDeviceManagerService extends SystemService { } }); Intent i = new Intent(VirtualDeviceManager.ACTION_VIRTUAL_DEVICE_REMOVED); i.putExtra(VirtualDeviceManager.EXTRA_VIRTUAL_DEVICE_ID, deviceId); i.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); final long identity = Binder.clearCallingIdentity(); try { getContext().sendBroadcastAsUser(i, UserHandle.ALL); } finally { Binder.restoreCallingIdentity(identity); } return true; } Loading Loading
core/java/android/companion/virtual/VirtualDeviceManager.java +0 −20 Original line number Diff line number Diff line Loading @@ -107,26 +107,6 @@ public final class VirtualDeviceManager { private static final String TAG = "VirtualDeviceManager"; /** * Broadcast Action: A Virtual Device was removed. * * <p class="note">This is a protected intent that can only be sent by the system.</p> * * @hide */ @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_VIRTUAL_DEVICE_REMOVED = "android.companion.virtual.action.VIRTUAL_DEVICE_REMOVED"; /** * Int intent extra to be used with {@link #ACTION_VIRTUAL_DEVICE_REMOVED}. * Contains the identifier of the virtual device, which was removed. * * @hide */ public static final String EXTRA_VIRTUAL_DEVICE_ID = "android.companion.virtual.extra.VIRTUAL_DEVICE_ID"; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef( Loading
services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java +1 −11 Original line number Diff line number Diff line Loading @@ -305,8 +305,7 @@ public class VirtualDeviceManagerService extends SystemService { } /** * Remove the virtual device. Sends the * {@link VirtualDeviceManager#ACTION_VIRTUAL_DEVICE_REMOVED} broadcast as a result. * Removes the virtual device and notifies all registered listeners about this. * * @param deviceId deviceId to be removed * @return {@code true} if the device was removed, {@code false} if the operation was a no-op Loading @@ -330,15 +329,6 @@ public class VirtualDeviceManagerService extends SystemService { } }); Intent i = new Intent(VirtualDeviceManager.ACTION_VIRTUAL_DEVICE_REMOVED); i.putExtra(VirtualDeviceManager.EXTRA_VIRTUAL_DEVICE_ID, deviceId); i.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); final long identity = Binder.clearCallingIdentity(); try { getContext().sendBroadcastAsUser(i, UserHandle.ALL); } finally { Binder.restoreCallingIdentity(identity); } return true; } Loading