summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index c8e7e32c8..83ca6754f 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -621,16 +621,6 @@ public final class Launcher extends Activity
}
@Override
- protected void onStart() {
- super.onStart();
- // When Launcher comes back to foreground, a different Activity might be responsible for
- // the app market intent, so refresh the icon
- // We don't do this in onResume() because onResume() is triggered every time the home
- // button is pressed (even if we were already in Launcher)
- updateAppMarketIcon();
- }
-
- @Override
public Object onRetainNonConfigurationInstance() {
// Flag the loader to stop early before switching
mModel.stopLoader();
@@ -1118,18 +1108,21 @@ public final class Launcher extends Activity
// apps is nice and speedy. Usually the first call to preDraw doesn't correspond to
// a true draw so we wait until the second preDraw call to be safe
observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
- boolean mFirstTime = true;
public boolean onPreDraw() {
- if (mFirstTime) {
- mFirstTime = false;
- } else {
- //workspace.post(mBuildLayersRunnable);
- observer.removeOnPreDrawListener(this);
- }
+ // We delay the layer building a bit in order to give
+ // other message processing a time to run. In particular
+ // this avoids a delay in hiding the IME if it was
+ // currently shown, because doing that may involve
+ // some communication back with the app.
+ mWorkspace.postDelayed(mBuildLayersRunnable, 500);
+ observer.removeOnPreDrawListener(this);
return true;
}
});
}
+ // When Launcher comes back to foreground, a different Activity might be responsible for
+ // the app market intent, so refresh the icon
+ updateAppMarketIcon();
clearTypedText();
}
}
@@ -1731,7 +1724,7 @@ public final class Launcher extends Activity
return;
}
- if (mWorkspace.isSwitchingState()) {
+ if (!mWorkspace.isFinishedSwitchingState()) {
return;
}
@@ -3194,7 +3187,7 @@ public final class Launcher extends Activity
// package changes in bindSearchablesChanged()
updateAppMarketIcon();
- mWorkspace.post(mBuildLayersRunnable);
+ mWorkspace.postDelayed(mBuildLayersRunnable, 500);
}
@Override