Add pid to monitor
The dispatcher will now have pid information of each monitor. This
information will be used to raise ANRs.
Bug: 175593831
Test: atest inputflinger_tests
Change-Id: Ief3bbe36e06ac7c36039f08739fc10b3c2291530
diff --git a/services/inputflinger/dispatcher/Monitor.h b/services/inputflinger/dispatcher/Monitor.h
index fc0b020..7be0760 100644
--- a/services/inputflinger/dispatcher/Monitor.h
+++ b/services/inputflinger/dispatcher/Monitor.h
@@ -24,7 +24,9 @@
struct Monitor {
std::shared_ptr<InputChannel> inputChannel; // never null
- explicit Monitor(const std::shared_ptr<InputChannel>& inputChannel);
+ int32_t pid;
+
+ explicit Monitor(const std::shared_ptr<InputChannel>& inputChannel, int32_t pid);
};
// For tracking the offsets we need to apply when adding gesture monitor targets.