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

Commit cd426751 authored by Florian Mayer's avatar Florian Mayer
Browse files

Add packageInstaller to packages.list.

This will be used by the profilers.

Bug: 170284829
Change-Id: Ie06da26331a87811d571b4975ab35aa2cfd0ff55
parent 6ea939f3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2560,6 +2560,8 @@ public final class Settings implements Watchable, Snappable {
                // profileableFromShellFlag  - 0 or 1 if the package is profileable from shell.
                // longVersionCode - integer version of the package.
                // profileable - 0 or 1 if the package is profileable by the platform.
                // packageInstaller - the package that installed this app, or @system, @product or
                //                    @null.
                //
                // NOTE: We prefer not to expose all ApplicationInfo flags for now.
                //
@@ -2592,6 +2594,17 @@ public final class Settings implements Watchable, Snappable {
                sb.append(pkg.pkg.getLongVersionCode());
                sb.append(" ");
                sb.append(pkg.pkg.isProfileable() ? "1" : "0");
                sb.append(" ");
                if (pkg.isSystem()) {
                    sb.append("@system");
                } else if (pkg.isProduct()) {
                    sb.append("@product");
                } else if (pkg.installSource.installerPackageName != null
                           && !pkg.installSource.installerPackageName.isEmpty()) {
                    sb.append(pkg.installSource.installerPackageName);
                } else {
                    sb.append("@null");
                }
                sb.append("\n");
                writer.append(sb);
            }