Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c41f6cd authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 856a5a86: Merge "Fix issue #8768456: Settings > App Info under reports..." into jb-mr2-dev

* commit '856a5a86':
  Fix issue #8768456: Settings > App Info under reports...
parents 77a66f44 856a5a86
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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 : "!");
+7 −3
Original line number Diff line number Diff line
@@ -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;
        }