History log of /frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
be7c50e0a14e91330ce13161bc14a33d34ff6aca 30-Jun-2014 Dianne Hackborn <hackbod@google.com> 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
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
d0c6ccbafdebc73d03cf3cd47f02f9f6c78a69ff 15-Sep-2012 Jeff Sharkey <jsharkey@android.com> Move NetworkPolicy from apps to UID.

For multi-user devices, switch to storing policy per-user instead of
per-app. Also watch for user added/removed broadcasts to clean up
policies and apply global restrictions.

Bug: 7121279
Change-Id: Ia7326bd0ebe0586fa4ec6d3a62f6313dc8814007
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
7bf8fba6f0e0fe8072201a0b174727b905437990 16-Apr-2012 Jeff Sharkey <jsharkey@android.com> Merge "API to report if active network is metered."
9f7cbf0e50bcb7e9163b23524814003ba8784732 13-Apr-2012 Jeff Sharkey <jsharkey@android.com> API to report if active network is metered.

Report to developers if active network is "metered" and define it
as the user being sensitive to heavy data usage.

Bug: 3001465
Change-Id: I855ca3cd3eb1de3c4814148d70ccf24957af898a
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
854b2b1670bda1eeb87a14b7ac3d222024f0aad6 14-Apr-2012 Jeff Sharkey <jsharkey@android.com> Surface list of apps with given network policy.

Bug: 6007276
Change-Id: I0f0e939ee6481496480c4afaa108c99eb158547c
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
8a8b581e669f6187b397f856a567a76ed8aba2c2 22-Mar-2012 Jeff Sharkey <jsharkey@android.com> Move network policy to per-appId (instead of UID).

To support multi-user, store network policy per-appId and expand to
apply rules to all UserInfo on device.

Bug: 6140462
Change-Id: Ic0866b4d41c8c60cc1c0a597f0de927b92b65b1e
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
0e2e5f8b564bebd5798c9fa387fbff96429ab5d2 03-Feb-2012 Jeff Sharkey <jsharkey@android.com> Support snoozing of data warning notification.

Introduce second snooze timestamp to support dismissal of data usage
warning notification. Also explicitly set notification "when" to
avoid fighting with other notifications, such as ongoing downloads.

Bug: 5443756, 5262414
Change-Id: I03342c25b0410b1b2db84de9a40884f04cb1d8ae
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
f0ceede8fff5df24e5c98701d81c2b71eb138aa9 03-Aug-2011 Jeff Sharkey <jsharkey@android.com> Expose quota status for active network.

Create API to expose quota status derived from underlying network
policy. This is designed to support applications making informed
decisions when performing network requests.

Fix bug with random stats generation, and write policy when changing
restrict background data flag. Deprecate EXTRA_NETWORK_INFO, since
it varies based on UID.

Bug: 4517283, 5088603
Change-Id: Ic6893a8967f69937e466be226ba7bb86ef5a5d2d
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
4664500de0c1b270bce4991a400ab439ff2ef77b 28-Jul-2011 Jeff Sharkey <jsharkey@android.com> Maintain separate "restrict background data" flag.

Since "restrict background" depends on active networks, separate its
definition from setBackgroundDataSetting().

Bug: 4979025
Change-Id: I12bfe3a2e606375b39c67706270caa7a1bb0214e
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
41ff7ec82422a5b6d00892afdb3232bc0e53d851 26-Jul-2011 Jeff Sharkey <jsharkey@android.com> Revise data limit notifs, watch kernel alerts.

Teach NetworkPolicy limits to "snooze" when requested by user, and
notify with both dialog and notification. Register for network alerts
through NMS to trigger updates immediately instead of waiting for
next stats update.

Enforce that all NetworkPolicy are unique on a template basis, and
move SCREEN_ON/OFF broadcasts to background thread. Launch SystemUI
and Settings directly instead of using actions, and include full
NetworkTemplate in extras.

Tests to verify notification and snooze behavior.

Bug: 5057979, 5023579, 4723336, 5045721
Change-Id: I03724beff94a7c0547cb5220431ba8d4cd44d077
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
22c055e6424e0e9579711545d8f4800c0f796db8 13-Jun-2011 Jeff Sharkey <jsharkey@android.com> External mutation of full NetworkPolicy set.

Instead of embedding complex template coexistence rules into policy
service, rely on external editors to enforce, and offer atomic
get/set operations for full policy sets.

Generate default mobile policy when none exists, using default of 4GB
warning and cycle reset of current day. Dispatch listener events
through Handler when holding internal lock, and catch CLASS_UNKNOWN
networks in 3G_LOWER template.

Change-Id: I063cf1eaf330e32b75d0697b89fc04488e6dfaea
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
21c9c45e5caf62b935354b74392fb40c4bf18529 07-Jun-2011 Jeff Sharkey <jsharkey@android.com> Interface-level network policy, persist policies.

Define NetworkPolicy as cycle-reset day and warning/limit values, and
set/get through NetworkPolicyManager. Watch ConnectivityManager for
network connection events, and apply quota rules based on matching
interfaces. Policy service matches based on strong identity to support
IMSI-specific policy values.

Calculates remaining quota based on current stats recorded since the
last reset cycle day. Tests to verify edge cases around February.

Persist network and UID policies in XML, and restore on boot.

Change-Id: Id40ba7d6eed6094fbd5e18e6331286c606880d80
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
9599cc5f21152860af9d18015b1398b50743da76 22-May-2011 Jeff Sharkey <jsharkey@android.com> Tests for NetworkPolicyManager rule generation.

Verifies that policy changes trigger rule updates that respect current
foregroundActivities status. Also verifies logic that promotes a UID
based on its most-foreground PID. Verifies that policy changes result
in immediate rule changes.

Also verifies that BACKGROUND_DATA_SETTING_CHANGED broadcasts are sent
by policy changes.

Change-Id: I4fd0dad9e1dbccee2c5968244bb1814e6cb2c6e1
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
c006f1aec15454782c35e028ad64d79a5c161cc1 20-May-2011 Jeff Sharkey <jsharkey@android.com> Policy and rules work for ConnectivityManager.

Teach ConnectivityManager about UID-specific rules derived from policy,
such as rejecting network traffic on "paid" interfaces. Calls that
return NetworkInfo now filter based on any REJECT rules in effect for
the calling UID. (Added uid parameter if callers that still want all
interfaces.)

Changed NetworkPolicyManager to derive rules based on current policy
combined with PowerManager and ActivityManager status, which it passes
to ConnectivityService for eventual enforcement through netd. When
rules change the usability of a NetworkInfo for a specific UID, it also
dispatches CONNECTIVITY_ACTION broadcasts to that UID. Combined paid
and background policy together to match current working definition.

Change-Id: I797ea49439fcc487cfe2cbc16703d4b91ceb9af6
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
a4620793038b9a9163b26c6ece882cb454fcbf87 21-May-2011 Jeff Sharkey <jsharkey@android.com> Observe screen on/off events in NetworkPolicy.

The POLICY_REJECT_BACKGROUND policy requires that network traffic be
blocked when a UID goes into the background. Even if the UID has an
activity in the foreground, it's considered "background" if the screen
is turned off.

This changes watches for SCREEN_ON/OFF broadcasts, and rule generation
now observes screen state. It also introduces an observer pattern so
that ActivityManager doesn't directly know about NetworkPolicy, and
moves the service management into SystemServer.

Change-Id: Ie7a84929d3ca60ae4578d47e19d5a8da10fd8d58
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl
d5cdd597b895a48ffa9a8e39f8a2504cd9b905c4 04-May-2011 Jeff Sharkey <jsharkey@android.com> First pass at NetworkPolicy and activity tracking.

New system service that maintains low-level network policy rules and
collects statistics to drive those rules. Will eventually connect to
netfilter kernel module through NetworkManagementService and "netd".

Begin tracking foreground activities in ActivityManagerService, which
is updated as part of OOM adjustment. Eventually a network policy of
POLICY_REJECT_BACKGROUND will reject network traffic from background
processes.

Change-Id: I5ffbbaee1b9628e9c3eff6b9cb2145fc5316e64d
/frameworks/base/core/java/android/net/INetworkPolicyManager.aidl