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

Commit b918dea9 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5406228 from d7030f12 to qt-release

Change-Id: I436d0e4d6579818a096f2cd915289ea9bc5d85b5
parents 8a69562a d7030f12
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -44,8 +44,9 @@ public class DebugService {
     */
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (args != null && args.length > 0) {
            if (TextUtils.equals(args[0], "--metrics") ||
                    TextUtils.equals(args[0], "--metricsproto"))
            if (TextUtils.equals(args[0], "--metrics")
                    || TextUtils.equals(args[0], "--metricsproto")
                    || TextUtils.equals(args[0], "--metricsprototext"))
            {
                log("Collecting telephony metrics..");
                TelephonyMetrics.getInstance().dump(fd, pw, args);
+11 −1
Original line number Diff line number Diff line
@@ -241,13 +241,23 @@ public class TelephonyMetrics {
     */
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (args != null && args.length > 0) {
            boolean reset = true;
            if (args.length > 1 && "--keep".equals(args[1])) {
                reset = false;
            }

            switch (args[0]) {
                case "--metrics":
                    printAllMetrics(pw);
                    break;
                case "--metricsproto":
                    pw.println(convertProtoToBase64String(buildProto()));
                    if (reset) {
                        reset();
                    }
                    break;
                case "--metricsprototext":
                    pw.println(buildProto().toString());
                    break;
            }
        }