mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Adding AppsStore for handling various app updates
Change-Id: Ia2242ce583576ace0924ef7142793ba37f4adcb9
This commit is contained in:
@@ -37,6 +37,7 @@ import com.android.launcher3.ExtendedEditText;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.AllAppsContainerView;
|
||||
import com.android.launcher3.allapps.AllAppsStore;
|
||||
import com.android.launcher3.allapps.AlphabeticalAppsList;
|
||||
import com.android.launcher3.allapps.SearchUiManager;
|
||||
import com.android.launcher3.graphics.TintedDrawableSpan;
|
||||
@@ -48,7 +49,8 @@ import java.util.ArrayList;
|
||||
* Layout to contain the All-apps search UI.
|
||||
*/
|
||||
public class AppsSearchContainerLayout extends FrameLayout
|
||||
implements SearchUiManager, AllAppsSearchBarController.Callbacks {
|
||||
implements SearchUiManager, AllAppsSearchBarController.Callbacks,
|
||||
AllAppsStore.OnUpdateListener {
|
||||
|
||||
private final Launcher mLauncher;
|
||||
private final int mMinHeight;
|
||||
@@ -110,6 +112,18 @@ public class AppsSearchContainerLayout extends FrameLayout
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
mLauncher.getAppsView().getAppsStore().addUpdateListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
mLauncher.getAppsView().getAppsStore().removeUpdateListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) {
|
||||
@@ -134,7 +148,7 @@ public class AppsSearchContainerLayout extends FrameLayout
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshSearchResult() {
|
||||
public void onAppsUpdated() {
|
||||
mSearchBarController.refreshSearchResult();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user