Refactor code to be used in LauncherLily features
Refactor add to workspace code to be used in Lily Launcher.
Also utilising code swap feature to swap out functionality of sorting
items on workspaces and finding next vacant space.
Bug: b/218186705
Test: Manually tested Launcher3 works.
Change-Id: I42a44eabeb307e1d23ef333e0a169437f9062bb6
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 923e614..eda834e 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3234,12 +3234,12 @@
/** Pauses view updates that should not be run during the app launch animation. */
public void pauseExpensiveViewUpdates() {
// Pause page indicator animations as they lead to layer trashing.
- mWorkspace.getPageIndicator().pauseAnimations();
+ getWorkspace().getPageIndicator().pauseAnimations();
}
/** Resumes view updates at the end of the app launch animation. */
public void resumeExpensiveViewUpdates() {
- mWorkspace.getPageIndicator().skipAnimationsToEnd();
+ getWorkspace().getPageIndicator().skipAnimationsToEnd();
}
}