Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb6ac3df authored by Samuel Fufa's avatar Samuel Fufa Committed by Android (Google) Code Review
Browse files

Merge "hide app results if app info can't be found"

parents e5d2ad8e d41dfd32
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ public class SearchResultIcon extends BubbleTextView implements
    public void applySearchTarget(SearchTarget searchTarget) {
        mSearchTarget = searchTarget;
        SearchEventTracker.getInstance(getContext()).registerWeakHandler(mSearchTarget, this);
        setVisibility(VISIBLE);
        switch (searchTarget.getItemType()) {
            case TARGET_TYPE_APP:
            case TARGET_TYPE_HERO_APP:
@@ -131,6 +132,10 @@ public class SearchResultIcon extends BubbleTextView implements
    private void prepareUsingApp(ComponentName componentName, UserHandle userHandle) {
        AllAppsStore appsStore = mLauncher.getAppsView().getAppsStore();
        AppInfo appInfo = appsStore.getApp(new ComponentKey(componentName, userHandle));
        if (appInfo == null) {
            setVisibility(GONE);
            return;
        }
        applyFromApplicationInfo(appInfo);
        notifyItemInfoChanged(appInfo);
    }