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

Commit 01f98634 authored by Valerie Hau's avatar Valerie Hau
Browse files

RESTRICT AUTOMERGE: Fix security bug

Small bug fix - || instead of && causing flickering and incorrect layer
removal

Bug: 150845631, 137284057
Test: build, boot, SurfaceFlinger_test, libsurfaceflinger_unittest,
manual

Change-Id: I6c4e5239254300c70b802aa935fb638412a445ee
parent 927b3b12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3785,7 +3785,7 @@ status_t SurfaceFlinger::onLayerRemoved(const sp<Client>& client, const sp<IBind
    // called by a client when it wants to remove a Layer
    status_t err = NO_ERROR;
    sp<Layer> l = fromHandle(handle);
    if (l != nullptr || client->isAttached(handle)) {
    if (l != nullptr && client->isAttached(handle)) {
        mInterceptor->saveSurfaceDeletion(l);
        err = removeLayerLocked(mStateLock, l);
        ALOGE_IF(err<0 && err != NAME_NOT_FOUND,