Merge "Change InputReporter to InputReporterInterface"
diff --git a/services/inputflinger/InputDispatcher.h b/services/inputflinger/InputDispatcher.h
index 970632e..ecd5cb9 100644
--- a/services/inputflinger/InputDispatcher.h
+++ b/services/inputflinger/InputDispatcher.h
@@ -37,7 +37,7 @@
 #include <unordered_map>
 
 #include "InputListener.h"
-#include "InputReporter.h"
+#include "InputReporterInterface.h"
 
 
 namespace android {
@@ -1190,7 +1190,7 @@
     void traceOutboundQueueLengthLocked(const sp<Connection>& connection);
     void traceWaitQueueLengthLocked(const sp<Connection>& connection);
 
-    sp<InputReporter> mReporter;
+    sp<InputReporterInterface> mReporter;
 };
 
 /* Enqueues and dispatches input events, endlessly. */
diff --git a/services/inputflinger/InputReporter.cpp b/services/inputflinger/InputReporter.cpp
index cf4220f..8d3153c 100644
--- a/services/inputflinger/InputReporter.cpp
+++ b/services/inputflinger/InputReporter.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,12 +14,18 @@
  * limitations under the License.
  */
 
-#include "InputReporter.h"
+#include "InputReporterInterface.h"
 
 namespace android {
 
 // --- InputReporter ---
 
+class InputReporter : public InputReporterInterface {
+public:
+    void reportUnhandledKey(uint32_t sequenceNum) override;
+    void reportDroppedKey(uint32_t sequenceNum) override;
+};
+
 void InputReporter::reportUnhandledKey(uint32_t sequenceNum) {
   // do nothing
 }
@@ -28,7 +34,7 @@
   // do nothing
 }
 
-sp<InputReporter> createInputReporter() {
+sp<InputReporterInterface> createInputReporter() {
   return new InputReporter();
 }
 
diff --git a/services/inputflinger/include/InputReporter.h b/services/inputflinger/include/InputReporterInterface.h
similarity index 74%
rename from services/inputflinger/include/InputReporter.h
rename to services/inputflinger/include/InputReporterInterface.h
index c86dcda..906d7f2 100644
--- a/services/inputflinger/include/InputReporter.h
+++ b/services/inputflinger/include/InputReporterInterface.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef _UI_INPUT_REPORTER_H
-#define _UI_INPUT_REPORTER_H
+#ifndef _UI_INPUT_REPORTER_INTERFACE_H
+#define _UI_INPUT_REPORTER_INTERFACE_H
 
 #include <utils/RefBase.h>
 
@@ -25,9 +25,9 @@
  * The interface used by the InputDispatcher to report information about input events after
  * it is sent to the application, such as if a key is unhandled or dropped.
  */
-class InputReporter: public virtual RefBase {
+class InputReporterInterface : public virtual RefBase {
 protected:
-    virtual ~InputReporter() { }
+    virtual ~InputReporterInterface() { }
 
 public:
     // Report a key that was not handled by the system or apps.
@@ -35,19 +35,19 @@
     //   - The event was not handled and there is no fallback key; or
     //   - The event was not handled and it has a fallback key,
     //       but the fallback key was not handled.
-    virtual void reportUnhandledKey(uint32_t sequenceNum);
+    virtual void reportUnhandledKey(uint32_t sequenceNum) = 0;
 
     // Report a key that was dropped by InputDispatcher.
     // A key can be dropped for several reasons. See the enum
     // InputDispatcher::DropReason for details.
-    virtual void reportDroppedKey(uint32_t sequenceNum);
+    virtual void reportDroppedKey(uint32_t sequenceNum) = 0;
 };
 
 /*
  * Factory method for InputReporter.
  */
-sp<InputReporter> createInputReporter();
+sp<InputReporterInterface> createInputReporter();
 
 } // namespace android
 
-#endif // _UI_INPUT_REPORTER_H
+#endif // _UI_INPUT_REPORTER_INTERFACE_H