summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/net
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-01 15:05:04 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-01 15:05:04 -0700
commit3b16cf4f47142a845bf0ede54ef8ef956506c6c3 (patch)
tree5f1ae1b8de0e604078af0ea8a360d217b16bce6b /services/core/java/com/android/server/net
parent80abf887a1578669d3167ea83d52a497a64ea491 (diff)
downloadframeworks_base-3b16cf4f47142a845bf0ede54ef8ef956506c6c3.zip
frameworks_base-3b16cf4f47142a845bf0ede54ef8ef956506c6c3.tar.gz
frameworks_base-3b16cf4f47142a845bf0ede54ef8ef956506c6c3.tar.bz2
Device idle fixes: issue #22209630 and issue #22225665
Issue #22209630: Only allow whitelisted apps to put apps on the temp whitelist We now check whether the calling app is a system uid or in the whitelist and, if not, throw an exception. Issue #22225665: Alarm still goes off in idle mode (doze) Fix a bug where we were not clearing the calling identity when coming through the dump command to the service, and as a result when we would eventually call out to the alarm manager it wouldn't do what we want. This was only broken when being controlled by the shell. Also adjust the network policy manager service's handling of device idle transitions to only toggle the device idle state, which gets rid of the long delay we have coming out of idle mode. And add in a bit of logging around going in/out of idle mode to try to understand where things may be slow in the future. Change-Id: I4a41f790e9b0bb31330314b94111557d479f2ba5
Diffstat (limited to 'services/core/java/com/android/server/net')
-rw-r--r--services/core/java/com/android/server/net/NetworkPolicyManagerService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index d4b7256..f618c3e 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -146,6 +146,7 @@ import android.util.SparseIntArray;
import android.util.TrustedTime;
import android.util.Xml;
+import com.android.server.EventLogTags;
import libcore.io.IoUtils;
import com.android.internal.R;
@@ -1764,7 +1765,12 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
if (mDeviceIdleMode != enabled) {
mDeviceIdleMode = enabled;
if (mSystemReady) {
- updateRulesForGlobalChangeLocked(true);
+ updateRulesForDeviceIdleLocked();
+ }
+ if (enabled) {
+ EventLogTags.writeDeviceIdleOnPhase("net");
+ } else {
+ EventLogTags.writeDeviceIdleOffPhase("net");
}
}
}