diff options
| author | Tony Wickham <twickham@google.com> | 2017-04-03 14:27:04 -0700 |
|---|---|---|
| committer | Tony Wickham <twickham@google.com> | 2017-04-03 15:58:50 -0700 |
| commit | 2f54a1625ae031ffbb2a99a00c7b25de3c677828 (patch) | |
| tree | 0b7e655cdb2f6e968008137b9a542952edb220a2 /src | |
| parent | 9b5a97585fb1d86a0855630c9f2614eb3268ced6 (diff) | |
| download | packages_apps_Trebuchet-2f54a1625ae031ffbb2a99a00c7b25de3c677828.tar.gz packages_apps_Trebuchet-2f54a1625ae031ffbb2a99a00c7b25de3c677828.tar.bz2 packages_apps_Trebuchet-2f54a1625ae031ffbb2a99a00c7b25de3c677828.zip | |
Small UI fix for widgets/app info shortcuts
- Switch order of widgets & more and app info.
- Start binding widgets after starting to update these shortcuts on the
UI thread, so that they will show up without waiting for the bind
logic, which can take a while. We already have a callback mechanism
for enabling widgets & more after widgets are bound, so this was how
it was supposed to work already.
Change-Id: I5f702f9c0814d30acf6298be309c6dc30727316e
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/launcher3/popup/PopupDataProvider.java | 2 | ||||
| -rw-r--r-- | src/com/android/launcher3/popup/PopupPopulator.java | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/launcher3/popup/PopupDataProvider.java b/src/com/android/launcher3/popup/PopupDataProvider.java index b101bc5ae..c1a9ba1bc 100644 --- a/src/com/android/launcher3/popup/PopupDataProvider.java +++ b/src/com/android/launcher3/popup/PopupDataProvider.java @@ -50,8 +50,8 @@ public class PopupDataProvider implements NotificationListener.NotificationsChan /** Note that these are in order of priority. */ public static final SystemShortcut[] SYSTEM_SHORTCUTS = new SystemShortcut[] { - new SystemShortcut.Widgets(), new SystemShortcut.AppInfo(), + new SystemShortcut.Widgets(), }; private final Launcher mLauncher; diff --git a/src/com/android/launcher3/popup/PopupPopulator.java b/src/com/android/launcher3/popup/PopupPopulator.java index a9f219b38..838b9b1db 100644 --- a/src/com/android/launcher3/popup/PopupPopulator.java +++ b/src/com/android/launcher3/popup/PopupPopulator.java @@ -211,12 +211,17 @@ public class PopupPopulator { // This ensures that mLauncher.getWidgetsForPackageUser() // doesn't return null (it puts all the widgets in memory). - launcher.notifyWidgetProvidersChanged(true /* force */); for (int i = 0; i < PopupDataProvider.SYSTEM_SHORTCUTS.length; i++) { final SystemShortcut systemShortcut = PopupDataProvider.SYSTEM_SHORTCUTS[i]; uiHandler.post(new UpdateSystemShortcutChild(container, systemShortcutViews.get(i), systemShortcut, launcher, originalInfo)); } + uiHandler.post(new Runnable() { + @Override + public void run() { + launcher.notifyWidgetProvidersChanged(true /* force */); + } + }); } }; } |
