[automerge] Added provision to switch the PageIndicator in specific Launchers 2p: 0f2e1b6714 2p: 070def81b0

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17399997

Change-Id: I8602328c27fb579601bc93e70730a0df473b6265
This commit is contained in:
Shikha Malhotra
2022-04-08 11:48:28 +00:00
committed by Presubmit Automerger Backend
4 changed files with 33 additions and 8 deletions
+7 -6
View File
@@ -237,8 +237,8 @@ import java.util.stream.Stream;
/**
* 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 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
private Configuration mOldConfig;
@Thunk
Workspace mWorkspace;
Workspace<?> mWorkspace;
@Thunk
DragLayer mDragLayer;
private DragController mDragController;
@@ -1527,7 +1527,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
return mAppsView;
}
public Workspace getWorkspace() {
public Workspace<?> getWorkspace() {
return mWorkspace;
}
@@ -3226,11 +3226,12 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
/** 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();
}
}