Use std::unique_ptr for DispatchEntry
Bug: 210460522
Test: atest inputflinger_tests
Change-Id: I2e7073493cbd31df0d7073a5f5f44fe64d7be0b3
diff --git a/services/inputflinger/dispatcher/Connection.h b/services/inputflinger/dispatcher/Connection.h
index 2929d61..c17baea 100644
--- a/services/inputflinger/dispatcher/Connection.h
+++ b/services/inputflinger/dispatcher/Connection.h
@@ -53,11 +53,11 @@
bool responsive = true;
// Queue of events that need to be published to the connection.
- std::deque<DispatchEntry*> outboundQueue;
+ std::deque<std::unique_ptr<DispatchEntry>> outboundQueue;
// Queue of events that have been published to the connection but that have not
// yet received a "finished" response from the application.
- std::deque<DispatchEntry*> waitQueue;
+ std::deque<std::unique_ptr<DispatchEntry>> waitQueue;
Connection(const std::shared_ptr<InputChannel>& inputChannel, bool monitor,
const IdGenerator& idGenerator);
@@ -65,8 +65,6 @@
inline const std::string getInputChannelName() const { return inputChannel->getName(); }
const std::string getWindowName() const;
-
- std::deque<DispatchEntry*>::iterator findWaitQueueEntry(uint32_t seq);
};
} // namespace android::inputdispatcher