History log of /packages/apps/PackageInstaller/src/com/android/packageinstaller/GrantActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
292e4dabe97f77ea91945b2f520c0c680fabb145 27-Mar-2013 Nick Kralevich <nnk@google.com> 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
/packages/apps/PackageInstaller/src/com/android/packageinstaller/GrantActivity.java