Loading services/inputflinger/InputDispatcher.h +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #include <unordered_map> #include "InputListener.h" #include "InputReporter.h" #include "InputReporterInterface.h" namespace android { Loading Loading @@ -1190,7 +1190,7 @@ private: void traceOutboundQueueLengthLocked(const sp<Connection>& connection); void traceWaitQueueLengthLocked(const sp<Connection>& connection); sp<InputReporter> mReporter; sp<InputReporterInterface> mReporter; }; /* Enqueues and dispatches input events, endlessly. */ Loading services/inputflinger/InputReporter.cpp +9 −3 Original line number Diff line number Diff line /* * 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. Loading @@ -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 } Loading @@ -28,7 +34,7 @@ void InputReporter::reportDroppedKey(uint32_t sequenceNum) { // do nothing } sp<InputReporter> createInputReporter() { sp<InputReporterInterface> createInputReporter() { return new InputReporter(); } Loading services/inputflinger/include/InputReporter.h→services/inputflinger/include/InputReporterInterface.h +9 −9 Original line number Diff line number Diff line /* * 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. Loading @@ -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> Loading @@ -25,9 +25,9 @@ namespace android { * 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. Loading @@ -35,19 +35,19 @@ public: // - 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 Loading
services/inputflinger/InputDispatcher.h +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #include <unordered_map> #include "InputListener.h" #include "InputReporter.h" #include "InputReporterInterface.h" namespace android { Loading Loading @@ -1190,7 +1190,7 @@ private: void traceOutboundQueueLengthLocked(const sp<Connection>& connection); void traceWaitQueueLengthLocked(const sp<Connection>& connection); sp<InputReporter> mReporter; sp<InputReporterInterface> mReporter; }; /* Enqueues and dispatches input events, endlessly. */ Loading
services/inputflinger/InputReporter.cpp +9 −3 Original line number Diff line number Diff line /* * 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. Loading @@ -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 } Loading @@ -28,7 +34,7 @@ void InputReporter::reportDroppedKey(uint32_t sequenceNum) { // do nothing } sp<InputReporter> createInputReporter() { sp<InputReporterInterface> createInputReporter() { return new InputReporter(); } Loading
services/inputflinger/include/InputReporter.h→services/inputflinger/include/InputReporterInterface.h +9 −9 Original line number Diff line number Diff line /* * 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. Loading @@ -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> Loading @@ -25,9 +25,9 @@ namespace android { * 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. Loading @@ -35,19 +35,19 @@ public: // - 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