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

Commit a2ecd831 authored by rnlee's avatar rnlee Committed by Rachel Lee
Browse files

Add FlagManager instance to SF.

Bug: 190769260
Test: make;

1. Examine the value returned by FlagManager:
   `adb shell dumpsys SurfaceFlinger | grep -A 10 "FlagManager"`
2. Examine the value returned by P/H:
   `adb shell device_config get surface_flinger_native_boot
   DemoFeature__demo_flag`

Change-Id: Ied375fa732c33be31cc5e1c6dcdfb024aecb3e0d
parent 81d32608
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@
#include "DisplayRenderArea.h"
#include "EffectLayer.h"
#include "Effects/Daltonizer.h"
#include "FlagManager.h"
#include "FpsReporter.h"
#include "FrameTimeline/FrameTimeline.h"
#include "FrameTracer/FrameTracer.h"
@@ -675,6 +676,7 @@ void SurfaceFlinger::bootFinished() {
    const nsecs_t duration = now - mBootTime;
    ALOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );

    mFlagManager = std::make_unique<android::FlagManager>();
    mFrameTracer->initialize();
    mFrameTimeline->onBootFinished();

@@ -5142,6 +5144,11 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co
    const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
    alloc.dump(result);

    /*
     * Dump flag/property manager state
     */
    mFlagManager->dump(result);

    result.append(mTimeStats->miniDump());
    result.append("\n");
}
+3 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ namespace android {

class Client;
class EventThread;
class FlagManager;
class FpsReporter;
class TunnelModeEnabledReporter;
class HdrLayerInfoReporter;
@@ -1516,6 +1517,8 @@ private:
    wp<IBinder> mActiveDisplayToken GUARDED_BY(mStateLock);

    const sp<WindowInfosListenerInvoker> mWindowInfosListenerInvoker;

    std::unique_ptr<FlagManager> mFlagManager;
};

} // namespace android