Separating apps list callback from model callback and simplifying various events

Bug: 137568159
Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
This commit is contained in:
Sunny Goyal committed 2019-07-25 11:29:16 -07:00
1 parent b33dc7d8fb
commit 87dcde6d6c
23 files changed
+210 -265

No files matched your search

@@ -19,14 +19,13 @@ package com.android.launcher3.model;
import android.os.Looper;
import android.util.Log;
import com.android.launcher3.AllAppsList;
import com.android.launcher3.AppInfo;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherAppWidgetInfo;
import com.android.launcher3.LauncherModel.CallbackTask;
import com.android.launcher3.LauncherModel.Callbacks;
import com.android.launcher3.model.BgDataModel.Callbacks;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.MainThreadExecutor;
import com.android.launcher3.PagedView;
@@ -279,9 +278,8 @@ public abstract class BaseLoaderResults {
public void bindAllApps() {
// shallow copy
@SuppressWarnings("unchecked")
ArrayList<AppInfo> list = (ArrayList<AppInfo>) mBgAllAppsList.data.clone();
executeCallbacksTask(c -> c.bindAllApplications(list), mUiExecutor);
AppInfo[] apps = mBgAllAppsList.copyData();
executeCallbacksTask(c -> c.bindAllApplications(apps), mUiExecutor);
}
public abstract void bindWidgets();