Let touch region empty if the input bounds is empty
If the input bounds is empty, we should let the touch region empty so
it could prevent receiving touch without valid bounds.
Bug: 204747595
Test: atest InputSurfacesTest
Change-Id: Iee59c437a084ca9db6936af7a4852190169518d9
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index e2f34fa..e029e7d 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2213,6 +2213,8 @@
info.frameRight = 0;
info.frameBottom = 0;
info.transform.reset();
+ info.touchableRegion = Region();
+ info.flags = WindowInfo::Flag::NOT_TOUCH_MODAL | WindowInfo::Flag::NOT_FOCUSABLE;
return;
}