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
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a6831aa..aeeb412 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2742,6 +2742,8 @@
getViewCache().setCacheSize(R.layout.folder_page, 2);
TraceHelper.INSTANCE.endSection(traceToken);
+
+ mWorkspace.removeExtraEmptyScreen(true);
}
private boolean canAnimatePageChange() {