Skip to content

Commit 782c04b

Browse files
author
Jim Miller
committed
Revert "Fix for layout parameter validation bug in GridLayout."
This reverts commit 8a36e05 which was causing keyguard_screen_tab_unlock.xml to have a bad layout. Change-Id: I50bdc6dbdf8d7b98ef77eae532860d375574213e
1 parent 0cd4f67 commit 782c04b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/GridLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ private static int clip(Interval minorRange, boolean minorWasDefined, int count)
658658
private void validateLayoutParams() {
659659
final boolean horizontal = (orientation == HORIZONTAL);
660660
final Axis axis = horizontal ? horizontalAxis : verticalAxis;
661-
final int count = max(0, axis.getCount()); // Handle negative values, including UNDEFINED
661+
final int count = (axis.definedCount != UNDEFINED) ? axis.definedCount : 0;
662662

663663
int major = 0;
664664
int minor = 0;

0 commit comments

Comments
 (0)