Bind the out IntRange using its start and end values.

In applyDeltaAndBound, we add the current IntRange values
+ delta param to the outbound IntRange -- but then we only
bind based on the current IntRange values, so the out IntRange
values can end be out of bounds.

Change-Id: Ibbaae8c2c2734107d1fd7ce8a59a4c66d83068ad
This commit is contained in:
Jon Miranda
2017-01-03 09:30:00 -08:00
parent bf8a265deb
commit 9f33cb2ce2

View File

@@ -518,10 +518,10 @@ public class AppWidgetResizeFrame extends FrameLayout
public int applyDeltaAndBound(boolean moveStart, boolean moveEnd, int delta,
int minSize, int maxEnd, IntRange out) {
applyDelta(moveStart, moveEnd, delta, out);
if (start < 0) {
if (out.start < 0) {
out.start = 0;
}
if (end > maxEnd) {
if (out.end > maxEnd) {
out.end = maxEnd;
}
if (out.size() < minSize) {