Allow VR State Listeners with RESTRICTED_VR_ACCESS permission.
Extend the ability to use VrStateListeners to applications that
have RESTRICTED_VR_ACCESS permission. Previously, it required
ACCESS_VR_MANAGER only.
Add VrStateCallback object and methods to VrManager to access the
functionality outside of frameworks.
Bug: 64360244
Test: Manual. Tested ability from VrCore.
Change-Id: I01f1c75b1ccd44a09364df84218168cf6caab322
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 86c0b43..89bbec2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3512,6 +3512,11 @@
<permission android:name="android.permission.ACCESS_VR_MANAGER"
android:protectionLevel="signature" />
+ <!-- Required to access VR-Mode state and state change events via {android.app.VrStateCallback}
+ @hide -->
+ <permission android:name="android.permission.ACCESS_VR_STATE"
+ android:protectionLevel="signature|preinstalled" />
+
<!-- Allows an application to whitelist tasks during lock task mode
@hide <p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.UPDATE_LOCK_TASK_PACKAGES"