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

Commit 15510835 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "SurfaceFlinger: Avoid overlapping calls to BOOT_FINISHED" into rvc-dev am: 3bbfb422

Change-Id: I8cb8afaf8f09f87c0fc800ceceb17624d6ca9360
parents f56a9d8d 3bbfb422
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -409,6 +409,7 @@ SurfaceFlinger::~SurfaceFlinger() = default;
void SurfaceFlinger::binderDied(const wp<IBinder>& /* who */)
{
    // the window manager died on us. prepare its eulogy.
    mBootFinished = false;

    // restore initial conditions (default device unblank, etc)
    initializeDisplays();
@@ -525,6 +526,11 @@ compositionengine::CompositionEngine& SurfaceFlinger::getCompositionEngine() con

void SurfaceFlinger::bootFinished()
{
    if (mBootFinished == true) {
        ALOGE("Extra call to bootFinished");
        return;
    }
    mBootFinished = true;
    if (mStartPropertySetThread->join() != NO_ERROR) {
        ALOGE("Join StartPropertySetThread failed!");
    }
+4 −0
Original line number Diff line number Diff line
@@ -1129,6 +1129,10 @@ private:

    // to linkToDeath
    sp<IBinder> mWindowManager;
    // We want to avoid multiple calls to BOOT_FINISHED as they come in on
    // different threads without a lock and could trigger unsynchronized writes to
    // to mWindowManager or mInputFlinger
    std::atomic<bool> mBootFinished = false;

    std::unique_ptr<dvr::VrFlinger> mVrFlinger;
    std::atomic<bool> mVrFlingerRequestsDisplay = false;