summaryrefslogtreecommitdiffstats
path: root/services/core
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-08-28 11:20:39 -0700
committerJeff Sharkey <jsharkey@android.com>2015-08-28 11:50:22 -0700
commite515c6495d2ad6317303617ba20509b4e8aa7654 (patch)
tree9c8861d4d5cfd97ff295c93d597f51c6f107a9d7 /services/core
parent3883e72aeda7dcc5f76eba7ad2e95ad2cb041687 (diff)
downloadframeworks_base-e515c6495d2ad6317303617ba20509b4e8aa7654.zip
frameworks_base-e515c6495d2ad6317303617ba20509b4e8aa7654.tar.gz
frameworks_base-e515c6495d2ad6317303617ba20509b4e8aa7654.tar.bz2
Give shell permission to move apps.
Also clear identity when measuring ASEC sizes to relax a second permission requirement. Bug: 23600574 Change-Id: Ib3a104426758e0e8f35dff0e504fe874bed7311f
Diffstat (limited to 'services/core')
-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 74200cb..6d4d900 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -13600,9 +13600,14 @@ public class PackageManagerService extends IPackageManager.Stub {
libDirRoot = ps.legacyNativeLibraryPathString;
}
if (p != null && (isExternal(p) || p.isForwardLocked())) {
- String secureContainerId = cidFromCodePath(p.applicationInfo.getBaseCodePath());
- if (secureContainerId != null) {
- asecPath = PackageHelper.getSdFilesystem(secureContainerId);
+ final long token = Binder.clearCallingIdentity();
+ try {
+ String secureContainerId = cidFromCodePath(p.applicationInfo.getBaseCodePath());
+ if (secureContainerId != null) {
+ asecPath = PackageHelper.getSdFilesystem(secureContainerId);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
}
}
}