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

Commit 80549f9c authored by Edward Cunningham's avatar Edward Cunningham Committed by Android (Google) Code Review
Browse files

Merge "List protected broadcasts in package manager dumpsys output."

parents e35b5423 2e130f68
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public final class DumpState {
    public static final int DUMP_KNOWN_PACKAGES = 1 << 27;
    public static final int DUMP_PER_UID_READ_TIMEOUTS = 1 << 28;
    public static final int DUMP_SNAPSHOT_STATISTICS = 1 << 29;
    public static final int DUMP_PROTECTED_BROADCASTS = 1 << 30;

    public static final int OPTION_SHOW_FILTERS = 1 << 0;
    public static final int OPTION_DUMP_ALL_COMPONENTS = 1 << 1;
+19 −0
Original line number Diff line number Diff line
@@ -19202,6 +19202,7 @@ public class PackageManagerService extends IPackageManager.Stub
                pw.println("    compiler-stats: dump compiler statistics");
                pw.println("    service-permissions: dump permissions required by services");
                pw.println("    snapshot: dump snapshot statistics");
                pw.println("    protected-broadcasts: print list of protected broadcast actions");
                pw.println("    known-packages: dump known packages");
                pw.println("    <package.name>: info about given package");
                return;
@@ -19361,6 +19362,8 @@ public class PackageManagerService extends IPackageManager.Stub
                        opti++;
                    }
                }
            } else if ("protected-broadcasts".equals(cmd)) {
                dumpState.setDump(DumpState.DUMP_PROTECTED_BROADCASTS);
            } else if ("write".equals(cmd)) {
                synchronized (mLock) {
                    writeSettingsLPrTEMP();
@@ -19762,6 +19765,22 @@ public class PackageManagerService extends IPackageManager.Stub
                mSnapshotStatistics.dump(pw, "  ", now, hits, level, dumpState.isBrief());
            }
        }
        if (!checkin
                && dumpState.isDumping(DumpState.DUMP_PROTECTED_BROADCASTS)
                && packageName == null) {
            if (dumpState.onTitlePrinted()) {
                pw.println();
            }
            pw.println("Protected broadcast actions:");
            synchronized (mProtectedBroadcasts) {
                for (int i = 0; i < mProtectedBroadcasts.size(); i++) {
                    pw.print("  ");
                    pw.println(mProtectedBroadcasts.valueAt(i));
                }
            }
        }
    }
    /**