OSDN Git Service

Prevents the WindowManager from requesting empty or negative surfaces.
authorRomain Guy <romainguy@android.com>
Thu, 1 Oct 2009 07:58:09 +0000 (00:58 -0700)
committerRomain Guy <romainguy@android.com>
Thu, 1 Oct 2009 08:16:06 +0000 (01:16 -0700)
commit9825ec61b4a40ed92a5bb28019289e5bab9cfb56
treecd8ea54b78329eb00cfa5909a892b04cf092e3b6
parentae5dd1d19a6b7f9453daf03deb1907eb039d1ef6
Prevents the WindowManager from requesting empty or negative surfaces.

Windows with a negative Y position can end up in createSurfaceLocked()
with mFrame containing a negative height, causing SurfaceFlinger to go
crazy when asked to create the surface. This change simply guards
against such a situation by instead asking for a 1x1 surface and relying
or later layout operations to resize the window to the appropriate size.

Change-Id: I66f2058f4cd1cf069b12d3d23e6fd340dc76b74e
services/java/com/android/server/WindowManagerService.java