public abstract class VrManagerInternal extends Object
Modifier and Type | Field and Description |
---|---|
static int |
NO_ERROR
The error code returned on success.
|
Constructor and Description |
---|
VrManagerInternal() |
Modifier and Type | Method and Description |
---|---|
abstract int |
hasVrPackage(ComponentName packageName,
int userId)
Return NO_ERROR if the given package is installed on the device and enabled as a
VrListenerService for the given current user, or a negative error code indicating a failure.
|
abstract boolean |
isCurrentVrListener(String packageName,
int userId)
Return
true if the given package is the currently bound VrListenerService for the
given user. |
abstract void |
setVrMode(boolean enabled,
ComponentName packageName,
int userId,
ComponentName calling)
Set the current VR mode state.
|
abstract void |
setVrModeImmediate(boolean enabled,
ComponentName packageName,
int userId,
ComponentName calling)
Set the current VR mode state immediately.
|
public static final int NO_ERROR
public abstract boolean isCurrentVrListener(String packageName, int userId)
true
if the given package is the currently bound VrListenerService for the
given user.packageName
- The package name to check.userId
- the user ID to check the package name for.true
if the given package is the currently bound VrListenerService.public abstract void setVrMode(boolean enabled, ComponentName packageName, int userId, ComponentName calling)
enabled
- true
to enable VR mode.packageName
- The package name of the requested VrListenerService to bind.userId
- the user requesting the VrListenerService component.calling
- the component currently using VR mode, or null to leave unchanged.public abstract void setVrModeImmediate(boolean enabled, ComponentName packageName, int userId, ComponentName calling)
enabled
- true
to enable VR mode.packageName
- The package name of the requested VrListenerService to bind.userId
- the user requesting the VrListenerService component.calling
- the component currently using VR mode, or null to leave unchanged.public abstract int hasVrPackage(ComponentName packageName, int userId)
packageName
- the name of the package to check, or null to select the default package.android.service.vr.VrModeException
on failure.