diff options
| author | Yohei Yukawa <yukawa@google.com> | 2021-07-09 09:46:47 -0700 |
|---|---|---|
| committer | Yohei Yukawa <yukawa@google.com> | 2021-07-09 09:46:47 -0700 |
| commit | 26b594af104352c397200de2f0f40b8e2d1a1f04 (patch) | |
| tree | 7a1251c5e5919299885bd6a572fb6d5f1eda0d24 /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 3beeb3e3c7134496d0c5001d419c5f9622977cb0 (diff) | |
Optimize InputConnectionProtoDumper a bit
This is a mechanical refactoring CL that has no behavior change.
Currently all the utility methods defined in
InputConnectionProtoDumper return ProtoOutputStream, while the
returned instances will always be converted into byte[] eventually.
With this CL, those utility methods return byte[] instances directly,
which is expected to make it easier for ART/dexpreopt to do more
optimizations such as code inlining because instances of
ProtoOutputStream will no longer be escaped from those methods.
Bug: 192412909
Test: atest CtsInputMethodTestCases
Test: Manually verified that IME tracing still works
Change-Id: I7b24aee5428da312972aa86b8658429b421490f8
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 6e4491eb0188..e0b001f5ed19 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -3415,7 +3415,7 @@ public class InputMethodService extends AbstractInputMethodService { * @hide */ @Override - public final void dumpProtoInternal(ProtoOutputStream proto, ProtoOutputStream icProto) { + public final void dumpProtoInternal(ProtoOutputStream proto, byte[] icProto) { final long token = proto.start(InputMethodServiceTraceProto.INPUT_METHOD_SERVICE); mWindow.dumpDebug(proto, SOFT_INPUT_WINDOW); proto.write(VIEWS_CREATED, mViewsCreated); @@ -3445,7 +3445,7 @@ public class InputMethodService extends AbstractInputMethodService { mTmpInsets.dumpDebug(proto, LAST_COMPUTED_INSETS); proto.write(SETTINGS_OBSERVER, Objects.toString(mSettingsObserver)); if (icProto != null) { - proto.write(INPUT_CONNECTION_CALL, icProto.getBytes()); + proto.write(INPUT_CONNECTION_CALL, icProto); } proto.end(token); } |
