Merge "Avoid ANR in Home by avoiding a sycnhronized call on the UI thread. Bug #2614636" into froyo

This commit is contained in:
Romain Guy
2010-04-28 13:55:53 -07:00
committed by Android (Google) Code Review

View File

@@ -1096,13 +1096,13 @@ public class LauncherModel extends BroadcastReceiver {
}
final boolean first = i <= batchSize;
final Callbacks callbacks = tryGetCallbacks(oldCallbacks);
final ArrayList<ApplicationInfo> added = mAllAppsList.added;
mAllAppsList.added = new ArrayList<ApplicationInfo>();
mHandler.post(new Runnable() {
public void run() {
final long t = SystemClock.uptimeMillis();
final Callbacks callbacks = tryGetCallbacks(oldCallbacks);
if (callbacks != null) {
if (first) {
mBeforeFirstLoad = false;