Throw IAE on invalid measure spec size
Crash immediately so that we can track down the cause. If we let it through, we'll hit an ISE later in dispatchVsync() and never know why. Bug: 21948478 Change-Id: I84edf93cdf09d755419e18a7606b7b6cbd059956
This commit is contained in:
@@ -21041,6 +21041,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
if (sUseBrokenMakeMeasureSpec) {
|
||||
return size + mode;
|
||||
} else {
|
||||
if (size < 0) {
|
||||
throw new IllegalArgumentException("Measure spec size must be >= 0");
|
||||
}
|
||||
return (size & ~MODE_MASK) | (mode & MODE_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user