summaryrefslogtreecommitdiffstats
path: root/AndroidManifest.xml
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-03-26 16:53:17 -0700
committerNick Kralevich <nnk@google.com>2013-03-27 15:35:03 -0700
commit292e4dabe97f77ea91945b2f520c0c680fabb145 (patch)
tree1f6b8d3f5a4ce4727dedec9782d3af0dd786667b /AndroidManifest.xml
parent2055eecd55b944643111c4987e507f4a650f95e4 (diff)
downloadandroid_packages_apps_PackageInstaller-292e4dabe97f77ea91945b2f520c0c680fabb145.tar.gz
android_packages_apps_PackageInstaller-292e4dabe97f77ea91945b2f520c0c680fabb145.tar.bz2
android_packages_apps_PackageInstaller-292e4dabe97f77ea91945b2f520c0c680fabb145.zip
PackageInstaller: add permission granting support
Add support to PackageInstaller for allowing the user to grant permissions to other apps. The user is involved in the decision, and can approve or reject permissions. Applications can make a request to PackageInstaller using something like the following code: private void onPromptPermissionsClicked(String... permissions) { Intent i = getActivity().getApplication() .getPackageManager().requestPermission(permissions); startActivityForResult(i, 0); } This code reuses the sideloading upgrade flow when adding permissions, making the UI very familiar to someone who's sideloaded applications. Conceptually, we are treating a permission grant as a reinstall of the application with new permissions. Change-Id: Ia37f761e5574a490d1d37b9eb40cf5e77c928a40
Diffstat (limited to 'AndroidManifest.xml')
-rw-r--r--AndroidManifest.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b135b3f6..8b04c7fa 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -11,6 +11,7 @@
<uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_USERS" />
+ <uses-permission android:name="android.permission.GRANT_REVOKE_PERMISSIONS" />
<application android:label="@string/app_name"
android:allowBackup="false"
android:theme="@android:style/Theme.DeviceDefault.DialogWhenLarge.NoActionBar"
@@ -49,6 +50,15 @@
<activity android:name=".UninstallAppProgress"
android:configChanges="orientation|keyboardHidden|screenSize">
</activity>
+ <activity android:name=".GrantActivity"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:excludeFromRecents="true"
+ android:theme="@android:style/Theme.DeviceDefault.Dialog.NoActionBar">
+ <intent-filter>
+ <action android:name="android.content.pm.action.REQUEST_PERMISSION" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
<!--
<receiver android:name=".RemoveReceiver">
<intent-filter>