summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Krishnan <vinodkrishnan@google.com>2015-11-07 17:38:18 (GMT)
committerandroid-build-merger <android-build-merger@google.com>2015-11-07 17:38:18 (GMT)
commit6f8e0b2bdc64cf625baa234fd8bd4fb423601be4 (patch)
treec1cb09a17c34b5b4a3c9e4c808ccd1987a4eebef
parent09ae425c5e0d46e60b464d26083aa556c9204e28 (diff)
parent012a557f593bd2862756839eeade4b892b05422e (diff)
downloadandroid_packages_apps_PackageInstaller-6f8e0b2bdc64cf625baa234fd8bd4fb423601be4.zip
android_packages_apps_PackageInstaller-6f8e0b2bdc64cf625baa234fd8bd4fb423601be4.tar.gz
android_packages_apps_PackageInstaller-6f8e0b2bdc64cf625baa234fd8bd4fb423601be4.tar.bz2
resolve merge conflicts of e8c6801367 to cw-e-dev.
am: 012a557f59 * commit '012a557f593bd2862756839eeade4b892b05422e': resolve merge conflicts of e8c6801367 to cw-e-dev.
-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]);
}
}