diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-05-26 16:05:17 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-05-27 18:23:29 -0700 |
commit | da4fe1a6244457f144e0a331cada3ada17157809 (patch) | |
tree | 71a921324999c5c61598d08b1de864c426c8bc8e /src/com/android/launcher3/LauncherModel.java | |
parent | c54c701a94e213503d0c6d2ff414e91a50c14133 (diff) | |
download | android_packages_apps_Trebuchet-da4fe1a6244457f144e0a331cada3ada17157809.tar.gz android_packages_apps_Trebuchet-da4fe1a6244457f144e0a331cada3ada17157809.tar.bz2 android_packages_apps_Trebuchet-da4fe1a6244457f144e0a331cada3ada17157809.zip |
Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).
Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 649f42dd1..557a91a42 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -16,7 +16,6 @@ package com.android.launcher3; -import android.app.SearchManager; import android.appwidget.AppWidgetProviderInfo; import android.content.BroadcastReceiver; import android.content.ComponentName; @@ -177,7 +176,6 @@ public class LauncherModel extends BroadcastReceiver public void bindItems(ArrayList<ItemInfo> shortcuts, int start, int end, boolean forceAnimateIcons); public void bindScreens(ArrayList<Long> orderedScreenIds); - public void bindAddScreens(ArrayList<Long> orderedScreenIds); public void finishBindingItems(); public void bindAppWidget(LauncherAppWidgetInfo info); public void bindAllApplications(ArrayList<AppInfo> apps); @@ -196,7 +194,6 @@ public class LauncherModel extends BroadcastReceiver public void bindAppInfosRemoved(ArrayList<AppInfo> appInfos); public void notifyWidgetProvidersChanged(); public void bindWidgetsModel(WidgetsModel model); - public void bindSearchProviderChanged(); public boolean isAllAppsButtonRank(int rank); public void onPageBoundSynchronously(int page); public void executeOnNextDraw(ViewOnDrawExecutor executor); @@ -1139,11 +1136,6 @@ public class LauncherModel extends BroadcastReceiver if (Intent.ACTION_LOCALE_CHANGED.equals(action)) { // If we have changed locale we need to clear out the labels in all apps/workspace. forceReload(); - } else if (SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED.equals(action)) { - Callbacks callbacks = getCallback(); - if (callbacks != null) { - callbacks.bindSearchProviderChanged(); - } } else if (LauncherAppsCompat.ACTION_MANAGED_PROFILE_ADDED.equals(action) || LauncherAppsCompat.ACTION_MANAGED_PROFILE_REMOVED.equals(action)) { UserManagerCompat.getInstance(context).enableAndResetCache(); @@ -1528,7 +1520,12 @@ public class LauncherModel extends BroadcastReceiver } if (!occupied.containsKey(item.screenId)) { - occupied.put(item.screenId, new GridOccupancy(countX + 1, countY + 1)); + GridOccupancy screen = new GridOccupancy(countX + 1, countY + 1); + if (item.screenId == Workspace.FIRST_SCREEN_ID) { + // Mark the first row as occupied in order to account for the QSB. + screen.markCells(0, 0, countX + 1, 1, true); + } + occupied.put(item.screenId, screen); } final GridOccupancy occupancy = occupied.get(item.screenId); |