Loading api/system-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -6204,6 +6204,10 @@ package android.app { method public void onDetached(); } public class VrManager { method public void setPersistentVrModeEnabled(boolean); } public final class WallpaperInfo implements android.os.Parcelable { ctor public WallpaperInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public int describeContents(); Loading Loading @@ -9006,6 +9010,7 @@ package android.content { field public static final java.lang.String USB_SERVICE = "usb"; field public static final java.lang.String USER_SERVICE = "user"; field public static final java.lang.String VIBRATOR_SERVICE = "vibrator"; field public static final java.lang.String VR_SERVICE = "vrmanager"; field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper"; field public static final java.lang.String WIFI_AWARE_SERVICE = "wifiaware"; field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p"; core/java/android/app/SystemServiceRegistry.java +9 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ import android.print.PrintManager; import android.service.autofill.IAutoFillManagerService; import android.service.persistentdata.IPersistentDataBlockService; import android.service.persistentdata.PersistentDataBlockManager; import android.service.vr.IVrManager; import android.telecom.TelecomManager; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; Loading Loading @@ -814,6 +815,14 @@ final class SystemServiceRegistry { IAutoFillManagerService service = IAutoFillManagerService.Stub.asInterface(b); return new AutoFillManager(ctx, service); }}); registerService(Context.VR_SERVICE, VrManager.class, new CachedServiceFetcher<VrManager>() { @Override public VrManager createService(ContextImpl ctx) throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.VR_SERVICE); return new VrManager(IVrManager.Stub.asInterface(b)); } }); } /** Loading core/java/android/app/VrManager.java 0 → 100644 +44 −0 Original line number Diff line number Diff line package android.app; import android.annotation.SystemApi; import android.content.ComponentName; import android.os.RemoteException; import android.service.vr.IVrManager; /** * Used to control aspects of a devices Virtual Reality (VR) capabilities. * <p> * You do not instantiate this class directly; instead, retrieve it through * {@link android.content.Context#getSystemService}. * @hide */ @SystemApi public class VrManager { private final IVrManager mService; /** * {@hide} */ public VrManager(IVrManager service) { mService = service; } /** * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will * remain in VR mode even if the foreground does not specify Vr mode being enabled. Mainly used * by VR viewers to indicate that a device is placed in a VR viewer. * * <p>Requires {@link android.Manifest.permission#ACCESS_VR_MANAGER} permission.</p> * * @see Activity#setVrModeEnabled(boolean, ComponentName) * @param enabled true if the device should be placed in persistent VR mode. */ public void setPersistentVrModeEnabled(boolean enabled) { try { mService.setPersistentVrModeEnabled(enabled); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } } core/java/android/content/Context.java +11 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.annotation.UserIdInt; import android.app.IApplicationThread; import android.app.IServiceConnection; import android.app.Notification; import android.app.VrManager; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; Loading Loading @@ -3763,6 +3764,16 @@ public abstract class Context { */ public static final String OVERLAY_SERVICE = "overlay"; /** * Use with {@link #getSystemService} to retrieve a * {@link VrManager} for accessing the VR service. * * @see #getSystemService * @hide */ @SystemApi public static final String VR_SERVICE = "vrmanager"; /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading core/java/android/service/vr/IVrManager.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -42,5 +42,13 @@ interface IVrManager { */ boolean getVrModeState(); /** * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will * remain in VR mode even if the foreground does not specify VR mode being enabled. Mainly used * by VR viewers to indicate that a device is placed in a VR viewer. * * @param enabled true if the device should be placed in persistent VR mode. */ void setPersistentVrModeEnabled(in boolean enabled); } Loading
api/system-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -6204,6 +6204,10 @@ package android.app { method public void onDetached(); } public class VrManager { method public void setPersistentVrModeEnabled(boolean); } public final class WallpaperInfo implements android.os.Parcelable { ctor public WallpaperInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public int describeContents(); Loading Loading @@ -9006,6 +9010,7 @@ package android.content { field public static final java.lang.String USB_SERVICE = "usb"; field public static final java.lang.String USER_SERVICE = "user"; field public static final java.lang.String VIBRATOR_SERVICE = "vibrator"; field public static final java.lang.String VR_SERVICE = "vrmanager"; field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper"; field public static final java.lang.String WIFI_AWARE_SERVICE = "wifiaware"; field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
core/java/android/app/SystemServiceRegistry.java +9 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ import android.print.PrintManager; import android.service.autofill.IAutoFillManagerService; import android.service.persistentdata.IPersistentDataBlockService; import android.service.persistentdata.PersistentDataBlockManager; import android.service.vr.IVrManager; import android.telecom.TelecomManager; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; Loading Loading @@ -814,6 +815,14 @@ final class SystemServiceRegistry { IAutoFillManagerService service = IAutoFillManagerService.Stub.asInterface(b); return new AutoFillManager(ctx, service); }}); registerService(Context.VR_SERVICE, VrManager.class, new CachedServiceFetcher<VrManager>() { @Override public VrManager createService(ContextImpl ctx) throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.VR_SERVICE); return new VrManager(IVrManager.Stub.asInterface(b)); } }); } /** Loading
core/java/android/app/VrManager.java 0 → 100644 +44 −0 Original line number Diff line number Diff line package android.app; import android.annotation.SystemApi; import android.content.ComponentName; import android.os.RemoteException; import android.service.vr.IVrManager; /** * Used to control aspects of a devices Virtual Reality (VR) capabilities. * <p> * You do not instantiate this class directly; instead, retrieve it through * {@link android.content.Context#getSystemService}. * @hide */ @SystemApi public class VrManager { private final IVrManager mService; /** * {@hide} */ public VrManager(IVrManager service) { mService = service; } /** * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will * remain in VR mode even if the foreground does not specify Vr mode being enabled. Mainly used * by VR viewers to indicate that a device is placed in a VR viewer. * * <p>Requires {@link android.Manifest.permission#ACCESS_VR_MANAGER} permission.</p> * * @see Activity#setVrModeEnabled(boolean, ComponentName) * @param enabled true if the device should be placed in persistent VR mode. */ public void setPersistentVrModeEnabled(boolean enabled) { try { mService.setPersistentVrModeEnabled(enabled); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } }
core/java/android/content/Context.java +11 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.annotation.UserIdInt; import android.app.IApplicationThread; import android.app.IServiceConnection; import android.app.Notification; import android.app.VrManager; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; Loading Loading @@ -3763,6 +3764,16 @@ public abstract class Context { */ public static final String OVERLAY_SERVICE = "overlay"; /** * Use with {@link #getSystemService} to retrieve a * {@link VrManager} for accessing the VR service. * * @see #getSystemService * @hide */ @SystemApi public static final String VR_SERVICE = "vrmanager"; /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading
core/java/android/service/vr/IVrManager.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -42,5 +42,13 @@ interface IVrManager { */ boolean getVrModeState(); /** * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will * remain in VR mode even if the foreground does not specify VR mode being enabled. Mainly used * by VR viewers to indicate that a device is placed in a VR viewer. * * @param enabled true if the device should be placed in persistent VR mode. */ void setPersistentVrModeEnabled(in boolean enabled); }