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

Commit 1744268f authored by Pavel Grafov's avatar Pavel Grafov Committed by Android (Google) Code Review
Browse files

Merge "Clean up fully rolled out PowerExemptionBgUsageFix" into main

parents 0e802fe7 a5724a98
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -206,16 +206,6 @@ flag {
  }
}

flag {
  name: "power_exemption_bg_usage_fix"
  namespace: "enterprise"
  description: "Ensure aps with EXEMPT_FROM_POWER_RESTRICTIONS can execute in the background"
  bug: "333379020"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "disallow_user_control_stopped_state_fix"
  namespace: "enterprise"
+1 −3
Original line number Diff line number Diff line
@@ -20666,9 +20666,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    // have OP_RUN_ANY_IN_BACKGROUND app op and won't execute in the background. The
                    // code below grants that app op, and once the exemption is in place, the user
                    // won't be able to disable background usage anymore.
                    if (Flags.powerExemptionBgUsageFix()
                            && exemption == EXEMPT_FROM_POWER_RESTRICTIONS
                            && newMode == MODE_ALLOWED) {
                    if (exemption == EXEMPT_FROM_POWER_RESTRICTIONS && newMode == MODE_ALLOWED) {
                        setBgUsageAppOp(appOpsMgr, appInfo);
                    }
                }