summaryrefslogtreecommitdiff
path: root/libs/input/KeyCharacterMap.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-09-05 17:02:51 -0700
committer Xin Li <delphij@google.com> 2024-09-05 17:02:51 -0700
commit60d226fc1fff9274bbb33d9c7c8a3f1b3724e832 (patch)
tree4226e3be80e148cc9f00816bb3bd35d87929dfad /libs/input/KeyCharacterMap.cpp
parent69ec43c8a4007d96acf6d44a5484432b69ca884c (diff)
parent98858ea367d1acc939b970cbce5528aa98213a9d (diff)
Merge 24Q3 to AOSP main
Bug: 357762254 Merged-In: Ibe9b06e590ed420f29c790188dee11674fca5a2e Change-Id: Ib27f6f1e35c80ef5ac6adec6353609004ed6ed5d
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 ---