From e1a8440d78ad2437c5b69eb4df02f0a91cc4ff02 Mon Sep 17 00:00:00 2001 From: thiruram Date: Fri, 12 Feb 2021 16:02:39 -0800 Subject: [PATCH] Add @Nullable annotation to AllAppsStore.getApp. Test: Manual Bug: 180120291 Change-Id: I3f29d478e39b46e307f33f2f354720bc2915b550 --- src/com/android/launcher3/allapps/AllAppsStore.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/android/launcher3/allapps/AllAppsStore.java b/src/com/android/launcher3/allapps/AllAppsStore.java index 769cb5e31b..355ccadeba 100644 --- a/src/com/android/launcher3/allapps/AllAppsStore.java +++ b/src/com/android/launcher3/allapps/AllAppsStore.java @@ -21,6 +21,8 @@ import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.Nullable; + import com.android.launcher3.BubbleTextView; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; @@ -78,6 +80,11 @@ public class AllAppsStore { return (mModelFlags & mask) != 0; } + /** + * Returns {@link AppInfo} if any apps matches with provided {@link ComponentKey}, otherwise + * null. + */ + @Nullable public AppInfo getApp(ComponentKey key) { mTempInfo.componentName = key.componentName; mTempInfo.user = key.user;