diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2011-05-02 17:51:29 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2011-06-22 10:15:32 -0700 |
| commit | 9e18fd1a72ceca43ffd8bc50476a05e236b38b08 (patch) | |
| tree | e82a4418007ef2a45d5a62019f30b20cbff81bb7 | |
| parent | 8969d9924c662ab4cdacc342bbdc33756db730be (diff) | |
| download | frameworks_base-9e18fd1a72ceca43ffd8bc50476a05e236b38b08.zip frameworks_base-9e18fd1a72ceca43ffd8bc50476a05e236b38b08.tar.gz frameworks_base-9e18fd1a72ceca43ffd8bc50476a05e236b38b08.tar.bz2 | |
Permissions to protect bandwidth statistics.
Introduces new "net_bw_stats" group which will protect reading
detailed bandwidth statistics from the kernel. Also introduce
"net_bw_acct" group which will enable specific applications to
request that their network traffic be counted against other UIDs.
This change associates manifest permissions with the low-level GIDs.
Change-Id: If3fc28053afda201ff305d798a8878ff1f35b997
| -rw-r--r-- | core/res/AndroidManifest.xml | 8 | ||||
| -rwxr-xr-x | core/res/res/values/strings.xml | 5 | ||||
| -rw-r--r-- | data/etc/platform.xml | 10 |
3 files changed, 23 insertions, 0 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 47902a8..53e063a 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1393,6 +1393,14 @@ android:description="@string/permdesc_manageNetworkPolicy" android:protectionLevel="signature" /> + <!-- Allows an application to account its network traffic against other UIDs. Used + by system services like download manager and media server. Not for use by + third party apps. @hide --> + <permission android:name="android.permission.MODIFY_NETWORK_ACCOUNTING" + android:label="@string/permlab_modifyNetworkAccounting" + android:description="@string/permdesc_modifyNetworkAccounting" + android:protectionLevel="signatureOrSystem" /> + <!-- C2DM permission. @hide Used internally. --> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index b5f4084..a525ee3 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1443,6 +1443,11 @@ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permdesc_manageNetworkPolicy">Allows an application to manage network policies and define application-specific rules.</string> + <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> + <string name="permlab_modifyNetworkAccounting">modify network usage accounting</string> + <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> + <string name="permdesc_modifyNetworkAccounting">Allows modification of how network usage is accounted against applications. Not for use by normal applications.</string> + <!-- Policy administration --> <!-- Title of policy access to limiting the user's password choices --> diff --git a/data/etc/platform.xml b/data/etc/platform.xml index b9c0d80..0b8d40f 100644 --- a/data/etc/platform.xml +++ b/data/etc/platform.xml @@ -84,6 +84,16 @@ <group gid="diag" /> </permission> + <!-- Group that can read detailed network usage statistics --> + <permission name="android.permission.READ_NETWORK_USAGE_HISTORY"> + <group gid="net_bw_stats" /> + </permission> + + <!-- Group that can modify how network statistics are accounted --> + <permission name="android.permission.MODIFY_NETWORK_ACCOUNTING"> + <group gid="net_bw_acct" /> + </permission> + <!-- ================================================================== --> <!-- ================================================================== --> <!-- ================================================================== --> |
