diff options
author | Jeff Sharkey <jsharkey@google.com> | 2015-08-28 19:36:31 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-28 19:36:31 +0000 |
commit | 71f1579190ee3658db15f55a4e5571f03ce431b6 (patch) | |
tree | c64b5b37288e7f3b29436a08461b251a54691eb8 | |
parent | 8b403e8cb1bc6bfa2e9ba627f5c48d1a0bc65738 (diff) | |
parent | d88152b4d910fa5e79908dcb6f14cd56ad03b21a (diff) | |
download | frameworks_base-71f1579190ee3658db15f55a4e5571f03ce431b6.zip frameworks_base-71f1579190ee3658db15f55a4e5571f03ce431b6.tar.gz frameworks_base-71f1579190ee3658db15f55a4e5571f03ce431b6.tar.bz2 |
am d88152b4: Merge "Give shell permission to move apps." into mnc-dev
* commit 'd88152b4d910fa5e79908dcb6f14cd56ad03b21a':
Give shell permission to move apps.
-rw-r--r-- | packages/Shell/AndroidManifest.xml | 1 | ||||
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 37e0db0..d785cca 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -65,6 +65,7 @@ <uses-permission android:name="android.permission.READ_INPUT_STATE" /> <uses-permission android:name="android.permission.SET_ORIENTATION" /> <uses-permission android:name="android.permission.INSTALL_PACKAGES" /> + <uses-permission android:name="android.permission.MOVE_PACKAGE" /> <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" /> <uses-permission android:name="android.permission.DELETE_CACHE_FILES" /> <uses-permission android:name="android.permission.DELETE_PACKAGES" /> diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index e1bd9f9..3f5c270 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); } } } |