diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java index 8371f39a3f7de..86aefad744e76 100644 --- a/services/core/java/com/android/server/pm/Settings.java +++ b/services/core/java/com/android/server/pm/Settings.java @@ -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); }