summaryrefslogtreecommitdiffstats
path: root/services/core/java
diff options
context:
space:
mode:
authorTodd Kennedy <toddke@google.com>2015-07-16 17:59:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-16 17:59:35 +0000
commita4911ed97102b638a373adcdae7e4c9b3c64cc30 (patch)
treedc3ae18f3102cab53b704e69253ad5f5b28cd9eb /services/core/java
parent1181323230478e3027bbabbbaf769dcd4a11a0e4 (diff)
parent633f19983182fbcf9479f6d5dd9f5e29e37f4cd0 (diff)
downloadframeworks_base-a4911ed97102b638a373adcdae7e4c9b3c64cc30.zip
frameworks_base-a4911ed97102b638a373adcdae7e4c9b3c64cc30.tar.gz
frameworks_base-a4911ed97102b638a373adcdae7e4c9b3c64cc30.tar.bz2
Merge "Verfiy global apps with device owner" into mnc-dev
Diffstat (limited to 'services/core/java')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 2a08c34..7602990 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -10620,6 +10620,12 @@ public class PackageManagerService extends IPackageManager.Stub {
final List<ComponentName> sufficientVerifiers = matchVerifiers(pkgLite,
receivers, verificationState);
+ // Apps installed for "all" users use the device owner to verify the app
+ UserHandle verifierUser = getUser();
+ if (verifierUser == UserHandle.ALL) {
+ verifierUser = UserHandle.OWNER;
+ }
+
/*
* If any sufficient verifiers were listed in the package
* manifest, attempt to ask them.
@@ -10635,8 +10641,7 @@ public class PackageManagerService extends IPackageManager.Stub {
final Intent sufficientIntent = new Intent(verification);
sufficientIntent.setComponent(verifierComponent);
-
- mContext.sendBroadcastAsUser(sufficientIntent, getUser());
+ mContext.sendBroadcastAsUser(sufficientIntent, verifierUser);
}
}
}
@@ -10651,7 +10656,7 @@ public class PackageManagerService extends IPackageManager.Stub {
* target BroadcastReceivers have run.
*/
verification.setComponent(requiredVerifierComponent);
- mContext.sendOrderedBroadcastAsUser(verification, getUser(),
+ mContext.sendOrderedBroadcastAsUser(verification, verifierUser,
android.Manifest.permission.PACKAGE_VERIFICATION_AGENT,
new BroadcastReceiver() {
@Override