mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Caching last predictions and loading it with model
Adding support for persisting itemInfos on disk. This uses a separate xml file. Unlike prefs, it does not keep the items in memory and is just a wraper over reading/writing a file. Bug: 160748731 Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
This commit is contained in:
@@ -18,13 +18,17 @@ package com.android.launcher3.model;
|
||||
import static com.android.launcher3.util.PackageManagerHelper.hasShortcutsPermission;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.shortcuts.ShortcutKey;
|
||||
import com.android.launcher3.util.ResourceBasedOverride;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class to extend LauncherModel functionality to provide extra data
|
||||
*/
|
||||
@@ -65,11 +69,12 @@ public class ModelDelegate implements ResourceBasedOverride {
|
||||
* Load delegate items if any in the data model
|
||||
*/
|
||||
@WorkerThread
|
||||
public void loadItems() { }
|
||||
public void loadItems(UserManagerState ums, Map<ShortcutKey, ShortcutInfo> pinnedShortcuts) { }
|
||||
|
||||
/**
|
||||
* Called when the delegate is no loner needed
|
||||
*/
|
||||
@WorkerThread
|
||||
public void destroy() { }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user