summaryrefslogtreecommitdiffstats
path: root/services/usage
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-13 18:00:37 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-14 18:33:08 -0700
commitfd854ee58c5d56f84047007ead9f88a767ae956f (patch)
tree8cd12e57928f2984b2da6c9a0872fcb795c5fa94 /services/usage
parent987241265b77542f45ce95838c25beeaf3ae6849 (diff)
downloadframeworks_base-fd854ee58c5d56f84047007ead9f88a767ae956f.zip
frameworks_base-fd854ee58c5d56f84047007ead9f88a767ae956f.tar.gz
frameworks_base-fd854ee58c5d56f84047007ead9f88a767ae956f.tar.bz2
Fix issue #21626564: MMS should be receivied while Dozing
We now place whoever is receiving the MMS on the temporary whitelist while doing so, so they can get network access to download it. There was also an issue that needed to be fixed where we were no longer updating the list of allowed uids while dozing based on their proc states... we now do that. Also did a bit of optimization of the temp white list update path do the network policy manager, instead of going through a broadcast we now directly call in to the network policy manager. This also allows us to have a synchronous version of updating the list, so we can know the app has network access before we tell it to do anything. Finally added battery stats events for things going on and off the whitelist so we can diagnose the behavior there. Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
Diffstat (limited to 'services/usage')
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index c49a5f9..b0a14c8 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -1177,7 +1177,11 @@ public class UsageStatsService extends SystemService implements
@Override
public void whitelistAppTemporarily(String packageName, long duration, int userId)
throws RemoteException {
- mDeviceIdleController.addPowerSaveTempWhitelistApp(packageName, duration, userId);
+ StringBuilder reason = new StringBuilder(32);
+ reason.append("from:");
+ UserHandle.formatUid(reason, Binder.getCallingUid());
+ mDeviceIdleController.addPowerSaveTempWhitelistApp(packageName, duration, userId,
+ reason.toString());
}
@Override