From 3ca4ad41be7879bdb39c5751d4ba2df866f81614 Mon Sep 17 00:00:00 2001 From: Songchun Fan Date: Wed, 1 Mar 2023 11:39:38 -0800 Subject: [PATCH] [pm] add initiatingPackageName in dumpsys For easy debugging. BUG: 265203007 Test: manual Change-Id: I30042f4277a6564b7ddab6be134d1bbdf8036177 --- .../java/com/android/server/pm/Settings.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java index f1998f764e7c1..2658d31ed880f 100644 --- a/services/core/java/com/android/server/pm/Settings.java +++ b/services/core/java/com/android/server/pm/Settings.java @@ -5034,19 +5034,20 @@ public final class Settings implements Watchable, Snappable { } } pw.print(prefix); pw.print(" timeStamp="); - date.setTime(ps.getLastModifiedTime()); - pw.println(sdf.format(date)); + date.setTime(ps.getLastModifiedTime()); + pw.println(sdf.format(date)); pw.print(prefix); pw.print(" lastUpdateTime="); - date.setTime(ps.getLastUpdateTime()); - pw.println(sdf.format(date)); - if (ps.getInstallSource().mInstallerPackageName != null) { - pw.print(prefix); pw.print(" installerPackageName="); - pw.println(ps.getInstallSource().mInstallerPackageName); - } - if (ps.getInstallSource().mInstallerPackageUid != INVALID_UID) { - pw.print(prefix); pw.print(" installerPackageUid="); - pw.println(ps.getInstallSource().mInstallerPackageUid); - } + date.setTime(ps.getLastUpdateTime()); + pw.println(sdf.format(date)); + pw.print(prefix); pw.print(" installerPackageName="); + pw.println(ps.getInstallSource().mInstallerPackageName); + pw.print(prefix); pw.print(" installerPackageUid="); + pw.println(ps.getInstallSource().mInstallerPackageUid); + pw.print(prefix); pw.print(" initiatingPackageName="); + pw.println(ps.getInstallSource().mInitiatingPackageName); + pw.print(prefix); pw.print(" originatingPackageName="); + pw.println(ps.getInstallSource().mOriginatingPackageName); + if (ps.getInstallSource().mUpdateOwnerPackageName != null) { pw.print(prefix); pw.print(" updateOwnerPackageName="); pw.println(ps.getInstallSource().mUpdateOwnerPackageName);