Cleaning up some app model code.

- Preventing extra sorting when adding/updating apps
- Preventing extra logic when filtering apps
- Fixing overlapping prediction bar when all predictions are removed
- Fixing crash when retrieving section names for AppInfos whose titles
  have been updated, but updateApps has not yet been called.

Change-Id: I1da468b0fd5c5cc404b6a5e6146a268fefeca267
This commit is contained in:
Winson Chung
2015-05-20 16:07:46 -07:00
parent 324d78358c
commit 3abcd5ba1b
2 changed files with 105 additions and 99 deletions
@@ -136,7 +136,7 @@ final class HeaderElevationControllerVL implements HeaderElevationController {
*/
public class AppsContainerView extends BaseContainerView implements DragSource, Insettable,
TextWatcher, TextView.OnEditorActionListener, LauncherTransitionable,
AlphabeticalAppsList.FilterChangedCallback, AppsGridAdapter.PredictionBarSpacerCallbacks,
AlphabeticalAppsList.AdapterChangedCallback, AppsGridAdapter.PredictionBarSpacerCallbacks,
View.OnTouchListener, View.OnClickListener, View.OnLongClickListener,
ViewTreeObserver.OnPreDrawListener {
@@ -686,7 +686,7 @@ public class AppsContainerView extends BaseContainerView implements DragSource,
}
@Override
public void onFilterChanged() {
public void onAdapterItemsChanged() {
updatePredictionBarVisibility();
}