From 32a71128ce7fc3826074ebdfa33f556668726902 Mon Sep 17 00:00:00 2001 From: Fyodor Kupolov Date: Wed, 25 Apr 2018 10:41:01 -0700 Subject: [PATCH] Ignore dumpsys -a option Also log unrecognized options, but continue with dumping the state Test: dumpsys binder_calls_stats -a Bug: 75318418 Change-Id: If9ad046d64d71cff97006e0a6d9f45c5ea0f23ce --- .../java/com/android/server/BinderCallsStatsService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/BinderCallsStatsService.java b/services/core/java/com/android/server/BinderCallsStatsService.java index ae14dfaa4db19..1cd853ff3efea 100644 --- a/services/core/java/com/android/server/BinderCallsStatsService.java +++ b/services/core/java/com/android/server/BinderCallsStatsService.java @@ -56,7 +56,10 @@ public class BinderCallsStatsService extends Binder { protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (args != null) { for (final String arg : args) { - if ("--reset".equals(arg)) { + if ("-a".equals(arg)) { + // We currently dump all information by default + continue; + } else if ("--reset".equals(arg)) { reset(); pw.println("binder_calls_stats reset."); return; @@ -78,7 +81,6 @@ public class BinderCallsStatsService extends Binder { return; } else { pw.println("Unknown option: " + arg); - return; } } }