summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-07-29 08:33:42 -0700
committerSvet Ganov <svetoslavganov@google.com>2015-07-29 08:33:46 -0700
commitf1b7f20bb839c96e8254ccb65398135f10fd45d9 (patch)
tree7803c21a30ad4f110925ee94a1b76735a1c1d406 /services
parent02022b70bef7d6964bc8043385531d1aa97fb15b (diff)
downloadframeworks_base-f1b7f20bb839c96e8254ccb65398135f10fd45d9.zip
frameworks_base-f1b7f20bb839c96e8254ccb65398135f10fd45d9.tar.gz
frameworks_base-f1b7f20bb839c96e8254ccb65398135f10fd45d9.tar.bz2
Remove dependencies on the package installer's package name
bug:22700053 Change-Id: I8540eb8577fbec84e1a67e31e1c31ba654c828a4
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerSession.java2
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index b5ef3b7..4a473fd 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -489,7 +489,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
// User needs to accept permissions; give installer an intent they
// can use to involve user.
final Intent intent = new Intent(PackageInstaller.ACTION_CONFIRM_PERMISSIONS);
- intent.setPackage("com.android.packageinstaller");
+ intent.setPackage(mContext.getPackageManager().getPermissionControllerPackageName());
intent.putExtra(PackageInstaller.EXTRA_SESSION_ID, sessionId);
try {
mRemoteObserver.onUserActionRequired(intent);
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index b7756ac..a867ca9 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -3195,6 +3195,13 @@ public class PackageManagerService extends IPackageManager.Stub {
}
}
+ @Override
+ public String getPermissionControllerPackageName() {
+ synchronized (mPackages) {
+ return mRequiredInstallerPackage;
+ }
+ }
+
/**
* Checks if the request is from the system or an app that has INTERACT_ACROSS_USERS
* or INTERACT_ACROSS_USERS_FULL permissions, if the userid is not for the caller.