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

Commit ebc9d5d7 authored by Matt Buckley's avatar Matt Buckley Committed by Android (Google) Code Review
Browse files

Merge "Added use_adpf_cpu_hint method to flagmanager"

parents 5841f5ce d23c7960
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ FlagManager::~FlagManager() = default;
void FlagManager::dump(std::string& result) const {
    base::StringAppendF(&result, "FlagManager values: \n");
    base::StringAppendF(&result, "demo_flag: %" PRId64 "\n", demo_flag());
    base::StringAppendF(&result, "use_adpf_cpu_hint: %s\n", use_adpf_cpu_hint() ? "true" : "false");
}

namespace {
@@ -90,4 +91,10 @@ int64_t FlagManager::demo_flag() const {
    std::optional<int64_t> sysPropVal = std::nullopt;
    return getValue("DemoFeature__demo_flag", sysPropVal, kDemoFlag);
}

bool FlagManager::use_adpf_cpu_hint() const {
    std::optional<bool> sysPropVal = std::nullopt;
    return getValue("AdpfFeature__adpf_cpu_hint", sysPropVal, false);
}

} // namespace android
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ public:

    int64_t demo_flag() const;

    bool use_adpf_cpu_hint() const;

private:
    friend class FlagManagerTest;