summaryrefslogtreecommitdiff
path: root/libs/input/KeyCharacterMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/KeyCharacterMap.cpp')
-rw-r--r--libs/input/KeyCharacterMap.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/libs/input/KeyCharacterMap.cpp b/libs/input/KeyCharacterMap.cpp
index e2feabcbbe..1cf5612d45 100644
--- a/libs/input/KeyCharacterMap.cpp
+++ b/libs/input/KeyCharacterMap.cpp
@@ -19,16 +19,13 @@
#include <stdlib.h>
#include <string.h>
-#ifdef __linux__
-#include <binder/Parcel.h>
-#endif
#include <android/keycodes.h>
#include <attestation/HmacKeyManager.h>
+#include <binder/Parcel.h>
#include <input/InputEventLabels.h>
#include <input/KeyCharacterMap.h>
#include <input/Keyboard.h>
-#include <gui/constants.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/Timers.h>
@@ -496,13 +493,14 @@ bool KeyCharacterMap::findKey(char16_t ch, int32_t* outKeyCode, int32_t* outMeta
return false;
}
-void KeyCharacterMap::addKey(Vector<KeyEvent>& outEvents,
- int32_t deviceId, int32_t keyCode, int32_t metaState, bool down, nsecs_t time) {
+void KeyCharacterMap::addKey(Vector<KeyEvent>& outEvents, int32_t deviceId, int32_t keyCode,
+ int32_t metaState, bool down, nsecs_t time) {
outEvents.push();
KeyEvent& event = outEvents.editTop();
- event.initialize(InputEvent::nextId(), deviceId, AINPUT_SOURCE_KEYBOARD, ADISPLAY_ID_NONE,
- INVALID_HMAC, down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP, 0, keyCode,
- 0, metaState, 0, time, time);
+ event.initialize(InputEvent::nextId(), deviceId, AINPUT_SOURCE_KEYBOARD,
+ ui::LogicalDisplayId::INVALID, INVALID_HMAC,
+ down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP, 0, keyCode, 0, metaState,
+ 0, time, time);
}
void KeyCharacterMap::addMetaKeys(Vector<KeyEvent>& outEvents,
@@ -612,7 +610,6 @@ void KeyCharacterMap::addLockedMetaKey(Vector<KeyEvent>& outEvents,
}
}
-#ifdef __linux__
std::unique_ptr<KeyCharacterMap> KeyCharacterMap::readFromParcel(Parcel* parcel) {
if (parcel == nullptr) {
ALOGE("%s: Null parcel", __func__);
@@ -745,7 +742,6 @@ void KeyCharacterMap::writeToParcel(Parcel* parcel) const {
parcel->writeInt32(toAndroidKeyCode);
}
}
-#endif // __linux__
// --- KeyCharacterMap::Parser ---