Loading core/java/android/util/imetracing/ImeTracing.java +0 −7 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.inputmethodservice.AbstractInputMethodService; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager.ServiceNotFoundException; import android.os.ShellCommand; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -103,12 +102,6 @@ public abstract class ImeTracing { */ public abstract void addToBuffer(ProtoOutputStream proto, int source); /** * @param shell The shell command to process * @return {@code 0} if the command was successfully processed, {@code -1} otherwise */ public abstract int onShellCommand(ShellCommand shell); /** * Starts a proto dump of the client side information. * Loading core/java/android/util/imetracing/ImeTracingClientImpl.java +0 −6 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.inputmethodservice.AbstractInputMethodService; import android.os.RemoteException; import android.os.ServiceManager.ServiceNotFoundException; import android.os.ShellCommand; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodManager; Loading @@ -44,11 +43,6 @@ class ImeTracingClientImpl extends ImeTracing { public void addToBuffer(ProtoOutputStream proto, int source) { } @Override public int onShellCommand(ShellCommand shell) { return -1; } @Override public void triggerClientDump(String where, @NonNull InputMethodManager immInstance, ProtoOutputStream icProto) { Loading core/java/android/util/imetracing/ImeTracingServerImpl.java +0 −27 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.annotation.Nullable; import android.inputmethodservice.AbstractInputMethodService; import android.os.RemoteException; import android.os.ServiceManager.ServiceNotFoundException; import android.os.ShellCommand; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodEditorTraceProto.InputMethodClientsTraceFileProto; Loading Loading @@ -106,32 +105,6 @@ class ImeTracingServerImpl extends ImeTracing { } } /** * Responds to a shell command of the format "adb shell cmd input_method ime tracing <command>" * * @param shell The shell command to process * @return {@code 0} if the command was valid and successfully processed, {@code -1} otherwise */ @Override public int onShellCommand(ShellCommand shell) { PrintWriter pw = shell.getOutPrintWriter(); String cmd = shell.getNextArgRequired(); switch (cmd) { case "start": startTrace(pw); return 0; case "stop": stopTrace(pw); return 0; default: pw.println("Unknown command: " + cmd); pw.println("Input method trace options:"); pw.println(" start: Start tracing"); pw.println(" stop: Stop tracing"); return -1; } } @Override public void triggerClientDump(String where, InputMethodManager immInstance, ProtoOutputStream icProto) { Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +17 −2 Original line number Diff line number Diff line Loading @@ -5838,7 +5838,22 @@ public class InputMethodManagerService extends IInputMethodManager.Stub @BinderThread @ShellCommandResult private int handleShellCommandTraceInputMethod(@NonNull ShellCommand shellCommand) { int result = ImeTracing.getInstance().onShellCommand(shellCommand); final String cmd = shellCommand.getNextArgRequired(); final PrintWriter pw = shellCommand.getOutPrintWriter(); switch (cmd) { case "start": ImeTracing.getInstance().getInstance().startTrace(pw); break; case "stop": ImeTracing.getInstance().stopTrace(pw); break; default: pw.println("Unknown command: " + cmd); pw.println("Input method trace options:"); pw.println(" start: Start tracing"); pw.println(" stop: Stop tracing"); return ShellCommandResult.FAILURE; } boolean isImeTraceEnabled = ImeTracing.getInstance().isEnabled(); ArrayMap<IBinder, ClientState> clients; synchronized (mMethodMap) { Loading @@ -5854,7 +5869,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } } return result; return ShellCommandResult.SUCCESS; } /** Loading Loading
core/java/android/util/imetracing/ImeTracing.java +0 −7 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.inputmethodservice.AbstractInputMethodService; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager.ServiceNotFoundException; import android.os.ShellCommand; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -103,12 +102,6 @@ public abstract class ImeTracing { */ public abstract void addToBuffer(ProtoOutputStream proto, int source); /** * @param shell The shell command to process * @return {@code 0} if the command was successfully processed, {@code -1} otherwise */ public abstract int onShellCommand(ShellCommand shell); /** * Starts a proto dump of the client side information. * Loading
core/java/android/util/imetracing/ImeTracingClientImpl.java +0 −6 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.inputmethodservice.AbstractInputMethodService; import android.os.RemoteException; import android.os.ServiceManager.ServiceNotFoundException; import android.os.ShellCommand; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodManager; Loading @@ -44,11 +43,6 @@ class ImeTracingClientImpl extends ImeTracing { public void addToBuffer(ProtoOutputStream proto, int source) { } @Override public int onShellCommand(ShellCommand shell) { return -1; } @Override public void triggerClientDump(String where, @NonNull InputMethodManager immInstance, ProtoOutputStream icProto) { Loading
core/java/android/util/imetracing/ImeTracingServerImpl.java +0 −27 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.annotation.Nullable; import android.inputmethodservice.AbstractInputMethodService; import android.os.RemoteException; import android.os.ServiceManager.ServiceNotFoundException; import android.os.ShellCommand; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodEditorTraceProto.InputMethodClientsTraceFileProto; Loading Loading @@ -106,32 +105,6 @@ class ImeTracingServerImpl extends ImeTracing { } } /** * Responds to a shell command of the format "adb shell cmd input_method ime tracing <command>" * * @param shell The shell command to process * @return {@code 0} if the command was valid and successfully processed, {@code -1} otherwise */ @Override public int onShellCommand(ShellCommand shell) { PrintWriter pw = shell.getOutPrintWriter(); String cmd = shell.getNextArgRequired(); switch (cmd) { case "start": startTrace(pw); return 0; case "stop": stopTrace(pw); return 0; default: pw.println("Unknown command: " + cmd); pw.println("Input method trace options:"); pw.println(" start: Start tracing"); pw.println(" stop: Stop tracing"); return -1; } } @Override public void triggerClientDump(String where, InputMethodManager immInstance, ProtoOutputStream icProto) { Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +17 −2 Original line number Diff line number Diff line Loading @@ -5838,7 +5838,22 @@ public class InputMethodManagerService extends IInputMethodManager.Stub @BinderThread @ShellCommandResult private int handleShellCommandTraceInputMethod(@NonNull ShellCommand shellCommand) { int result = ImeTracing.getInstance().onShellCommand(shellCommand); final String cmd = shellCommand.getNextArgRequired(); final PrintWriter pw = shellCommand.getOutPrintWriter(); switch (cmd) { case "start": ImeTracing.getInstance().getInstance().startTrace(pw); break; case "stop": ImeTracing.getInstance().stopTrace(pw); break; default: pw.println("Unknown command: " + cmd); pw.println("Input method trace options:"); pw.println(" start: Start tracing"); pw.println(" stop: Stop tracing"); return ShellCommandResult.FAILURE; } boolean isImeTraceEnabled = ImeTracing.getInstance().isEnabled(); ArrayMap<IBinder, ClientState> clients; synchronized (mMethodMap) { Loading @@ -5854,7 +5869,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } } return result; return ShellCommandResult.SUCCESS; } /** Loading