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

Commit d23c7960 authored by Matt Buckley's avatar Matt Buckley
Browse files

Added use_adpf_cpu_hint method to flagmanager

Bug: 195990840
Test: make;

Check output of:
adb shell dumpsys SurfaceFlinger | grep -A 10 "FlagManager"

Change-Id: I7d81808a33abc87eeb32a2b90d8ada6cd458f8e7
parent 1cbc2ca6
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;