Fix issue #8768456: Settings > App Info under reports...
...app storage size for apps w/ .so files The lib directories are tagged with the apk install number, so must be explicitly passed down to installd. Change-Id: Ic37b03726f9a7405eb05956703f8198223b22595
This commit is contained in:
@ -307,8 +307,8 @@ public final class Installer {
|
||||
return execute(builder.toString());
|
||||
}
|
||||
|
||||
public int getSizeInfo(String pkgName, int persona, String apkPath, String fwdLockApkPath,
|
||||
String asecPath, PackageStats pStats) {
|
||||
public int getSizeInfo(String pkgName, int persona, String apkPath, String libDirPath,
|
||||
String fwdLockApkPath, String asecPath, PackageStats pStats) {
|
||||
StringBuilder builder = new StringBuilder("getsize");
|
||||
builder.append(' ');
|
||||
builder.append(pkgName);
|
||||
@ -317,6 +317,8 @@ public final class Installer {
|
||||
builder.append(' ');
|
||||
builder.append(apkPath);
|
||||
builder.append(' ');
|
||||
builder.append(libDirPath != null ? libDirPath : "!");
|
||||
builder.append(' ');
|
||||
builder.append(fwdLockApkPath != null ? fwdLockApkPath : "!");
|
||||
builder.append(' ');
|
||||
builder.append(asecPath != null ? asecPath : "!");
|
||||
|
@ -9164,18 +9164,22 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
}
|
||||
PackageParser.Package p;
|
||||
boolean dataOnly = false;
|
||||
String libDirPath = null;
|
||||
String asecPath = null;
|
||||
synchronized (mPackages) {
|
||||
p = mPackages.get(packageName);
|
||||
PackageSetting ps = mSettings.mPackages.get(packageName);
|
||||
if(p == null) {
|
||||
dataOnly = true;
|
||||
PackageSetting ps = mSettings.mPackages.get(packageName);
|
||||
if((ps == null) || (ps.pkg == null)) {
|
||||
Slog.w(TAG, "Package named '" + packageName +"' doesn't exist.");
|
||||
return false;
|
||||
}
|
||||
p = ps.pkg;
|
||||
}
|
||||
if (ps != null) {
|
||||
libDirPath = ps.nativeLibraryPathString;
|
||||
}
|
||||
if (p != null && (isExternal(p) || isForwardLocked(p))) {
|
||||
String secureContainerId = cidFromCodePath(p.applicationInfo.sourceDir);
|
||||
if (secureContainerId != null) {
|
||||
@ -9194,8 +9198,8 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
publicSrcDir = applicationInfo.publicSourceDir;
|
||||
}
|
||||
}
|
||||
int res = mInstaller.getSizeInfo(packageName, userHandle, p.mPath, publicSrcDir,
|
||||
asecPath, pStats);
|
||||
int res = mInstaller.getSizeInfo(packageName, userHandle, p.mPath, libDirPath,
|
||||
publicSrcDir, asecPath, pStats);
|
||||
if (res < 0) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user