From d3f6522ebb651492b965abdf5ab37e3d6025f422 Mon Sep 17 00:00:00 2001 From: Sebastian Franco Date: Thu, 11 May 2023 12:59:33 -0600 Subject: [PATCH] Stopp Cell height from changing when running ReorderUnitTest Fix: 280683994 Test: atest ReorderAlgorithmUnitTest Change-Id: Iee6336e11387a637e3fe52722d4f30a15e58aca9 --- .../launcher3/celllayout/ReorderAlgorithmUnitTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java b/tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java index e3de500bde..ee05fe6a9f 100644 --- a/tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java +++ b/tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java @@ -87,15 +87,13 @@ public class ReorderAlgorithmUnitTest { // modify the device profile. dp.inv.numColumns = width; dp.inv.numRows = height; + dp.cellLayoutBorderSpacePx = new Point(0, 0); CellLayout cl = new CellLayout(getWrappedContext(c, dp)); // I put a very large number for width and height so that all the items can fit, it doesn't // need to be exact, just bigger than the sum of cell border cl.measure(View.MeasureSpec.makeMeasureSpec(10000, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(10000, View.MeasureSpec.EXACTLY)); - - cl.measure(View.MeasureSpec.makeMeasureSpec(cl.getDesiredWidth(), View.MeasureSpec.EXACTLY), - View.MeasureSpec.makeMeasureSpec(cl.getDesiredHeight(), View.MeasureSpec.EXACTLY)); return cl; }