summaryrefslogtreecommitdiff
path: root/libs/input/KeyLayoutMap.cpp
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-08-23 00:54:15 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-08-23 00:54:15 +0000
commitfd5de9dc6e6dc4fea582326c26623284facae8d8 (patch)
tree1f00f0b285ab14426164d841b7bec67ffc44c07d /libs/input/KeyLayoutMap.cpp
parent2d78895ef6da2a1c5bf12e2ed781de601ab63e5c (diff)
parent948f68f71da599fe4d3bc5f00443d6a80d786044 (diff)
Merge "Do not read kernel configs on the host" am: 3d16fc0bd8 am: bd90a30c23 am: 7dab5ef967 am: 948f68f71d
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2192315 Change-Id: I78dd6334396b5562614bbaa869a7bdd537266865 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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/input/KeyLayoutMap.cpp b/libs/input/KeyLayoutMap.cpp
index 59cc7d1dcd..d6b4579a94 100644
--- a/libs/input/KeyLayoutMap.cpp
+++ b/libs/input/KeyLayoutMap.cpp
@@ -25,8 +25,10 @@
#include <utils/Errors.h>
#include <utils/Timers.h>
#include <utils/Tokenizer.h>
+#if defined(__ANDROID__)
#include <vintf/RuntimeInfo.h>
#include <vintf/VintfObject.h>
+#endif
#include <cstdlib>
#include <string_view>
@@ -79,6 +81,7 @@ static const std::unordered_map<std::string_view, InputDeviceSensorType> SENSOR_
sensorPair<InputDeviceSensorType::SIGNIFICANT_MOTION>()};
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);
@@ -99,6 +102,10 @@ bool kernelConfigsArePresent(const std::set<std::string>& configs) {
}
}
return true;
+#else
+ (void)configs; // Suppress 'unused variable' warning
+ return true;
+#endif
}
} // namespace