Skip to content

Commit

Permalink
Give shell permission to move apps.
Browse files Browse the repository at this point in the history
Also clear identity when measuring ASEC sizes to relax a second
permission requirement.

Bug: 23600574
Change-Id: Ib3a104426758e0e8f35dff0e504fe874bed7311f
  • Loading branch information
jsharkey authored and The Android Automerger committed Aug 29, 2015
1 parent b6b58f6 commit 0e81e75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/Shell/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13602,9 +13602,14 @@ private boolean getPackageSizeInfoLI(String packageName, int userHandle,
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);
}
}
}
Expand Down

0 comments on commit 0e81e75

Please sign in to comment.