Fix repeated empty workspaces after changing the grid size.

There are specific scenarios when you can force an extra empty
workspace after changing the grid, fortunately there is a
function that removes empty workspaces.

Fix:229349287
Test: Add a widget in a new empty workspace page, change the
grid then remove the widget in the new grid size then return
to the previous grid and it shouldn't have an empty workspace.

Change-Id: I7b73ae2ca058bc84b3b361930e3dc856c045281b
This commit is contained in:
Sebastian Franco
2022-05-18 10:14:01 -07:00
committed by Sebastián Franco
parent 93105ebf75
commit fa37a0ad9b
+2
View File
@@ -2742,6 +2742,8 @@ public class Launcher extends StatefulActivity<LauncherState>
getViewCache().setCacheSize(R.layout.folder_page, 2);
TraceHelper.INSTANCE.endSection(traceToken);
mWorkspace.removeExtraEmptyScreen(true);
}
private boolean canAnimatePageChange() {