Add @Nullable annotation to AllAppsStore.getApp.

Test: Manual
Bug: 180120291
Change-Id: I3f29d478e39b46e307f33f2f354720bc2915b550
This commit is contained in:
thiruram 2021-02-12 16:02:39 -08:00 committed by Thiru Ramasamy
parent b6d28e885d
commit e1a8440d78
1 changed files with 7 additions and 0 deletions

View File

@ -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;