diff options
-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 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); } } } |