summaryrefslogtreecommitdiff
path: root/core/java/android/view/InsetsSource.java
diff options
context:
space:
mode:
authorAnmol Gupta <guanmol@google.com>2020-04-30 21:06:56 -0700
committerIoana Stefan <ioanastefan@google.com>2020-10-07 20:27:32 +0200
commit5e68eeac86cc0179e25a1719bb5182ea9405ee78 (patch)
tree4820b04dd36ff97b165c94fb6ccbc20211445f86 /core/java/android/view/InsetsSource.java
parent48acf101c3289ebf4b468418c9755d608b076ad4 (diff)
Add proto-based InputMethodService and server side dumping for IME
This CL implements a mechanism to dump InputMethodService and IME related server states into a proto file which can later be imported to Winscope to allow easy debugging. The Design Doc for the IME tracing project is: go/ime-tracing Bug: 154348613 Test: start trace by calling "adb shell ime tracing start" end trace by calling "adb shell ime tracing stop" pull trace using "adb pull /data/misc/wmtrace/ime_trace.pb ime_trace.pb" Change-Id: Icbfb8c11e882f29eb45dea9d4c23315c48e9d619
Diffstat (limited to 'core/java/android/view/InsetsSource.java')
-rw-r--r--core/java/android/view/InsetsSource.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/view/InsetsSource.java b/core/java/android/view/InsetsSource.java
index 41cc8459a266..ec54007e9979 100644
--- a/core/java/android/view/InsetsSource.java
+++ b/core/java/android/view/InsetsSource.java
@@ -188,7 +188,13 @@ public class InsetsSource implements Parcelable {
return false;
}
- void dumpDebug(ProtoOutputStream proto, long fieldId) {
+ /**
+ * Export the state of {@link InsetsSource} into a protocol buffer output stream.
+ *
+ * @param proto Stream to write the state to
+ * @param fieldId FieldId of InsetsSource as defined in the parent message
+ */
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(TYPE, InsetsState.typeToString(mType));
mFrame.dumpDebug(proto, FRAME);