Loading src/java/com/android/internal/telephony/DebugService.java +3 −2 Original line number Diff line number Diff line Loading @@ -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); Loading src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading
src/java/com/android/internal/telephony/DebugService.java +3 −2 Original line number Diff line number Diff line Loading @@ -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); Loading
src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; } } Loading