Merge "Register managers provided by the com.android.virt APEX"

This commit is contained in:
Nikita Ioffe
2022-11-25 17:56:23 +00:00
committed by Gerrit Code Review
3 changed files with 18 additions and 0 deletions

View File

@@ -2977,6 +2977,7 @@ package android.content {
field public static final String TRANSLATION_MANAGER_SERVICE = "translation"; field public static final String TRANSLATION_MANAGER_SERVICE = "translation";
field public static final String UI_TRANSLATION_SERVICE = "ui_translation"; field public static final String UI_TRANSLATION_SERVICE = "ui_translation";
field public static final String UWB_SERVICE = "uwb"; 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 VR_SERVICE = "vrmanager";
field public static final String WALLPAPER_EFFECTS_GENERATION_SERVICE = "wallpaper_effects_generation"; field public static final String WALLPAPER_EFFECTS_GENERATION_SERVICE = "wallpaper_effects_generation";
field public static final String WIFI_NL80211_SERVICE = "wifinl80211"; field public static final String WIFI_NL80211_SERVICE = "wifinl80211";

View File

@@ -207,6 +207,7 @@ import android.service.oemlock.OemLockManager;
import android.service.persistentdata.IPersistentDataBlockService; import android.service.persistentdata.IPersistentDataBlockService;
import android.service.persistentdata.PersistentDataBlockManager; import android.service.persistentdata.PersistentDataBlockManager;
import android.service.vr.IVrManager; import android.service.vr.IVrManager;
import android.system.virtualmachine.VirtualizationFrameworkInitializer;
import android.telecom.TelecomManager; import android.telecom.TelecomManager;
import android.telephony.MmsManager; import android.telephony.MmsManager;
import android.telephony.TelephonyFrameworkInitializer; import android.telephony.TelephonyFrameworkInitializer;
@@ -1541,6 +1542,7 @@ public final class SystemServiceRegistry {
ConnectivityFrameworkInitializerTiramisu.registerServiceWrappers(); ConnectivityFrameworkInitializerTiramisu.registerServiceWrappers();
NearbyFrameworkInitializer.registerServiceWrappers(); NearbyFrameworkInitializer.registerServiceWrappers();
OnDevicePersonalizationFrameworkInitializer.registerServiceWrappers(); OnDevicePersonalizationFrameworkInitializer.registerServiceWrappers();
VirtualizationFrameworkInitializer.registerServiceWrappers();
} finally { } finally {
// If any of the above code throws, we're in a pretty bad shape and the process // 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... // will likely crash, but we'll reset it just in case there's an exception handler...

View File

@@ -3931,6 +3931,7 @@ public abstract class Context {
//@hide: ATTESTATION_VERIFICATION_SERVICE, //@hide: ATTESTATION_VERIFICATION_SERVICE,
//@hide: SAFETY_CENTER_SERVICE, //@hide: SAFETY_CENTER_SERVICE,
DISPLAY_HASH_SERVICE, DISPLAY_HASH_SERVICE,
VIRTUALIZATION_SERVICE,
}) })
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface ServiceName {} public @interface ServiceName {}
@@ -6046,6 +6047,20 @@ public abstract class Context {
@SystemApi @SystemApi
public static final String AMBIENT_CONTEXT_SERVICE = "ambient_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 * Determine whether the given permission is allowed for a particular
* process and user ID running in the system. * process and user ID running in the system.