summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-02-21 15:11:13 -0800
committerDianne Hackborn <hackbod@google.com>2012-02-23 16:39:15 -0800
commite639da7baa23121e35aa06d6e182558e0e755696 (patch)
tree7d956fc301eb1988a8646ff3a62786639a843da0 /test-runner
parentb8678d76c3e09d0d65255f3971b6112a48e19099 (diff)
downloadframeworks_base-e639da7baa23121e35aa06d6e182558e0e755696.zip
frameworks_base-e639da7baa23121e35aa06d6e182558e0e755696.tar.gz
frameworks_base-e639da7baa23121e35aa06d6e182558e0e755696.tar.bz2
New development permissions.
These are permissions that an application can request, but won't normally be granted. To have the permission granted, the user must explicitly do so through a new "adb shell pm grant" command. I put these permissions in the "development tools" permission group. Looking at the stuff there, I think all of the permissions we already had in that group should be turned to development permissions; I don't think any of them are protecting public APIs, and they are really not things normal applications should use. The support this, the protectionLevel of a permission has been modified to consist of a base protection type with additional flags. The signatureOrSystem permission has thus been converted to a signature base type with a new "system" flag; you can use "system" and/or "dangerous" flags with signature permissions as desired. The permissions UI has been updated to understand these new types of permissions and know when to display them. Along with doing that, it also now shows you which permissions are new when updating an existing application. This also starts laying the ground-work for "optional" permissions (which development permissions are a certain specialized form of). Completing that work requires some more features in the package manager to understand generic optional permissions (having a facility to not apply them when installing), along with the appropriate UI for the app and user to manage those permissions. Change-Id: I6571785c6bb5f6b291862b7a9be584885f88f3a5
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/src/android/test/mock/MockPackageManager.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index 58680ea..351c771 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -159,6 +159,18 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
+ /** @hide */
+ @Override
+ public void grantPermission(String packageName, String permissionName) {
+ throw new UnsupportedOperationException();
+ }
+
+ /** @hide */
+ @Override
+ public void revokePermission(String packageName, String permissionName) {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public int checkSignatures(String pkg1, String pkg2) {
throw new UnsupportedOperationException();