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

Commit e11ae3db authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "PrintSpooler: Clean up log_print_jobs flag" into main

parents 0fdbdb2b 11f4b26b
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
package: "com.android.printspooler.flags"
container: "system"

flag {
  name: "log_print_jobs"
  namespace: "printing"
  description: "Log print job creation and state transitions."
  bug: "385340868"
}

flag {
  name: "printing_telemetry"
  namespace: "printing"
+3 −9
Original line number Diff line number Diff line
@@ -503,10 +503,8 @@ public final class PrintSpoolerService extends Service {
            keepAwakeLocked();
        }

        if (Flags.logPrintJobs() || DEBUG_PRINT_JOB_LIFECYCLE) {
        Slog.i(LOG_TAG, "[ADD] " + printJob);
    }
    }

    private void removeObsoletePrintJobs() {
        synchronized (mLock) {
@@ -516,9 +514,7 @@ public final class PrintSpoolerService extends Service {
                PrintJobInfo printJob = mPrintJobs.get(i);
                if (isObsoleteState(printJob.getState())) {
                    mPrintJobs.remove(i);
                    if (Flags.logPrintJobs() || DEBUG_PRINT_JOB_LIFECYCLE) {
                    Slog.i(LOG_TAG, "[REMOVE] " + printJob.getId().flattenToString());
                    }
                    removePrintJobFileLocked(printJob.getId());
                    persistState = true;
                }
@@ -630,9 +626,7 @@ public final class PrintSpoolerService extends Service {
                    checkIfStillKeepAwakeLocked();
                }

                if (Flags.logPrintJobs() || DEBUG_PRINT_JOB_LIFECYCLE) {
                Slog.i(LOG_TAG, "[STATE CHANGED] " + printJob);
                }

                MetricsLogger.histogram(this, PRINT_JOB_STATE_HISTO, state);
                switch (state) {