* commit '856a5a860e11a85f8fbb1ad07f6ef444abeafbaf': Fix issue #8768456: Settings > App Info under reports...
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 : "!");
|
||||
|
||||
@@ -9234,18 +9234,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) {
|
||||
@@ -9264,8 +9268,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