Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd5de9dc authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Do not read kernel configs on the host" am: 3d16fc0b am: bd90a30c...

Merge "Do not read kernel configs on the host" am: 3d16fc0b am: bd90a30c am: 7dab5ef9 am: 948f68f7

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2192315



Change-Id: I78dd6334396b5562614bbaa869a7bdd537266865
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2d78895e 948f68f7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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