Merge "Saving instance state so that widget cache is updated properly before rebind" into ub-launcher3-qt-dev
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 12f2f9a..2c9a37a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -466,6 +466,9 @@
         reapplyUi();
         mDragLayer.recreateControllers();
 
+        // Calling onSaveInstanceState ensures that static cache used by listWidgets is
+        // initialized properly.
+        onSaveInstanceState(new Bundle());
         // TODO: We can probably avoid rebind when only screen size changed.
         rebindModel();
     }