Merge "Fix re-enabling alert window appop after leaving VR mode." into oc-dev
This commit is contained in:
@@ -656,16 +656,12 @@ public class VrManagerService extends SystemService implements EnabledComponentC
|
|||||||
false, mOverlayToken, null, oldUserId);
|
false, mOverlayToken, null, oldUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mVrModeEnabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply the restrictions for the current user based on vr state
|
// Apply the restrictions for the current user based on vr state
|
||||||
String[] exemptions = (exemptedPackage == null) ? new String[0] :
|
String[] exemptions = (exemptedPackage == null) ? new String[0] :
|
||||||
new String[] { exemptedPackage };
|
new String[] { exemptedPackage };
|
||||||
|
|
||||||
appOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
|
appOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
|
||||||
true, mOverlayToken, exemptions, newUserId);
|
mVrModeEnabled, mOverlayToken, exemptions, newUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDependentAppOpsLocked(String newVrServicePackage, int newUserId,
|
private void updateDependentAppOpsLocked(String newVrServicePackage, int newUserId,
|
||||||
|
|||||||
Reference in New Issue
Block a user