Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 666505ec authored by Ruben Brunk's avatar Ruben Brunk
Browse files

Fix VR component enforcement for "2D in 3D" apps.

Bug: 38004624

Test: Launch 2D in 3D application, check that null is delivered
VrListenerService#onCurrentVrActivityChanged.

Change-Id: I8ecb3d2fd4fa686ec43509852f4bc5f7d11d665c
parent f37f1f19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+2 −1
Original line number Diff line number Diff line
@@ -749,7 +749,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;