Loading src/com/android/launcher3/Utilities.java +2 −4 Original line number Diff line number Diff line Loading @@ -746,7 +746,8 @@ public final class Utilities { * | +--+ | * | | * +----------------+ * This would be case delta % 4 == 2: * This would be case delta % 4 == 2: // This is case was reverted to previous behaviour which * doesn't match the illustration due to b/353965234 * +-------------+ * | | * | | Loading @@ -768,7 +769,6 @@ public final class Utilities { int delta) { int rdelta = ((delta % 4) + 4) % 4; int origLeft = inOutBounds.left; int origTop = inOutBounds.top; switch (rdelta) { case 0: return; Loading @@ -780,8 +780,6 @@ public final class Utilities { return; case 2: inOutBounds.left = parentWidth - inOutBounds.right; inOutBounds.top = parentHeight - inOutBounds.bottom; inOutBounds.bottom = parentHeight - origTop; inOutBounds.right = parentWidth - origLeft; return; case 3: Loading tests/multivalentTests/src/com/android/launcher3/UtilitiesTest.kt +4 −3 Original line number Diff line number Diff line Loading @@ -376,9 +376,10 @@ class UtilitiesTest { Utilities.rotateBounds(rect, 100, 100, 1) assertEquals(Rect(70, 40, 80, 80), rect) rect = Rect(20, 70, 60, 80) Utilities.rotateBounds(rect, 100, 100, 2) assertEquals(Rect(40, 20, 80, 30), rect) // case removed for b/28435189 // rect = Rect(20, 70, 60, 80) // Utilities.rotateBounds(rect, 100, 100, 2) // assertEquals(Rect(40, 20, 80, 30), rect) rect = Rect(20, 70, 60, 80) Utilities.rotateBounds(rect, 100, 100, 3) Loading Loading
src/com/android/launcher3/Utilities.java +2 −4 Original line number Diff line number Diff line Loading @@ -746,7 +746,8 @@ public final class Utilities { * | +--+ | * | | * +----------------+ * This would be case delta % 4 == 2: * This would be case delta % 4 == 2: // This is case was reverted to previous behaviour which * doesn't match the illustration due to b/353965234 * +-------------+ * | | * | | Loading @@ -768,7 +769,6 @@ public final class Utilities { int delta) { int rdelta = ((delta % 4) + 4) % 4; int origLeft = inOutBounds.left; int origTop = inOutBounds.top; switch (rdelta) { case 0: return; Loading @@ -780,8 +780,6 @@ public final class Utilities { return; case 2: inOutBounds.left = parentWidth - inOutBounds.right; inOutBounds.top = parentHeight - inOutBounds.bottom; inOutBounds.bottom = parentHeight - origTop; inOutBounds.right = parentWidth - origLeft; return; case 3: Loading
tests/multivalentTests/src/com/android/launcher3/UtilitiesTest.kt +4 −3 Original line number Diff line number Diff line Loading @@ -376,9 +376,10 @@ class UtilitiesTest { Utilities.rotateBounds(rect, 100, 100, 1) assertEquals(Rect(70, 40, 80, 80), rect) rect = Rect(20, 70, 60, 80) Utilities.rotateBounds(rect, 100, 100, 2) assertEquals(Rect(40, 20, 80, 30), rect) // case removed for b/28435189 // rect = Rect(20, 70, 60, 80) // Utilities.rotateBounds(rect, 100, 100, 2) // assertEquals(Rect(40, 20, 80, 30), rect) rect = Rect(20, 70, 60, 80) Utilities.rotateBounds(rect, 100, 100, 3) Loading