Do not use RefBase in EventHub
Switch to std::unique_ptr instead.
Unfortunately, have to also switch to shared_ptr because FakeEventHub
implements EventHub but is also used to inject events when testing
InputReader.
Bug: 117684064
Test: atest inputflinger_tests
Change-Id: I789ba0ca255b6a1f179711c61fc9da98a3c6a800
diff --git a/services/inputflinger/EventHub.h b/services/inputflinger/EventHub.h
index eb4e8f2..6c3a4a2 100644
--- a/services/inputflinger/EventHub.h
+++ b/services/inputflinger/EventHub.h
@@ -146,12 +146,11 @@
* which keys are currently down. Finally, the event hub keeps track of the capabilities of
* individual input devices, such as their class and the set of key codes that they support.
*/
-class EventHubInterface : public virtual RefBase {
-protected:
+class EventHubInterface {
+public:
EventHubInterface() { }
virtual ~EventHubInterface() { }
-public:
// Synthetic raw event type codes produced when devices are added or removed.
enum {
// Sent when a device is added.
@@ -319,7 +318,6 @@
virtual void dump(std::string& dump);
virtual void monitor();
-protected:
virtual ~EventHub();
private: