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

Commit 27da814a authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Don't update app idle rules on updateRulesForRestrictPowerUL(). am: 0970046a am: fe8e64da

am: b0d291f3

Change-Id: I5f375bbc98dcdaae6f4b67c6b76745e579b827ba
parents 15ead903 b0d291f3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -711,6 +711,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
            synchronized (mUidRulesFirstLock) {
                updatePowerSaveWhitelistUL();
                updateRulesForRestrictPowerUL();
                updateRulesForAppIdleUL();
            }
        }
    };
@@ -2660,6 +2661,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
    private void updateRulesForGlobalChangeAL(boolean restrictedNetworksChanged) {
        Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "updateRulesForGlobalChangeAL");
        try {
            updateRulesForAppIdleUL();
            updateRulesForRestrictPowerUL();
            updateRulesForRestrictBackgroundUL();

@@ -2673,11 +2675,11 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
        }
    }

    // TODO: rename / document to make it clear these are global (not app-specific) rules
    private void updateRulesForRestrictPowerUL() {
        Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "updateRulesForRestrictPowerUL");
        try {
            updateRulesForDeviceIdleUL();
            updateRulesForAppIdleUL();
            updateRulesForPowerSaveUL();
            updateRulesForAllAppsUL(TYPE_RESTRICT_POWER);
        } finally {