diff options
| author | 2022-08-22 23:35:28 +0000 | |
|---|---|---|
| committer | 2022-08-22 23:35:28 +0000 | |
| commit | 3d16fc0bd85356f2e7cbd7479902aa5fa9285d30 (patch) | |
| tree | a82a8baa681fdfd093eb167cee40170c6ae35ab8 /libs/input/KeyLayoutMap.cpp | |
| parent | 2bb747d3657000aaebd8cab39982bf44bf6ab3ee (diff) | |
| parent | 36a6aa7abb8f85af2f488f8e2673bc460c8ccecf (diff) | |
Merge "Do not read kernel configs on the host"
Diffstat (limited to 'libs/input/KeyLayoutMap.cpp')
| -rw-r--r-- | libs/input/KeyLayoutMap.cpp | 7 |
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 |