summaryrefslogtreecommitdiff
path: root/libs/input/KeyLayoutMap.cpp
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2024-01-22 05:04:21 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-01-22 05:04:21 +0000
commitbc7936f870b420a5368cac869b129d60254e31fb (patch)
treef71cd555806a486f357bb742665634baa230cd90 /libs/input/KeyLayoutMap.cpp
parent88127a11145f680c57e7e5378083b91403da7fa5 (diff)
parent0e622d7b92bf17ba23dfdf840cc51868e305dfba (diff)
Merge "libinput: use libkernelconfigs insteadof libvintf" into main am: 0e622d7b92
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2858430 Change-Id: I4a943adfdf78f089cfcdc359a95a84f4b47fdffb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/input/KeyLayoutMap.cpp')
-rw-r--r--libs/input/KeyLayoutMap.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/libs/input/KeyLayoutMap.cpp b/libs/input/KeyLayoutMap.cpp
index 3c1ae3e41b..ab8c341b15 100644
--- a/libs/input/KeyLayoutMap.cpp
+++ b/libs/input/KeyLayoutMap.cpp
@@ -27,8 +27,7 @@
#include <utils/Timers.h>
#include <utils/Tokenizer.h>
#if defined(__ANDROID__)
-#include <vintf/RuntimeInfo.h>
-#include <vintf/VintfObject.h>
+#include <vintf/KernelConfigs.h>
#endif
#include <cstdlib>
@@ -98,12 +97,10 @@ static const std::unordered_map<std::string_view, InputDeviceSensorType> SENSOR_
bool kernelConfigsArePresent(const std::set<std::string>& configs) {
#if defined(__ANDROID__)
- std::shared_ptr<const android::vintf::RuntimeInfo> runtimeInfo =
- android::vintf::VintfObject::GetInstance()->getRuntimeInfo(
- vintf::RuntimeInfo::FetchFlag::CONFIG_GZ);
- LOG_ALWAYS_FATAL_IF(runtimeInfo == nullptr, "Kernel configs could not be fetched");
+ std::map<std::string, std::string> kernelConfigs;
+ const status_t result = android::kernelconfigs::LoadKernelConfigs(&kernelConfigs);
+ LOG_ALWAYS_FATAL_IF(result != OK, "Kernel configs could not be fetched");
- const std::map<std::string, std::string>& kernelConfigs = runtimeInfo->kernelConfigs();
for (const std::string& requiredConfig : configs) {
const auto configIt = kernelConfigs.find(requiredConfig);
if (configIt == kernelConfigs.end()) {