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

Commit 3779b7b9 authored by Marissa Wall's avatar Marissa Wall Committed by android-build-merger
Browse files

Merge "createWithSurfaceParent: add logging" into qt-dev

am: 91290697

Change-Id: Ic0621bd2e15b2cefd6916210b685a0ee39b3cae4
parents 68f8c55d 91290697
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -87,11 +87,18 @@ status_t Client::createWithSurfaceParent(const String8& name, uint32_t w, uint32
                                         LayerMetadata metadata, sp<IBinder>* handle,
                                         LayerMetadata metadata, sp<IBinder>* handle,
                                         sp<IGraphicBufferProducer>* gbp) {
                                         sp<IGraphicBufferProducer>* gbp) {
    if (mFlinger->authenticateSurfaceTexture(parent) == false) {
    if (mFlinger->authenticateSurfaceTexture(parent) == false) {
        ALOGE("failed to authenticate surface texture");
        // The extra parent layer check below before returning is to help with debugging
        // b/134888387. Once the bug is fixed the check can be deleted.
        if ((static_cast<MonitoredProducer*>(parent.get()))->getLayer() == nullptr) {
            ALOGE("failed to find parent layer");
        }
        return BAD_VALUE;
        return BAD_VALUE;
    }
    }


    const auto& layer = (static_cast<MonitoredProducer*>(parent.get()))->getLayer();
    const auto& layer = (static_cast<MonitoredProducer*>(parent.get()))->getLayer();
    if (layer == nullptr) {
    if (layer == nullptr) {
        ALOGE("failed to find parent layer");
        return BAD_VALUE;
        return BAD_VALUE;
    }
    }