Added provision to switch the PageIndicator in specific Launchers
Please see the related CL in LauncherLilyGoogle where pagination is
implemented as persistent dots.
Bug: b/218187058
Test: manually test thet Launcher3 features work correctly
Change-Id: Ic20aa92249b1bbe3c4ab7810683b54648a181722
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 6e86c43..6b4ef94 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -237,8 +237,8 @@
/**
* Default launcher application.
*/
-public class Launcher extends StatefulActivity<LauncherState> implements LauncherExterns,
- Callbacks, InvariantDeviceProfile.OnIDPChangeListener,
+public class Launcher extends StatefulActivity<LauncherState>
+ implements LauncherExterns, Callbacks, InvariantDeviceProfile.OnIDPChangeListener,
PluginListener<LauncherOverlayPlugin>, LauncherOverlayCallbacks {
public static final String TAG = "Launcher";
@@ -304,7 +304,7 @@
private Configuration mOldConfig;
@Thunk
- Workspace mWorkspace;
+ Workspace<?> mWorkspace;
@Thunk
DragLayer mDragLayer;
private DragController mDragController;
@@ -1527,7 +1527,7 @@
return mAppsView;
}
- public Workspace getWorkspace() {
+ public Workspace<?> getWorkspace() {
return mWorkspace;
}
@@ -3234,11 +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.
- getWorkspace().getPageIndicator().pauseAnimations();
+ mWorkspace.getPageIndicator().pauseAnimations();
}
/** Resumes view updates at the end of the app launch animation. */
public void resumeExpensiveViewUpdates() {
- getWorkspace().getPageIndicator().skipAnimationsToEnd();
+ mWorkspace.getPageIndicator().skipAnimationsToEnd();
}
+
}