diff options
author | Nikita Ioffe <ioffe@google.com> | 2022-11-25 17:56:23 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-11-25 17:56:23 +0000 |
commit | a8d89abdade50fe7afb5c0d3eeef09a334aa09d4 (patch) | |
tree | 6ae3bbfbe2474c329660c498f8ea23e00a9662ef | |
parent | 9db6ee342b7c2748477e7b8c46add353087b8204 (diff) | |
parent | ea76ae6fee90cdac51503b0c6212628e35aec44a (diff) | |
download | base-a8d89abdade50fe7afb5c0d3eeef09a334aa09d4.tar.gz |
Merge "Register managers provided by the com.android.virt APEX"
-rw-r--r-- | core/api/system-current.txt | 1 | ||||
-rw-r--r-- | core/java/android/app/SystemServiceRegistry.java | 2 | ||||
-rw-r--r-- | core/java/android/content/Context.java | 15 |
3 files changed, 18 insertions, 0 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index f789f8624491..8af0d01de848 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2977,6 +2977,7 @@ package android.content { field public static final String TRANSLATION_MANAGER_SERVICE = "translation"; field public static final String UI_TRANSLATION_SERVICE = "ui_translation"; field public static final String UWB_SERVICE = "uwb"; + field public static final String VIRTUALIZATION_SERVICE = "virtualization"; field public static final String VR_SERVICE = "vrmanager"; field public static final String WALLPAPER_EFFECTS_GENERATION_SERVICE = "wallpaper_effects_generation"; field public static final String WIFI_NL80211_SERVICE = "wifinl80211"; diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index 12f72c215326..42eb0fecdb21 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -207,6 +207,7 @@ import android.service.oemlock.OemLockManager; import android.service.persistentdata.IPersistentDataBlockService; import android.service.persistentdata.PersistentDataBlockManager; import android.service.vr.IVrManager; +import android.system.virtualmachine.VirtualizationFrameworkInitializer; import android.telecom.TelecomManager; import android.telephony.MmsManager; import android.telephony.TelephonyFrameworkInitializer; @@ -1541,6 +1542,7 @@ public final class SystemServiceRegistry { ConnectivityFrameworkInitializerTiramisu.registerServiceWrappers(); NearbyFrameworkInitializer.registerServiceWrappers(); OnDevicePersonalizationFrameworkInitializer.registerServiceWrappers(); + VirtualizationFrameworkInitializer.registerServiceWrappers(); } finally { // If any of the above code throws, we're in a pretty bad shape and the process // will likely crash, but we'll reset it just in case there's an exception handler... diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 3b45d62fb525..cc42a4c11036 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -3931,6 +3931,7 @@ public abstract class Context { //@hide: ATTESTATION_VERIFICATION_SERVICE, //@hide: SAFETY_CENTER_SERVICE, DISPLAY_HASH_SERVICE, + VIRTUALIZATION_SERVICE, }) @Retention(RetentionPolicy.SOURCE) public @interface ServiceName {} @@ -6047,6 +6048,20 @@ public abstract class Context { public static final String AMBIENT_CONTEXT_SERVICE = "ambient_context"; /** + * Use with {@link #getSystemService(String)} to retrieve a + * {@link android.system.virtualmachine.VirtualMachineManager}. + * + * <p>On devices without {@link PackageManager#FEATURE_VIRTUALIZATION_FRAMEWORK} system feature + * the {@link #getSystemService(String)} will return {@code null}. + * + * @see #getSystemService(String) + * @see android.system.virtualmachine.VirtualMachineManager + * @hide + */ + @SystemApi + public static final String VIRTUALIZATION_SERVICE = "virtualization"; + + /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. * |