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

Commit 1f89e284 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Print when the sysui dump actually starts.

This highlights that the CRITICAL dumps are captured within 2-3s of starting the bugreport, while NORMAL dumps can sometimes take a couple minutes to start being collected.

Test: adb bugreport -> ABT
Bug: 292221335
Change-Id: I49cbbd17a0b73505d4911abea364bb88b95144d5
parent fb620579
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.dump

import android.icu.text.SimpleDateFormat
import android.os.SystemClock
import android.os.Trace
import com.android.systemui.ProtoDumpable
@@ -32,6 +33,7 @@ import java.io.BufferedOutputStream
import java.io.FileDescriptor
import java.io.FileOutputStream
import java.io.PrintWriter
import java.util.Locale
import javax.inject.Inject
import kotlin.system.measureTimeMillis

@@ -106,6 +108,8 @@ constructor(
                return
            }

        pw.print("Dump starting: ")
        pw.println(DATE_FORMAT.format(System.currentTimeMillis()))
        when {
            parsedArgs.dumpPriority == PRIORITY_ARG_CRITICAL -> dumpCritical(pw, parsedArgs)
            parsedArgs.dumpPriority == PRIORITY_ARG_NORMAL && !parsedArgs.proto -> {
@@ -488,6 +492,7 @@ constructor(
    }
}

private val DATE_FORMAT = SimpleDateFormat("MM-dd HH:mm:ss.SSS", Locale.US)
private val PRIORITY_OPTIONS = arrayOf(PRIORITY_ARG_CRITICAL, PRIORITY_ARG_NORMAL)

private val COMMANDS =