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

Commit 2781b41c authored by Ruben Brunk's avatar Ruben Brunk
Browse files

Fix re-enabling alert window appop after leaving VR mode.

Bug: 37526753
Test: Check that system alert windows appear after leaving VR mode.

Change-Id: I2942b2e2bd30308752367963b7ae896462811d2f
parent 9870d0be
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -642,16 +642,12 @@ public class VrManagerService extends SystemService implements EnabledComponentC
                    false, mOverlayToken, null, oldUserId);
        }

        if (!mVrModeEnabled) {
            return;
        }

        // Apply the restrictions for the current user based on vr state
        String[] exemptions = (exemptedPackage == null) ? new String[0] :
                new String[] { exemptedPackage };

        appOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
                true, mOverlayToken, exemptions, newUserId);
                mVrModeEnabled, mOverlayToken, exemptions, newUserId);
    }

    private void updateDependentAppOpsLocked(String newVrServicePackage, int newUserId,