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
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index efccaaa..9e0e82c 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3785,7 +3785,7 @@
     // 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,