From 5af6bb8d54a7d9bb7d34e24b1e549cc4bc963dbd Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Fri, 5 Feb 2021 17:13:41 -0800 Subject: [PATCH] Inline IMMS#doDump() into IMMS#dump() This is a follow up CL to our previous CL [1], which extracted the main part of IMMS#dump() into IMMS#doDump(). As of writing IMMS#doDump() is called from and only from IMMS#dump() and those two methods are implementing a series of operations in a sequential way. So far there may not be any strong reason to keep them separate. Let's see if merging them into one method would make more sense or not. We can later extract out some of core logic when necessary. This is a mechanical refactoring without any behavior change. This is a preparation to fix another unintentional behavior change (Bug 177462676), which was also accidentally introduced in the same CL. [1]: Ie87eb8423e2bb70f28c330983d45b95e2e07062d ac24994aaa5bd1f70608cb8c72b93b5ae00d90eb Bug: 154348613 Bug: 167948910 Bug: 177462676 Test: Manually done as follows. 1. adb shell ime tracing start 2. adb logcat -s imeTracing:* Make sure IME tracing started. 3. adb shell am start -a android.intent.action.DIAL 4. adb bugreport bugreport.zip 5. adb logcat -s imeTracing:* Make sure IME tracing is stopped then restarted. 6. unzip -v bugreport.zip | grep ime_trace_clients.pb Make sure "ime_trace_clients.pb" is included. Change-Id: Icdff29885a9b4e277eea13d504d047fb3b90e7cc --- .../server/inputmethod/InputMethodManagerService.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 78588c9bc6da3..323178edcc693 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -5246,12 +5246,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub imeTracing.startTrace(null); }); } - } - doDump(fd, pw, args, asProto); - } - private void doDump(FileDescriptor fd, PrintWriter pw, String[] args, boolean useProto) { - if (useProto) { final ProtoOutputStream proto = new ProtoOutputStream(fd); dumpDebug(proto, InputMethodManagerServiceTraceProto.INPUT_METHOD_MANAGER_SERVICE); proto.flush();