mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Deepshortcuts - only keep the per package shortcut count in memory.
Change to only keep the per Activity shortcut count in memory, not the list of ids. The full shortcuts are loaded at long press time so saves memory. Bug:117239104 Test:Manual and ran instrumentation tests Change-Id: Iee974ecba2c977216be4f078396ceed22b931f5d
This commit is contained in:
@@ -27,10 +27,10 @@ import com.android.launcher3.LauncherModel.Callbacks;
|
||||
import com.android.launcher3.ShortcutInfo;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.ItemInfoMatcher;
|
||||
import com.android.launcher3.util.MultiHashMap;
|
||||
import com.android.launcher3.widget.WidgetListRowEntry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
@@ -107,13 +107,9 @@ public abstract class BaseModelUpdateTask implements ModelUpdateTask {
|
||||
}
|
||||
|
||||
public void bindDeepShortcuts(BgDataModel dataModel) {
|
||||
final MultiHashMap<ComponentKey, String> shortcutMapCopy = dataModel.deepShortcutMap.clone();
|
||||
scheduleCallbackTask(new CallbackTask() {
|
||||
@Override
|
||||
public void execute(Callbacks callbacks) {
|
||||
callbacks.bindDeepShortcutMap(shortcutMapCopy);
|
||||
}
|
||||
});
|
||||
final HashMap<ComponentKey, Integer> shortcutMapCopy =
|
||||
new HashMap<>(dataModel.deepShortcutMap);
|
||||
scheduleCallbackTask(callbacks -> callbacks.bindDeepShortcutMap(shortcutMapCopy));
|
||||
}
|
||||
|
||||
public void bindUpdatedWidgets(BgDataModel dataModel) {
|
||||
|
||||
Reference in New Issue
Block a user