Fix inset check in ThreadedRenderer

BUG: 17729606
Change-Id: I9303a788968b424fd8ca27fe4bb99bab51ec34a7
This commit is contained in:
Alan Viverette
2014-10-30 12:22:08 -07:00
parent fc2b9039b8
commit 3aa1ffbc75
2 changed files with 3 additions and 2 deletions

View File

@@ -191,7 +191,8 @@ public class ThreadedRenderer extends HardwareRenderer {
final float lightX = width / 2.0f;
mWidth = width;
mHeight = height;
if (surfaceInsets != null && !surfaceInsets.isEmpty()) {
if (surfaceInsets != null && (surfaceInsets.left != 0 || surfaceInsets.right != 0
|| surfaceInsets.top != 0 || surfaceInsets.bottom != 0)) {
mHasInsets = true;
mInsetLeft = surfaceInsets.left;
mInsetTop = surfaceInsets.top;

View File

@@ -1324,7 +1324,7 @@ public interface WindowManager extends ViewManager {
*
* @hide
*/
public Rect surfaceInsets = new Rect();
public final Rect surfaceInsets = new Rect();
/**
* The desired bitmap format. May be one of the constants in