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

Commit a5724a98 authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Clean up fully rolled out PowerExemptionBgUsageFix

Flag was rolled out in Android V.

Bug: 335663055
Test: TH
Flag: EXEMPT flag cleanup
Change-Id: I99e10a2ad2d133810aec4abfcfe2451aa817cb09
parent d60a73d9
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);
                    }
                }