From 292e4dabe97f77ea91945b2f520c0c680fabb145 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Tue, 26 Mar 2013 16:53:17 -0700 Subject: 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 --- res/values/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'res') diff --git a/res/values/strings.xml b/res/values/strings.xml index db43792a..a43af793 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -142,4 +142,8 @@ This update requires no new permissions. + + Do you want to grant the following permissions? + It will get access to: + -- cgit v1.2.3