Merge "Fix VR component enforcement for "2D in 3D" apps." into oc-dev

am: 4d73fd5765

Change-Id: I7031eb3ac81aa95df7a729ad358f5288b1cabc4e
This commit is contained in:
Ruben Brunk
2017-05-10 23:04:07 +00:00
committed by android-build-merger
2 changed files with 3 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ public abstract class VrListenerService extends Service {
* transition.</p>
*
* @param component the {@link ComponentName} of the VR activity that the system has
* switched to.
* switched to, or null if the system is displaying a 2D activity in VR compatibility mode.
*
* @see android.app.Activity#setVrModeEnabled
* @see android.R.attr#enableVrMode

View File

@@ -735,7 +735,8 @@ public class VrManagerService extends SystemService implements EnabledComponentC
}
}
if (calling != null && !Objects.equals(calling, mCurrentVrModeComponent)) {
if ((calling != null || mPersistentVrModeEnabled)
&& !Objects.equals(calling, mCurrentVrModeComponent)) {
sendUpdatedCaller = true;
}
mCurrentVrModeComponent = calling;