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

Commit fe8e64da 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

Change-Id: I59d5daec570117f53e31837b61d8bb2886d35780
parents d8cb0cfe 0970046a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -715,6 +715,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
            synchronized (mUidRulesFirstLock) {
                updatePowerSaveWhitelistUL();
                updateRulesForRestrictPowerUL();
                updateRulesForAppIdleUL();
            }
        }
    };
@@ -2731,6 +2732,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
    private void updateRulesForGlobalChangeAL(boolean restrictedNetworksChanged) {
        Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "updateRulesForGlobalChangeAL");
        try {
            updateRulesForAppIdleUL();
            updateRulesForRestrictPowerUL();
            updateRulesForRestrictBackgroundUL();

@@ -2744,11 +2746,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 {