2016-09-01 17:24:47 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
package com.android.launcher3.model;
|
|
|
|
|
|
2019-12-11 10:00:47 -08:00
|
|
|
import static com.android.launcher3.model.WidgetsModel.GO_DISABLE_WIDGETS;
|
|
|
|
|
import static com.android.launcher3.shortcuts.ShortcutRequest.PINNED;
|
|
|
|
|
|
2016-11-22 03:23:51 +05:30
|
|
|
import android.content.Context;
|
2019-12-11 10:00:47 -08:00
|
|
|
import android.content.pm.LauncherApps;
|
2019-04-17 18:38:52 -07:00
|
|
|
import android.content.pm.ShortcutInfo;
|
2016-12-15 15:53:17 -08:00
|
|
|
import android.os.UserHandle;
|
2017-01-30 15:11:27 -08:00
|
|
|
import android.text.TextUtils;
|
2016-09-01 17:24:47 -07:00
|
|
|
import android.util.Log;
|
|
|
|
|
import android.util.MutableInt;
|
|
|
|
|
|
2016-11-22 03:23:51 +05:30
|
|
|
import com.android.launcher3.InstallShortcutReceiver;
|
2016-09-01 17:24:47 -07:00
|
|
|
import com.android.launcher3.LauncherSettings;
|
2018-12-27 13:58:25 -08:00
|
|
|
import com.android.launcher3.Workspace;
|
2017-03-06 16:56:39 -08:00
|
|
|
import com.android.launcher3.config.FeatureFlags;
|
2020-04-06 15:11:17 -07:00
|
|
|
import com.android.launcher3.model.data.AppInfo;
|
|
|
|
|
import com.android.launcher3.model.data.FolderInfo;
|
|
|
|
|
import com.android.launcher3.model.data.ItemInfo;
|
|
|
|
|
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
|
|
|
|
import com.android.launcher3.model.data.PromiseAppInfo;
|
|
|
|
|
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
2017-03-28 12:23:22 -07:00
|
|
|
import com.android.launcher3.shortcuts.ShortcutKey;
|
2019-12-11 10:00:47 -08:00
|
|
|
import com.android.launcher3.shortcuts.ShortcutRequest;
|
2016-10-10 10:41:41 -07:00
|
|
|
import com.android.launcher3.util.ComponentKey;
|
2018-10-04 15:11:00 -07:00
|
|
|
import com.android.launcher3.util.IntArray;
|
2018-12-27 13:58:25 -08:00
|
|
|
import com.android.launcher3.util.IntSet;
|
2018-10-04 15:11:00 -07:00
|
|
|
import com.android.launcher3.util.IntSparseArrayMap;
|
2019-07-17 20:35:56 -07:00
|
|
|
import com.android.launcher3.util.ItemInfoMatcher;
|
|
|
|
|
import com.android.launcher3.util.ViewOnDrawExecutor;
|
|
|
|
|
import com.android.launcher3.widget.WidgetListRowEntry;
|
|
|
|
|
|
2017-01-30 15:11:27 -08:00
|
|
|
import java.io.FileDescriptor;
|
|
|
|
|
import java.io.PrintWriter;
|
2016-09-01 17:24:47 -07:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.HashMap;
|
2019-07-17 20:35:56 -07:00
|
|
|
import java.util.HashSet;
|
2016-10-10 10:41:41 -07:00
|
|
|
import java.util.Iterator;
|
|
|
|
|
import java.util.List;
|
2016-09-01 17:24:47 -07:00
|
|
|
import java.util.Map;
|
2019-12-11 10:00:47 -08:00
|
|
|
import java.util.function.BiConsumer;
|
|
|
|
|
import java.util.stream.Collectors;
|
2016-09-01 17:24:47 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* All the data stored in-memory and managed by the LauncherModel
|
|
|
|
|
*/
|
|
|
|
|
public class BgDataModel {
|
|
|
|
|
|
|
|
|
|
private static final String TAG = "BgDataModel";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Map of all the ItemInfos (shortcuts, folders, and widgets) created by
|
|
|
|
|
* LauncherModel to their ids
|
|
|
|
|
*/
|
2018-10-04 15:11:00 -07:00
|
|
|
public final IntSparseArrayMap<ItemInfo> itemsIdMap = new IntSparseArrayMap<>();
|
2016-09-01 17:24:47 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List of all the folders and shortcuts directly on the home screen (no widgets
|
|
|
|
|
* or shortcuts within folders).
|
|
|
|
|
*/
|
|
|
|
|
public final ArrayList<ItemInfo> workspaceItems = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* All LauncherAppWidgetInfo created by LauncherModel.
|
|
|
|
|
*/
|
|
|
|
|
public final ArrayList<LauncherAppWidgetInfo> appWidgets = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Map of id to FolderInfos of all the folders created by LauncherModel
|
|
|
|
|
*/
|
2018-10-04 15:11:00 -07:00
|
|
|
public final IntSparseArrayMap<FolderInfo> folders = new IntSparseArrayMap<>();
|
2016-09-01 17:24:47 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Map of ShortcutKey to the number of times it is pinned.
|
|
|
|
|
*/
|
|
|
|
|
public final Map<ShortcutKey, MutableInt> pinnedShortcutCounts = new HashMap<>();
|
|
|
|
|
|
2020-05-04 11:14:52 -07:00
|
|
|
/**
|
|
|
|
|
* List of all cached predicted items visible on home screen
|
|
|
|
|
*/
|
|
|
|
|
public final ArrayList<AppInfo> cachedPredictedItems = new ArrayList<>();
|
|
|
|
|
|
2017-06-02 13:46:55 -07:00
|
|
|
/**
|
|
|
|
|
* True if the launcher has permission to access deep shortcuts.
|
|
|
|
|
*/
|
|
|
|
|
public boolean hasShortcutHostPermission;
|
|
|
|
|
|
2016-10-10 10:41:41 -07:00
|
|
|
/**
|
2018-10-19 14:21:05 -07:00
|
|
|
* Maps all launcher activities to counts of their shortcuts.
|
2016-10-10 10:41:41 -07:00
|
|
|
*/
|
2018-10-19 14:21:05 -07:00
|
|
|
public final HashMap<ComponentKey, Integer> deepShortcutMap = new HashMap<>();
|
2016-10-10 10:41:41 -07:00
|
|
|
|
2017-06-02 13:46:55 -07:00
|
|
|
/**
|
|
|
|
|
* Entire list of widgets.
|
|
|
|
|
*/
|
|
|
|
|
public final WidgetsModel widgetsModel = new WidgetsModel();
|
|
|
|
|
|
2018-03-02 15:16:12 -08:00
|
|
|
/**
|
|
|
|
|
* Id when the model was last bound
|
|
|
|
|
*/
|
|
|
|
|
public int lastBindId = 0;
|
|
|
|
|
|
2016-09-01 17:24:47 -07:00
|
|
|
/**
|
|
|
|
|
* Clears all the data
|
|
|
|
|
*/
|
|
|
|
|
public synchronized void clear() {
|
|
|
|
|
workspaceItems.clear();
|
|
|
|
|
appWidgets.clear();
|
|
|
|
|
folders.clear();
|
|
|
|
|
itemsIdMap.clear();
|
|
|
|
|
pinnedShortcutCounts.clear();
|
2016-10-10 10:41:41 -07:00
|
|
|
deepShortcutMap.clear();
|
2016-09-01 17:24:47 -07:00
|
|
|
}
|
|
|
|
|
|
2018-12-27 13:58:25 -08:00
|
|
|
/**
|
|
|
|
|
* Creates an array of valid workspace screens based on current items in the model.
|
|
|
|
|
*/
|
|
|
|
|
public synchronized IntArray collectWorkspaceScreens() {
|
|
|
|
|
IntSet screenSet = new IntSet();
|
|
|
|
|
for (ItemInfo item: itemsIdMap) {
|
|
|
|
|
if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
|
|
|
|
|
screenSet.add(item.screenId);
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-15 09:00:05 -07:00
|
|
|
if (FeatureFlags.QSB_ON_FIRST_SCREEN || screenSet.isEmpty()) {
|
2018-12-27 13:58:25 -08:00
|
|
|
screenSet.add(Workspace.FIRST_SCREEN_ID);
|
|
|
|
|
}
|
|
|
|
|
return screenSet.getArray();
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-16 15:00:10 -08:00
|
|
|
public synchronized void dump(String prefix, FileDescriptor fd, PrintWriter writer,
|
|
|
|
|
String[] args) {
|
2017-01-30 15:11:27 -08:00
|
|
|
writer.println(prefix + "Data Model:");
|
2017-02-06 10:46:24 -08:00
|
|
|
writer.println(prefix + " ---- workspace items ");
|
2017-01-30 15:11:27 -08:00
|
|
|
for (int i = 0; i < workspaceItems.size(); i++) {
|
|
|
|
|
writer.println(prefix + '\t' + workspaceItems.get(i).toString());
|
|
|
|
|
}
|
2017-02-06 10:46:24 -08:00
|
|
|
writer.println(prefix + " ---- appwidget items ");
|
2017-01-30 15:11:27 -08:00
|
|
|
for (int i = 0; i < appWidgets.size(); i++) {
|
|
|
|
|
writer.println(prefix + '\t' + appWidgets.get(i).toString());
|
|
|
|
|
}
|
2017-02-06 10:46:24 -08:00
|
|
|
writer.println(prefix + " ---- folder items ");
|
2017-01-30 15:11:27 -08:00
|
|
|
for (int i = 0; i< folders.size(); i++) {
|
|
|
|
|
writer.println(prefix + '\t' + folders.valueAt(i).toString());
|
|
|
|
|
}
|
2017-02-06 10:46:24 -08:00
|
|
|
writer.println(prefix + " ---- items id map ");
|
2017-01-30 15:11:27 -08:00
|
|
|
for (int i = 0; i< itemsIdMap.size(); i++) {
|
|
|
|
|
writer.println(prefix + '\t' + itemsIdMap.valueAt(i).toString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (args.length > 0 && TextUtils.equals(args[0], "--all")) {
|
2018-10-19 14:21:05 -07:00
|
|
|
writer.println(prefix + "shortcut counts ");
|
|
|
|
|
for (Integer count : deepShortcutMap.values()) {
|
|
|
|
|
writer.print(count + ", ");
|
2017-01-30 15:11:27 -08:00
|
|
|
}
|
2018-10-19 14:21:05 -07:00
|
|
|
writer.println();
|
2017-01-30 15:11:27 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-11 10:48:34 -08:00
|
|
|
public synchronized void removeItem(Context context, ItemInfo... items) {
|
|
|
|
|
removeItem(context, Arrays.asList(items));
|
2016-09-01 17:24:47 -07:00
|
|
|
}
|
|
|
|
|
|
2017-01-11 10:48:34 -08:00
|
|
|
public synchronized void removeItem(Context context, Iterable<? extends ItemInfo> items) {
|
2016-09-01 17:24:47 -07:00
|
|
|
for (ItemInfo item : items) {
|
|
|
|
|
switch (item.itemType) {
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
|
|
|
|
|
folders.remove(item.id);
|
2020-02-14 14:15:13 -08:00
|
|
|
if (FeatureFlags.IS_STUDIO_BUILD) {
|
2016-09-01 17:24:47 -07:00
|
|
|
for (ItemInfo info : itemsIdMap) {
|
|
|
|
|
if (info.container == item.id) {
|
|
|
|
|
// We are deleting a folder which still contains items that
|
|
|
|
|
// think they are contained by that folder.
|
|
|
|
|
String msg = "deleting a folder (" + item + ") which still " +
|
|
|
|
|
"contains items (" + info + ")";
|
|
|
|
|
Log.e(TAG, msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
workspaceItems.remove(item);
|
|
|
|
|
break;
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT: {
|
|
|
|
|
// Decrement pinned shortcut count
|
2016-12-15 17:40:07 -08:00
|
|
|
ShortcutKey pinnedShortcut = ShortcutKey.fromItemInfo(item);
|
2016-09-01 17:24:47 -07:00
|
|
|
MutableInt count = pinnedShortcutCounts.get(pinnedShortcut);
|
2016-11-22 03:23:51 +05:30
|
|
|
if ((count == null || --count.value == 0)
|
|
|
|
|
&& !InstallShortcutReceiver.getPendingShortcuts(context)
|
|
|
|
|
.contains(pinnedShortcut)) {
|
2019-12-11 10:00:47 -08:00
|
|
|
unpinShortcut(context, pinnedShortcut);
|
2016-09-01 17:24:47 -07:00
|
|
|
}
|
|
|
|
|
// Fall through.
|
|
|
|
|
}
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
|
|
|
|
|
workspaceItems.remove(item);
|
|
|
|
|
break;
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET:
|
|
|
|
|
appWidgets.remove(item);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
itemsIdMap.remove(item.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-11 10:48:34 -08:00
|
|
|
public synchronized void addItem(Context context, ItemInfo item, boolean newItem) {
|
2016-09-01 17:24:47 -07:00
|
|
|
itemsIdMap.put(item.id, item);
|
|
|
|
|
switch (item.itemType) {
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
|
|
|
|
|
folders.put(item.id, (FolderInfo) item);
|
|
|
|
|
workspaceItems.add(item);
|
|
|
|
|
break;
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT: {
|
|
|
|
|
// Increment the count for the given shortcut
|
2016-12-15 17:40:07 -08:00
|
|
|
ShortcutKey pinnedShortcut = ShortcutKey.fromItemInfo(item);
|
2016-09-01 17:24:47 -07:00
|
|
|
MutableInt count = pinnedShortcutCounts.get(pinnedShortcut);
|
|
|
|
|
if (count == null) {
|
|
|
|
|
count = new MutableInt(1);
|
|
|
|
|
pinnedShortcutCounts.put(pinnedShortcut, count);
|
|
|
|
|
} else {
|
|
|
|
|
count.value++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Since this is a new item, pin the shortcut in the system server.
|
|
|
|
|
if (newItem && count.value == 1) {
|
2019-12-11 10:00:47 -08:00
|
|
|
updatePinnedShortcuts(context, pinnedShortcut, List::add);
|
2016-09-01 17:24:47 -07:00
|
|
|
}
|
|
|
|
|
// Fall through
|
|
|
|
|
}
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
|
|
|
|
|
if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP ||
|
|
|
|
|
item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
|
|
|
|
|
workspaceItems.add(item);
|
|
|
|
|
} else {
|
|
|
|
|
if (newItem) {
|
|
|
|
|
if (!folders.containsKey(item.container)) {
|
|
|
|
|
// Adding an item to a folder that doesn't exist.
|
|
|
|
|
String msg = "adding item: " + item + " to a folder that " +
|
|
|
|
|
" doesn't exist";
|
|
|
|
|
Log.e(TAG, msg);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2019-03-27 16:03:06 -07:00
|
|
|
findOrMakeFolder(item.container).add((WorkspaceItemInfo) item, false);
|
2016-09-01 17:24:47 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
|
|
|
|
|
case LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET:
|
|
|
|
|
appWidgets.add((LauncherAppWidgetInfo) item);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2019-12-11 10:00:47 -08:00
|
|
|
* Removes the given shortcut from the current list of pinned shortcuts.
|
|
|
|
|
* (Runs on background thread)
|
|
|
|
|
*/
|
|
|
|
|
public void unpinShortcut(Context context, ShortcutKey key) {
|
|
|
|
|
updatePinnedShortcuts(context, key, List::remove);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void updatePinnedShortcuts(Context context, ShortcutKey key,
|
|
|
|
|
BiConsumer<List<String>, String> idOp) {
|
|
|
|
|
if (GO_DISABLE_WIDGETS) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
String packageName = key.componentName.getPackageName();
|
|
|
|
|
String id = key.getId();
|
|
|
|
|
UserHandle user = key.user;
|
|
|
|
|
List<String> pinnedIds = new ShortcutRequest(context, user)
|
|
|
|
|
.forPackage(packageName)
|
|
|
|
|
.query(PINNED)
|
|
|
|
|
.stream()
|
|
|
|
|
.map(ShortcutInfo::getId)
|
|
|
|
|
.collect(Collectors.toCollection(ArrayList::new));
|
|
|
|
|
idOp.accept(pinnedIds, id);
|
|
|
|
|
try {
|
|
|
|
|
context.getSystemService(LauncherApps.class).pinShortcuts(packageName, pinnedIds, user);
|
|
|
|
|
} catch (SecurityException | IllegalStateException e) {
|
|
|
|
|
Log.w(TAG, "Failed to pin shortcut", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2016-09-01 17:24:47 -07:00
|
|
|
* Return an existing FolderInfo object if we have encountered this ID previously,
|
|
|
|
|
* or make a new one.
|
|
|
|
|
*/
|
2018-10-04 15:11:00 -07:00
|
|
|
public synchronized FolderInfo findOrMakeFolder(int id) {
|
2016-09-01 17:24:47 -07:00
|
|
|
// See if a placeholder was created for us already
|
|
|
|
|
FolderInfo folderInfo = folders.get(id);
|
|
|
|
|
if (folderInfo == null) {
|
|
|
|
|
// No placeholder -- create a new instance
|
|
|
|
|
folderInfo = new FolderInfo();
|
|
|
|
|
folders.put(id, folderInfo);
|
|
|
|
|
}
|
|
|
|
|
return folderInfo;
|
|
|
|
|
}
|
2016-10-10 10:41:41 -07:00
|
|
|
|
|
|
|
|
/**
|
2018-10-19 14:21:05 -07:00
|
|
|
* Clear all the deep shortcut counts for the given package, and re-add the new shortcut counts.
|
2016-10-10 10:41:41 -07:00
|
|
|
*/
|
2018-10-19 14:21:05 -07:00
|
|
|
public synchronized void updateDeepShortcutCounts(
|
2019-04-17 18:38:52 -07:00
|
|
|
String packageName, UserHandle user, List<ShortcutInfo> shortcuts) {
|
2016-10-10 10:41:41 -07:00
|
|
|
if (packageName != null) {
|
|
|
|
|
Iterator<ComponentKey> keysIter = deepShortcutMap.keySet().iterator();
|
|
|
|
|
while (keysIter.hasNext()) {
|
|
|
|
|
ComponentKey next = keysIter.next();
|
|
|
|
|
if (next.componentName.getPackageName().equals(packageName)
|
|
|
|
|
&& next.user.equals(user)) {
|
|
|
|
|
keysIter.remove();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Now add the new shortcuts to the map.
|
2019-04-17 18:38:52 -07:00
|
|
|
for (ShortcutInfo shortcut : shortcuts) {
|
2016-10-10 10:41:41 -07:00
|
|
|
boolean shouldShowInContainer = shortcut.isEnabled()
|
2020-03-19 12:28:24 -07:00
|
|
|
&& (shortcut.isDeclaredInManifest() || shortcut.isDynamic())
|
|
|
|
|
&& shortcut.getActivity() != null;
|
2016-10-10 10:41:41 -07:00
|
|
|
if (shouldShowInContainer) {
|
|
|
|
|
ComponentKey targetComponent
|
|
|
|
|
= new ComponentKey(shortcut.getActivity(), shortcut.getUserHandle());
|
2018-10-19 14:21:05 -07:00
|
|
|
|
|
|
|
|
Integer previousCount = deepShortcutMap.get(targetComponent);
|
|
|
|
|
deepShortcutMap.put(targetComponent, previousCount == null ? 1 : previousCount + 1);
|
2016-10-10 10:41:41 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-17 20:35:56 -07:00
|
|
|
|
|
|
|
|
public interface Callbacks {
|
2020-01-05 15:35:29 +05:30
|
|
|
/**
|
|
|
|
|
* Returns the page number to bind first, synchronously if possible or -1
|
|
|
|
|
*/
|
|
|
|
|
int getPageToBindSynchronously();
|
2019-07-17 20:35:56 -07:00
|
|
|
void clearPendingBinds();
|
|
|
|
|
void startBinding();
|
|
|
|
|
void bindItems(List<ItemInfo> shortcuts, boolean forceAnimateIcons);
|
|
|
|
|
void bindScreens(IntArray orderedScreenIds);
|
|
|
|
|
void finishFirstPageBind(ViewOnDrawExecutor executor);
|
|
|
|
|
void finishBindingItems(int pageBoundFirst);
|
|
|
|
|
void preAddApps();
|
|
|
|
|
void bindAppsAdded(IntArray newScreens,
|
|
|
|
|
ArrayList<ItemInfo> addNotAnimated, ArrayList<ItemInfo> addAnimated);
|
|
|
|
|
void bindPromiseAppProgressUpdated(PromiseAppInfo app);
|
|
|
|
|
void bindWorkspaceItemsChanged(ArrayList<WorkspaceItemInfo> updated);
|
|
|
|
|
void bindWidgetsRestored(ArrayList<LauncherAppWidgetInfo> widgets);
|
|
|
|
|
void bindRestoreItemsChange(HashSet<ItemInfo> updates);
|
|
|
|
|
void bindWorkspaceComponentsRemoved(ItemInfoMatcher matcher);
|
|
|
|
|
void bindAllWidgets(ArrayList<WidgetListRowEntry> widgets);
|
|
|
|
|
void onPageBoundSynchronously(int page);
|
|
|
|
|
void executeOnNextDraw(ViewOnDrawExecutor executor);
|
|
|
|
|
void bindDeepShortcutMap(HashMap<ComponentKey, Integer> deepShortcutMap);
|
|
|
|
|
|
|
|
|
|
void bindAllApplications(AppInfo[] apps);
|
2020-05-04 11:14:52 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Binds predicted appInfos at at available prediction slots.
|
|
|
|
|
*/
|
|
|
|
|
void bindPredictedItems(List<AppInfo> appInfos, IntArray ranks);
|
2019-07-17 20:35:56 -07:00
|
|
|
}
|
2016-09-01 17:24:47 -07:00
|
|
|
}
|