Using a single preview sandbox perview instead of recreating it everytime
> Reusing the model binding system instead of using a custom implementation > Reusing the existing grid update API for previews instead of custom implementation > Any new functionality is protected via the same flag as the grid update path Bug: 420997234 Bug: 397782741 Flag: EXEMPT refactor Test: atest GridPreviewTest Change-Id: Iaf8f34568618f98cc11138ce3fa327707c5f6f1a
This commit is contained in:
1 parent
0064944109
commit
8736534932
7 files changed
+376
-424
No files matched your search
@@ -259,8 +259,14 @@ public class LoaderTask implements Runnable {
|
||||
LoaderMemoryLogger memoryLogger, LauncherRestoreEventLogger restoreEventLogger) {
|
||||
|
||||
List<CacheableShortcutInfo> allShortcuts = new ArrayList<>();
|
||||
loadWorkspace(
|
||||
allShortcuts, mParams.getWorkspaceSelection(), memoryLogger, restoreEventLogger);
|
||||
Trace.beginSection("LoadWorkspace");
|
||||
try {
|
||||
loadWorkspaceImpl(allShortcuts, mParams.getWorkspaceSelection(), memoryLogger,
|
||||
restoreEventLogger);
|
||||
} finally {
|
||||
Trace.endSection();
|
||||
}
|
||||
logASplit("loadWorkspace finished");
|
||||
|
||||
// Sanitize data re-syncs widgets/shortcuts based on the workspace loaded from db.
|
||||
// sanitizeData should not be invoked if the workspace is loaded from a db different
|
||||
@@ -416,25 +422,6 @@ public class LoaderTask implements Runnable {
|
||||
this.notify();
|
||||
}
|
||||
|
||||
public void loadWorkspaceForPreview(String selection) {
|
||||
loadWorkspace(new ArrayList<>(), selection, null, null);
|
||||
}
|
||||
|
||||
private void loadWorkspace(
|
||||
List<CacheableShortcutInfo> allDeepShortcuts,
|
||||
String selection,
|
||||
@Nullable LoaderMemoryLogger memoryLogger,
|
||||
@Nullable LauncherRestoreEventLogger restoreEventLogger
|
||||
) {
|
||||
Trace.beginSection("LoadWorkspace");
|
||||
try {
|
||||
loadWorkspaceImpl(allDeepShortcuts, selection, memoryLogger, restoreEventLogger);
|
||||
} finally {
|
||||
Trace.endSection();
|
||||
}
|
||||
logASplit("loadWorkspace finished");
|
||||
}
|
||||
|
||||
private void loadWorkspaceImpl(
|
||||
List<CacheableShortcutInfo> allDeepShortcuts,
|
||||
String selection,
|
||||
|
||||
Reference in new issue
Block a user