From 392a6ba4fac4b1e2f3e1c8b7baad99be5f92e41b Mon Sep 17 00:00:00 2001 From: Jeffrey Sharkey <> Date: Tue, 24 Mar 2009 18:52:29 -0700 Subject: [PATCH] Automated import from //branches/cupcake/...@142036,142036 --- src/com/android/launcher/Launcher.java | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/com/android/launcher/Launcher.java b/src/com/android/launcher/Launcher.java index 6ac4a57633..73502e2917 100644 --- a/src/com/android/launcher/Launcher.java +++ b/src/com/android/launcher/Launcher.java @@ -1261,7 +1261,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On } mBinder = new DesktopBinder(this, shortcuts, appWidgets, drawerAdapter); - mBinder.startWhenIdle(); + mBinder.startBindingItems(); } private void bindItems(Launcher.DesktopBinder binder, @@ -1364,7 +1364,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On private void bindDrawer(Launcher.DesktopBinder binder, ApplicationsAdapter drawerAdapter) { mAllAppsGrid.setAdapter(drawerAdapter); - binder.startBindingAppWidgets(); + binder.startBindingAppWidgetsWhenIdle(); } private void bindAppWidgets(Launcher.DesktopBinder binder, @@ -2003,18 +2003,6 @@ public final class Launcher extends Activity implements View.OnClickListener, On } } - public void startWhenIdle() { - // Ask for notification when message queue becomes idle - final MessageQueue messageQueue = Looper.myQueue(); - messageQueue.addIdleHandler(this); - } - - public boolean queueIdle() { - // Queue is idle, so start binding items - startBindingItems(); - return false; - } - public void startBindingItems() { obtainMessage(MESSAGE_BIND_ITEMS, 0, mShortcuts.size()).sendToTarget(); } @@ -2023,6 +2011,18 @@ public final class Launcher extends Activity implements View.OnClickListener, On obtainMessage(MESSAGE_BIND_DRAWER).sendToTarget(); } + public void startBindingAppWidgetsWhenIdle() { + // Ask for notification when message queue becomes idle + final MessageQueue messageQueue = Looper.myQueue(); + messageQueue.addIdleHandler(this); + } + + public boolean queueIdle() { + // Queue is idle, so start binding items + startBindingAppWidgets(); + return false; + } + public void startBindingAppWidgets() { obtainMessage(MESSAGE_BIND_APPWIDGETS).sendToTarget(); }