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

Commit 5061611b authored by eric_kuang.rs's avatar eric_kuang.rs
Browse files

When user presses the power key while playing a local video, the surfaceflinger will crash.

The root cause is both buffer and sidebandstream of Media Player's SurfaceView are NULL after pressing power key, and then SurfaceFlinger has a nullpointer exception.

Change-Id: Ifd04da2abce29a64750a65e7f1aa9a1ed6536fdf
Bug: 210383977
Test: manual test.
parent 26a735ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ void BufferLayer::preparePerFrameCompositionState() {
                : Hwc2::IComposerClient::Composition::DEVICE;
    }

    compositionState->buffer = mBufferInfo.mBuffer->getBuffer();
    compositionState->buffer = getBuffer();
    compositionState->bufferSlot = (mBufferInfo.mBufferSlot == BufferQueue::INVALID_BUFFER_SLOT)
            ? 0
            : mBufferInfo.mBufferSlot;