diff options
author | Valerie Hau <vhau@google.com> | 2020-07-17 16:59:14 -0700 |
---|---|---|
committer | Valerie Hau <vhau@google.com> | 2020-07-22 03:32:33 +0000 |
commit | 01f9863464fb07aea1f7f2180ec4eb76ab7e25ed (patch) | |
tree | c1228440ef7742fe4a3d0ab35b916a06afa9f0b1 | |
parent | 927b3b120839954a575b4e8c498b1b4d4d375afa (diff) | |
download | native-01f9863464fb07aea1f7f2180ec4eb76ab7e25ed.tar.gz |
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
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index efccaaa8df..9e0e82c8a4 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -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, |