diff options
| author | Ioana Stefan <ioanastefan@google.com> | 2020-10-27 11:30:38 +0000 |
|---|---|---|
| committer | Ioana Stefan <ioanastefan@google.com> | 2020-11-13 12:29:25 +0000 |
| commit | 8418bef70abf31d3cbfcfa500b2e694988735557 (patch) | |
| tree | a531fd7e9ebe3dd4be384e383432b442744b3712 /core/java/android/inputmethodservice/AbstractInputMethodService.java | |
| parent | ab1008480bcc2e400ab90745dee067c5c0b0f050 (diff) | |
Optimized workflow for IME tracing on InputMethodService side
Optimized the tracing logic for the IMS information. The
InputMethodService triggers a tracing dump through the new method
triggerServiceDump, exposed by the meTracing interface. This
change was done to be able to support custom dumps from clients
and custom dumps from InputMethodService.
This change only covers the IMS information. The IMMS
information will be dumped in next changes.
Bug: 154348613
Test: start IME tracing by calling "adb shell ime tracing start"
end IME tracing by calling "adb shell ime tracing stop"
pull trace using "adb pull /data/misc/wmtrace/ime_trace_service.pb ime_trace_service.pb"
Change-Id: Icda0f82d76fb7db5b2bd8d021069b1ff15a4e15b
Diffstat (limited to 'core/java/android/inputmethodservice/AbstractInputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/AbstractInputMethodService.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/inputmethodservice/AbstractInputMethodService.java b/core/java/android/inputmethodservice/AbstractInputMethodService.java index cd436374b489..7cf0b10031ac 100644 --- a/core/java/android/inputmethodservice/AbstractInputMethodService.java +++ b/core/java/android/inputmethodservice/AbstractInputMethodService.java @@ -21,6 +21,7 @@ import android.annotation.NonNull; import android.app.Service; import android.content.Intent; import android.os.IBinder; +import android.util.proto.ProtoOutputStream; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.inputmethod.InputConnection; @@ -195,15 +196,13 @@ public abstract class AbstractInputMethodService extends Service public abstract AbstractInputMethodSessionImpl onCreateInputMethodSessionInterface(); /** - * Dumps the internal state of IME to a protocol buffer output stream initialized using the - * given {@link FileDescriptor}. + * Dumps the internal state of IME to a protocol buffer output stream. * - * @param fd The file descriptor to which proto dump should be written. - * @param args The arguments passed to the dump method. + * @param proto ProtoOutputStream to dump data to. * @hide */ @SuppressWarnings("HiddenAbstractMethod") - abstract void dumpProtoInternal(FileDescriptor fd, String[] args); + public abstract void dumpProtoInternal(ProtoOutputStream proto); /** * Implement this to handle {@link android.os.Binder#dump Binder.dump()} |
