summaryrefslogtreecommitdiffstats
path: root/data/etc
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-06-30 14:43:28 -0700
committerDianne Hackborn <hackbod@google.com>2014-07-01 09:22:57 -0700
commitbe7c50e0a14e91330ce13161bc14a33d34ff6aca (patch)
treed502e9b3a295f0cbfdd91b9b597c7452eb05b784 /data/etc
parent5dfb86bb09a1c5eebd6522426c94b92c02154779 (diff)
downloadframeworks_base-be7c50e0a14e91330ce13161bc14a33d34ff6aca.zip
frameworks_base-be7c50e0a14e91330ce13161bc14a33d34ff6aca.tar.gz
frameworks_base-be7c50e0a14e91330ce13161bc14a33d34ff6aca.tar.bz2
Add network access blocking when in battery save mode.
The network policy manager now monitors battery save mode and, when in battery save, uses its facility to block access to metered networks to block access to all networks. That is, it tells the network management service that all networks have an (infinite) quota, and puts various app uids to be restricted under quota interfaces as appropriate. This new network blocking needs a new facility to be able to white list apps, such as GmsCore. To do this, I refactored the package manager's permission configuration stuff into a separate SystemConfig class that can be used by others, and it now has a new tag to specify package names that should be white-listed for power save mode. These are retrieved by the network policy manager and used to build a whitelist of uids. The new general config files can now go in system/etc/config, though currently everything still remains in the permissions dir. Still left to be done is changing the semantics of what uids are allowed in this mode, to include all perceptable uids. (So that we can still do things like background music playback.) This will be done in a follow-on CL. Change-Id: I9bb7029f61dae62e6236da5ca60765439f8d76d2
Diffstat (limited to 'data/etc')
-rw-r--r--data/etc/platform.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 3857ec0..91f5896 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -141,4 +141,8 @@
<library name="javax.obex"
file="/system/framework/javax.obex.jar"/>
+ <!-- These are the standard packages that are white-listed to always have internet
+ access while in power save mode, even if they aren't in the foreground. -->
+ <allow-in-power-save package="com.android.providers.downloads" />
+
</permissions>