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

Commit a052071b authored by Josh Gao's avatar Josh Gao
Browse files

surfaceflinger: initialize ActiveConfigInfo fields.

Previously, the two ActiveConfigInfo fields in SurfaceFlinger are
uninitialized upon construction, and when run with debugging code that
slows down open, we reliably hit a case where setRefreshRateType is
called on an uninitialized RefreshRateType, leading to explosion.

Test: booted with libfdtrack
Change-Id: I14520775f8660fee6545d8a354a04ed3674a1597
parent 19143968
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -509,9 +509,9 @@ private:
    using RefreshRateType = scheduler::RefreshRateConfigs::RefreshRateType;

    struct ActiveConfigInfo {
        RefreshRateType type;
        int configId;
        Scheduler::ConfigEvent event;
        RefreshRateType type = RefreshRateType::DEFAULT;
        int configId = 0;
        Scheduler::ConfigEvent event = Scheduler::ConfigEvent::None;

        bool operator!=(const ActiveConfigInfo& other) const {
            return type != other.type || configId != other.configId || event != other.event;