summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Krishnan <vinodkrishnan@google.com>2015-11-07 17:33:17 (GMT)
committerVinod Krishnan <vinodkrishnan@google.com>2015-11-07 17:33:17 (GMT)
commit012a557f593bd2862756839eeade4b892b05422e (patch)
tree4be83cc28fd7d93f3d193eec2d89bdd977f72dcc
parent914243ab7dd019daa1ae8fcbb538142555597acd (diff)
downloadandroid_packages_apps_PackageInstaller-012a557f593bd2862756839eeade4b892b05422e.zip
android_packages_apps_PackageInstaller-012a557f593bd2862756839eeade4b892b05422e.tar.gz
android_packages_apps_PackageInstaller-012a557f593bd2862756839eeade4b892b05422e.tar.bz2
resolve merge conflicts of e8c6801367 to cw-e-dev.
Change-Id: I9c5a0be4e18cc27e163da60ba9dd81ae71588bef
-rw-r--r--src/com/android/packageinstaller/wear/WearPackageInstallerService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/packageinstaller/wear/WearPackageInstallerService.java b/src/com/android/packageinstaller/wear/WearPackageInstallerService.java
index ba83ea2..d57236e 100644
--- a/src/com/android/packageinstaller/wear/WearPackageInstallerService.java
+++ b/src/com/android/packageinstaller/wear/WearPackageInstallerService.java
@@ -238,7 +238,7 @@ public class WearPackageInstallerService extends Service {
PackageInfo existingPkgInfo = null;
try {
existingPkgInfo = pm.getPackageInfo(packageName,
- PackageManager.GET_UNINSTALLED_PACKAGES);
+ PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_PERMISSIONS);
if(existingPkgInfo != null) {
installFlags |= PackageManager.INSTALL_REPLACE_EXISTING;
}
@@ -298,6 +298,10 @@ public class WearPackageInstallerService extends Service {
// If the permission is granted, then we will not ask to request it again.
if ((existingPkgInfo.requestedPermissionsFlags[i] &
PackageInfo.REQUESTED_PERMISSION_GRANTED) != 0) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, existingPkgInfo.requestedPermissions[i] +
+ " is already granted for " + packageName);
+ }
wearablePerms.remove(existingPkgInfo.requestedPermissions[i]);
}
}