Explicit Nullbility in Launcher (Part 5)
This CL addresses the nullbility in LauncherModel and update tasks. Bug: 242895652 Test: manual Change-Id: Ied635c944c3656f0d493b295f772aa0329b354b9
This commit is contained in:
1 parent
af2fe7fd12
commit
777c13eb00
21 files changed
+290
-130
No files matched your search
@@ -22,6 +22,7 @@ import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.AnyThread;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.allapps.BaseAllAppsAdapter.AdapterItem;
|
||||
@@ -68,7 +69,8 @@ public class DefaultAppSearchAlgorithm implements SearchAlgorithm<AdapterItem> {
|
||||
public void doSearch(String query, SearchCallback<AdapterItem> callback) {
|
||||
mAppState.getModel().enqueueModelUpdateTask(new BaseModelUpdateTask() {
|
||||
@Override
|
||||
public void execute(LauncherAppState app, BgDataModel dataModel, AllAppsList apps) {
|
||||
public void execute(@NonNull final LauncherAppState app,
|
||||
@NonNull final BgDataModel dataModel, @NonNull final AllAppsList apps) {
|
||||
ArrayList<AdapterItem> result = getTitleMatchResult(apps.data, query);
|
||||
if (mAddNoResultsMessage && result.isEmpty()) {
|
||||
result.add(getEmptyMessageAdapterItem(query));
|
||||
|
||||
Reference in new issue
Block a user