Add dump for InputState and InputTarget
These are useful when you want to print these variables for debugging.
Currently, InputState isn't even shown in the dispatcher dump. Include
it there.
Also, update some types to use DeviceId.
Bug: 211379801
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: Ifc983a653d9f1f546b71b8404f67caa1c89d3b01
diff --git a/services/inputflinger/dispatcher/InputState.h b/services/inputflinger/dispatcher/InputState.h
index e741137..32df034 100644
--- a/services/inputflinger/dispatcher/InputState.h
+++ b/services/inputflinger/dispatcher/InputState.h
@@ -128,7 +128,10 @@
std::vector<std::unique_ptr<MotionEntry>> synthesizeCancelationEventsForPointers(
const MotionMemento& memento, std::bitset<MAX_POINTER_ID + 1> pointerIds,
nsecs_t currentTime);
+ friend std::ostream& operator<<(std::ostream& out, const InputState& state);
};
+std::ostream& operator<<(std::ostream& out, const InputState& state);
+
} // namespace inputdispatcher
} // namespace android