Don't buildLayer if size == 0

Bug: 15598692

Change-Id: Ia4e9e68c712b318b8d66e8cdfb2aceda4e892289
This commit is contained in:
John Reck
2014-06-13 12:43:38 -07:00
parent 17c9d69d70
commit 1e96bdf344

View File

@@ -13529,6 +13529,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
throw new IllegalStateException("This view must be attached to a window first");
}
if (getWidth() == 0 || getHeight() == 0) {
return;
}
switch (mLayerType) {
case LAYER_TYPE_HARDWARE:
// The only part of a hardware layer we can build in response to