Fix more cases where blips show up in All Apps
- defer any updates to the widget previews if we're
mid-transition
- call System.gc() before a transition to avoid gc
mid-transition
Change-Id: If8b4699b142af20b2f14e9a8653f893139adf90e
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 7108c9f..af0f205 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -355,6 +355,11 @@
// force building the layer, so you don't get a blip early in an animation
// when the layer is created layer
buildLayer();
+
+ // Let the GC system know that now is a good time to do any garbage
+ // collection; makes it less likely we'll get a GC during the all apps
+ // to workspace animation
+ System.gc();
}
}
@@ -366,6 +371,7 @@
/* LauncherTransitionable overrides */
@Override
public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
+ mAppsCustomizePane.onLauncherTransitionStart(l, animated, toWorkspace);
mInTransition = true;
mTransitioningToWorkspace = toWorkspace;
@@ -405,6 +411,7 @@
@Override
public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) {
+ mAppsCustomizePane.onLauncherTransitionEnd(l, animated, toWorkspace);
mInTransition = false;
if (animated) {
setLayerType(LAYER_TYPE_NONE, null);