Merge "Don't update app idle rules on updateRulesForRestrictPowerUL()." into nyc-mr1-dev
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 7626e2a..ed63613 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -715,6 +715,7 @@
synchronized (mUidRulesFirstLock) {
updatePowerSaveWhitelistUL();
updateRulesForRestrictPowerUL();
+ updateRulesForAppIdleUL();
}
}
};
@@ -2731,6 +2732,7 @@
private void updateRulesForGlobalChangeAL(boolean restrictedNetworksChanged) {
Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "updateRulesForGlobalChangeAL");
try {
+ updateRulesForAppIdleUL();
updateRulesForRestrictPowerUL();
updateRulesForRestrictBackgroundUL();
@@ -2744,11 +2746,11 @@
}
}
+ // 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 {