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

Commit d41dfd32 authored by Samuel Fufa's avatar Samuel Fufa
Browse files

hide app results if app info can't be found

Bug: 173673806
Change-Id: I337912a354ba4374240c4be1c3f2595c4228ec74
parent 2f4654ee
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);
    }