diff options
29 files changed, 254 insertions, 49 deletions
diff --git a/protos/launcher_atom.proto b/protos/launcher_atom.proto index 7c648b6d88..823c821c7d 100644 --- a/protos/launcher_atom.proto +++ b/protos/launcher_atom.proto @@ -121,6 +121,20 @@ message SettingsContainer { } message TaskSwitcherContainer { + /** + * Indicates the current OrientationHandler in use in Overview. + * In fake landscape, the value will be + * {@link com.android.quickstep.orientation.LandscapePagedViewHandler} and in real landscape, + * the value will be {@link com.android.quickstep.orientation.PortraitPagedViewHandler} for + * example. + */ + optional OrientationHandler orientation_handler = 1; + + enum OrientationHandler { + PORTRAIT = 0; + LANDSCAPE = 1; + SEASCAPE = 2; + } } // Container for taskbar. diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 72aaa9000a..0c499b8bc6 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -375,7 +375,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener */ protected boolean isLaunchingFromRecents(@NonNull View v, @Nullable RemoteAnimationTarget[] targets) { - return mLauncher.getStateManager().getState().overviewUi + return mLauncher.getStateManager().getState().isRecentsViewVisible && findTaskViewToLaunch(mLauncher.getOverviewPanel(), v, targets) != null; } diff --git a/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java b/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java index 9eabb55897..d49d573456 100644 --- a/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java +++ b/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java @@ -190,7 +190,7 @@ public class DesktopVisibilityController { } setBackgroundStateEnabled(state == BACKGROUND_APP); // Desktop visibility tracks overview and background state separately - setOverviewStateEnabled(state != BACKGROUND_APP && state.overviewUi); + setOverviewStateEnabled(state != BACKGROUND_APP && state.isRecentsViewVisible); } private void setOverviewStateEnabled(boolean overviewStateEnabled) { diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index d516d873ca..ead1a8a441 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -669,7 +669,7 @@ public class TaskbarLauncherStateController { } boolean isInOverviewUi() { - return mLauncherState.overviewUi; + return mLauncherState.isRecentsViewVisible; } private void playStateTransitionAnim(AnimatorSet animatorSet, long duration, diff --git a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java index 2eced74849..14d391ba1c 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java @@ -71,7 +71,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> ADJACENT_PAGE_HORIZONTAL_OFFSET.set(mRecentsView, scaleAndOffset[1]); TASK_SECONDARY_TRANSLATION.set(mRecentsView, 0f); - getContentAlphaProperty().set(mRecentsView, state.overviewUi ? 1f : 0); + getContentAlphaProperty().set(mRecentsView, state.isRecentsViewVisible ? 1f : 0); getTaskModalnessProperty().set(mRecentsView, state.getOverviewModalness()); RECENTS_GRID_PROGRESS.set(mRecentsView, state.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f); @@ -109,7 +109,8 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> setter.setFloat(mRecentsView, TASK_SECONDARY_TRANSLATION, 0f, config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR)); - boolean exitingOverview = !FeatureFlags.enableSplitContextually() && !toState.overviewUi; + boolean exitingOverview = + !FeatureFlags.enableSplitContextually() && !toState.isRecentsViewVisible; if (mRecentsView.isSplitSelectionActive() && exitingOverview) { setter.add(mRecentsView.getSplitSelectController().getSplitAnimationController() .createPlaceholderDismissAnim(mLauncher, LAUNCHER_SPLIT_SELECTION_EXIT_HOME, @@ -124,7 +125,8 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> ); } - setter.setFloat(mRecentsView, getContentAlphaProperty(), toState.overviewUi ? 1 : 0, + setter.setFloat(mRecentsView, getContentAlphaProperty(), + toState.isRecentsViewVisible ? 1 : 0, config.getInterpolator(ANIM_OVERVIEW_FADE, AGGRESSIVE_EASE_IN_OUT)); setter.setFloat( @@ -145,7 +147,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> private Interpolator getOverviewInterpolator(LauncherState fromState, LauncherState toState) { return fromState == QUICK_SWITCH_FROM_HOME ? ACCELERATE_DECELERATE - : toState.overviewUi ? INSTANT : FINAL_FRAME; + : toState.isRecentsViewVisible ? INSTANT : FINAL_FRAME; } abstract FloatProperty getTaskModalnessProperty(); diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index b1bb198dff..efcc7d31d8 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -1477,4 +1477,9 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer } return super.onCreateView(parent, name, context, attrs); } + + @Override + public boolean isRecentsViewVisible() { + return getStateManager().getState().isRecentsViewVisible; + } } diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java index e02ec41aff..235ec7b101 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java @@ -67,7 +67,7 @@ public final class RecentsViewStateController extends @Override public void setState(@NonNull LauncherState state) { super.setState(state); - if (state.overviewUi) { + if (state.isRecentsViewVisible) { mRecentsView.updateEmptyMessage(); } else { mRecentsView.resetTaskVisuals(); @@ -76,7 +76,7 @@ public final class RecentsViewStateController extends mRecentsView.setFullscreenProgress(state.getOverviewFullscreenProgress()); // In Overview, we may be layering app surfaces behind Launcher, so we need to notify // DepthController to prevent optimizations which might occlude the layers behind - mLauncher.getDepthController().setHasContentBehindLauncher(state.overviewUi); + mLauncher.getDepthController().setHasContentBehindLauncher(state.isRecentsViewVisible); PendingAnimation builder = new PendingAnimation(state.getTransitionDuration(mLauncher, true)); @@ -89,7 +89,7 @@ public final class RecentsViewStateController extends @NonNull StateAnimationConfig config, @NonNull PendingAnimation builder) { super.setStateWithAnimationInternal(toState, config, builder); - if (toState.overviewUi) { + if (toState.isRecentsViewVisible) { // While animating into recents, update the visible task data as needed builder.addOnFrameCallback(() -> mRecentsView.loadVisibleTaskData(FLAG_UPDATE_ALL)); mRecentsView.updateEmptyMessage(); @@ -107,7 +107,8 @@ public final class RecentsViewStateController extends // In Overview, we may be layering app surfaces behind Launcher, so we need to notify // DepthController to prevent optimizations which might occlude the layers behind builder.addListener(AnimatorListeners.forSuccessCallback(() -> - mLauncher.getDepthController().setHasContentBehindLauncher(toState.overviewUi))); + mLauncher.getDepthController().setHasContentBehindLauncher( + toState.isRecentsViewVisible))); handleSplitSelectionState(toState, builder, /* animate */true); diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java index 7fa121dadb..262564613a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java @@ -34,7 +34,7 @@ import com.android.quickstep.views.RecentsView; */ public class BackgroundAppState extends OverviewState { - private static final int STATE_FLAGS = FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI + private static final int STATE_FLAGS = FLAG_DISABLE_RESTORE | FLAG_RECENTS_VIEW_VISIBLE | FLAG_WORKSPACE_INACCESSIBLE | FLAG_NON_INTERACTIVE | FLAG_CLOSE_POPUPS; public BackgroundAppState(int id) { diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java index 3c291e6095..932d241307 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java @@ -32,7 +32,7 @@ import com.android.quickstep.views.RecentsView; public class OverviewModalTaskState extends OverviewState { private static final int STATE_FLAGS = - FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_WORKSPACE_INACCESSIBLE; + FLAG_DISABLE_RESTORE | FLAG_RECENTS_VIEW_VISIBLE | FLAG_WORKSPACE_INACCESSIBLE; public OverviewModalTaskState(int id) { super(id, LAUNCHER_STATE_OVERVIEW, STATE_FLAGS); diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java index d0eef8e3bb..7173298d19 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java @@ -47,7 +47,7 @@ public class OverviewState extends LauncherState { protected static final Rect sTempRect = new Rect(); private static final int STATE_FLAGS = FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED - | FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_WORKSPACE_INACCESSIBLE + | FLAG_DISABLE_RESTORE | FLAG_RECENTS_VIEW_VISIBLE | FLAG_WORKSPACE_INACCESSIBLE | FLAG_CLOSE_POPUPS; public OverviewState(int id) { diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java index 3ed2d0bdb8..11e0ed528c 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java @@ -118,7 +118,7 @@ public class NavBarToHomeTouchController implements TouchController, if (!cameFromNavBar) { return false; } - if (mStartState.overviewUi || mStartState == ALL_APPS) { + if (mStartState.isRecentsViewVisible || mStartState == ALL_APPS) { return true; } int typeToClose = TYPE_ALL & ~TYPE_ALL_APPS_EDU; @@ -145,7 +145,7 @@ public class NavBarToHomeTouchController implements TouchController, private void initCurrentAnimation() { long accuracy = (long) (getShiftRange() * 2); final PendingAnimation builder = new PendingAnimation(accuracy); - if (mStartState.overviewUi) { + if (mStartState.isRecentsViewVisible) { RecentsView recentsView = mLauncher.getOverviewPanel(); AnimatorControllerWithResistance.createRecentsResistanceFromOverviewAnim(mLauncher, builder); @@ -194,7 +194,7 @@ public class NavBarToHomeTouchController implements TouchController, RecentsView recentsView = mLauncher.getOverviewPanel(); recentsView.switchToScreenshot(null, () -> recentsView.finishRecentsAnimation(true /* toRecents */, null)); - if (mStartState.overviewUi) { + if (mStartState.isRecentsViewVisible) { Runnable onReachedHome = () -> { StateManager.StateListener<LauncherState> listener = new StateManager.StateListener<>() { diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 28ae3d2ff7..94de1e00d5 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1474,7 +1474,8 @@ public abstract class AbsSwipeUpHandler<T extends RecentsViewContainer, default: event = IGNORE; } - StatsLogger logger = StatsLogManager.newInstance(mContext).logger() + StatsLogger logger = StatsLogManager.newInstance( + mContainer != null ? mContainer.asContext() : mContext).logger() .withSrcState(LAUNCHER_STATE_BACKGROUND) .withDstState(endTarget.containerType) .withInputType(mGestureState.isTrackpadGesture() diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java index 7655c5913e..811b9fd4cd 100644 --- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java +++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java @@ -192,7 +192,7 @@ public final class LauncherActivityInterface extends public RecentsView getVisibleRecentsView() { QuickstepLauncher launcher = getVisibleLauncher(); RecentsView recentsView = - launcher != null && launcher.getStateManager().getState().overviewUi + launcher != null && launcher.getStateManager().getState().isRecentsViewVisible ? launcher.getOverviewPanel() : null; if (recentsView == null || (!launcher.hasBeenResumed() && recentsView.getRunningTaskViewId() == -1)) { diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java index 68923eeccb..5c6e3f8b09 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java @@ -16,6 +16,9 @@ package com.android.quickstep; import static com.android.launcher3.PagedView.INVALID_PAGE; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_3_BUTTON; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_KEYBOARD_QUICK_SWITCH; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_KEYBOARD_SHORTCUT; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.quickstep.util.ActiveGestureLog.INTENT_EXTRA_LOG_TRACE_ID; @@ -34,6 +37,8 @@ import androidx.annotation.UiThread; import com.android.internal.jank.Cuj; import com.android.launcher3.DeviceProfile; import com.android.launcher3.config.FeatureFlags; +import com.android.launcher3.logger.LauncherAtom; +import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.statemanager.StatefulActivity; import com.android.launcher3.taskbar.TaskbarUIController; import com.android.launcher3.util.RunnableList; @@ -285,6 +290,7 @@ public class OverviewCommandHelper { public void onAnimationStart(Animator animation) { super.onAnimationStart(animation); updateRecentsViewFocus(cmd); + logShowOverviewFrom(cmd.type); } @Override public void onAnimationEnd(Animator animation) { @@ -319,6 +325,7 @@ public class OverviewCommandHelper { public void onRecentsAnimationStart(RecentsAnimationController controller, RecentsAnimationTargets targets) { updateRecentsViewFocus(cmd); + logShowOverviewFrom(cmd.type); activityInterface.runOnInitBackgroundStateUI(() -> interactionHandler.onGestureEnded(0, new PointF())); cmd.removeListener(this); @@ -420,6 +427,33 @@ public class OverviewCommandHelper { return true; } + private <T extends StatefulActivity<?> & RecentsViewContainer> + void logShowOverviewFrom(int cmdType) { + BaseActivityInterface<?, T> activityInterface = + mOverviewComponentObserver.getActivityInterface(); + var container = activityInterface.getCreatedContainer(); + if (container != null) { + StatsLogManager.LauncherEvent event; + switch (cmdType) { + case TYPE_SHOW -> event = LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_KEYBOARD_SHORTCUT; + case TYPE_HIDE -> + event = LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_KEYBOARD_QUICK_SWITCH; + case TYPE_TOGGLE -> event = LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_3_BUTTON; + default -> { + return; + } + } + + StatsLogManager.newInstance(container.asContext()) + .logger() + .withContainerInfo(LauncherAtom.ContainerInfo.newBuilder() + .setTaskSwitcherContainer( + LauncherAtom.TaskSwitcherContainer.getDefaultInstance()) + .build()) + .log(event); + } + } + public void dump(PrintWriter pw) { pw.println("OverviewCommandHelper:"); pw.println(" mPendingCommands=" + mPendingCommands.size()); diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java index f57f4c8440..97a0b3fd23 100644 --- a/quickstep/src/com/android/quickstep/RecentsActivity.java +++ b/quickstep/src/com/android/quickstep/RecentsActivity.java @@ -33,7 +33,6 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.app.ActivityOptions; -import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; @@ -507,4 +506,9 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> implem public TISBindHelper getTISBindHelper() { return mTISBindHelper; } + + @Override + public boolean isRecentsViewVisible() { + return getStateManager().getState().isRecentsViewVisible(); + } } diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java index 644e4f9704..94764a58cc 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java @@ -136,7 +136,7 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState } private Interpolator getOverviewInterpolator(RecentsState toState) { - return toState.overviewUi() ? INSTANT : FINAL_FRAME; + return toState.isRecentsViewVisible() ? INSTANT : FINAL_FRAME; } /** diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java index b79586bae8..096ed2c0cb 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java @@ -247,7 +247,7 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta } // Set border after select mode changes to avoid showing border during state transition - if (!toState.overviewUi() || toState == MODAL_TASK) { + if (!toState.isRecentsViewVisible() || toState == MODAL_TASK) { setTaskBorderEnabled(false); } @@ -267,7 +267,7 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta setOverviewSelectEnabled(false); } - if (finalState.overviewUi() && finalState != MODAL_TASK) { + if (finalState.isRecentsViewVisible() && finalState != MODAL_TASK) { setTaskBorderEnabled(true); } @@ -298,7 +298,7 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta public boolean onTouchEvent(MotionEvent ev) { boolean result = super.onTouchEvent(ev); // Do not let touch escape to siblings below this view. - return result || mContainer.getStateManager().getState().overviewUi(); + return result || mContainer.getStateManager().getState().isRecentsViewVisible(); } @Override diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java index 84937a20a6..ca9753f4a4 100644 --- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java +++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java @@ -26,7 +26,6 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.statemanager.BaseState; import com.android.launcher3.util.Themes; -import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsViewContainer; /** @@ -41,22 +40,23 @@ public class RecentsState implements BaseState<RecentsState> { private static final int FLAG_SHOW_AS_GRID = BaseState.getFlag(4); private static final int FLAG_SCRIM = BaseState.getFlag(5); private static final int FLAG_LIVE_TILE = BaseState.getFlag(6); - private static final int FLAG_OVERVIEW_UI = BaseState.getFlag(7); + private static final int FLAG_RECENTS_VIEW_VISIBLE = BaseState.getFlag(7); private static final int FLAG_TASK_THUMBNAIL_SPLASH = BaseState.getFlag(8); public static final RecentsState DEFAULT = new RecentsState(0, FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID - | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_OVERVIEW_UI); + | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_RECENTS_VIEW_VISIBLE); public static final RecentsState MODAL_TASK = new ModalState(1, FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_MODAL - | FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_OVERVIEW_UI); + | FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_RECENTS_VIEW_VISIBLE); public static final RecentsState BACKGROUND_APP = new BackgroundAppState(2, - FLAG_DISABLE_RESTORE | FLAG_NON_INTERACTIVE | FLAG_FULL_SCREEN | FLAG_OVERVIEW_UI + FLAG_DISABLE_RESTORE | FLAG_NON_INTERACTIVE | FLAG_FULL_SCREEN + | FLAG_RECENTS_VIEW_VISIBLE | FLAG_TASK_THUMBNAIL_SPLASH); public static final RecentsState HOME = new RecentsState(3, 0); public static final RecentsState BG_LAUNCHER = new LauncherState(4, 0); public static final RecentsState OVERVIEW_SPLIT_SELECT = new RecentsState(5, - FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_OVERVIEW_UI | FLAG_CLOSE_POPUPS + FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_RECENTS_VIEW_VISIBLE | FLAG_CLOSE_POPUPS | FLAG_DISABLE_RESTORE); public final int ordinal; @@ -152,8 +152,8 @@ public class RecentsState implements BaseState<RecentsState> { /** * True if the state has overview panel visible. */ - public boolean overviewUi() { - return hasFlag(FLAG_OVERVIEW_UI); + public boolean isRecentsViewVisible() { + return hasFlag(FLAG_RECENTS_VIEW_VISIBLE); } private static class ModalState extends RecentsState { diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java index 3cae4dcbe4..1d4160d600 100644 --- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java +++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java @@ -16,6 +16,10 @@ package com.android.quickstep.logging; +import static android.view.Surface.ROTATION_180; +import static android.view.Surface.ROTATION_270; +import static android.view.Surface.ROTATION_90; + import static androidx.core.util.Preconditions.checkNotNull; import static androidx.core.util.Preconditions.checkState; @@ -26,10 +30,17 @@ import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerC import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.SEARCH_RESULT_CONTAINER; import static com.android.launcher3.logger.LauncherAtomExtensions.ExtendedContainers.ContainerCase.DEVICE_SEARCH_RESULT_CONTAINER; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WORKSPACE_SNAPSHOT; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_0; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_90; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_180; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_270; import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__ALLAPPS; import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__BACKGROUND; import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__HOME; import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__OVERVIEW; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__RECENTS_ORIENTATION_HANDLER__PORTRAIT; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__RECENTS_ORIENTATION_HANDLER__LANDSCAPE; +import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__RECENTS_ORIENTATION_HANDLER__SEASCAPE; import android.content.Context; import android.text.TextUtils; @@ -59,6 +70,7 @@ import com.android.launcher3.logger.LauncherAtomExtensions.ExtendedContainers; import com.android.launcher3.logging.InstanceId; import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.model.data.ItemInfo; +import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.Executors; import com.android.launcher3.util.LogConfig; import com.android.launcher3.views.ActivityContext; @@ -226,10 +238,15 @@ public class StatsLogCompatManager extends StatsLogManager { private int mInputType = SysUiStatsLog.LAUNCHER_UICHANGED__INPUT_TYPE__UNKNOWN; private Optional<Integer> mFeatures = Optional.empty(); private Optional<String> mPackageName = Optional.empty(); + /** + * Indicates the current rotation of the display. Uses {@link android.view.Surface values.} + */ + private final int mDisplayRotation; StatsCompatLogger(Context context, ActivityContext activityContext) { mContext = context; mActivityContext = Optional.ofNullable(activityContext); + mDisplayRotation = DisplayController.INSTANCE.get(mContext).getInfo().rotation; } @Override @@ -502,7 +519,28 @@ public class StatsLogCompatManager extends StatsLogManager { getSearchAttributes(atomInfo) /* searchAttributes */, getAttributes(atomInfo) /* attributes */, inputType /* input_type */, - atomInfo.getUserType() /* user_type */); + atomInfo.getUserType() /* user_type */, + getDisplayRotation() /* display_rotation */, + getRecentsOrientationHandler(atomInfo) /* recents_orientation_handler */); + } + + private int getDisplayRotation() { + return switch (mDisplayRotation) { + case ROTATION_90 -> LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_90; + case ROTATION_180 -> LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_180; + case ROTATION_270 -> LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_270; + default -> LAUNCHER_UICHANGED__DISPLAY_ROTATION__ROTATION_0; + }; + } + + private int getRecentsOrientationHandler(LauncherAtom.ItemInfo itemInfo) { + var orientationHandler = + itemInfo.getContainerInfo().getTaskSwitcherContainer().getOrientationHandler(); + return switch (orientationHandler) { + case PORTRAIT -> LAUNCHER_UICHANGED__RECENTS_ORIENTATION_HANDLER__PORTRAIT; + case LANDSCAPE -> LAUNCHER_UICHANGED__RECENTS_ORIENTATION_HANDLER__LANDSCAPE; + case SEASCAPE -> LAUNCHER_UICHANGED__RECENTS_ORIENTATION_HANDLER__SEASCAPE; + }; } } diff --git a/quickstep/src/com/android/quickstep/orientation/LandscapePagedViewHandler.kt b/quickstep/src/com/android/quickstep/orientation/LandscapePagedViewHandler.kt index 164010472a..8f8cc6eeb7 100644 --- a/quickstep/src/com/android/quickstep/orientation/LandscapePagedViewHandler.kt +++ b/quickstep/src/com/android/quickstep/orientation/LandscapePagedViewHandler.kt @@ -42,6 +42,7 @@ import com.android.launcher3.Flags import com.android.launcher3.LauncherAnimUtils import com.android.launcher3.R import com.android.launcher3.Utilities +import com.android.launcher3.logger.LauncherAtom.TaskSwitcherContainer import com.android.launcher3.touch.PagedOrientationHandler.ChildBounds import com.android.launcher3.touch.PagedOrientationHandler.Float2DAction import com.android.launcher3.touch.PagedOrientationHandler.Int2DAction @@ -611,6 +612,9 @@ open class LandscapePagedViewHandler : RecentsPagedOrientationHandler { override fun getFloatingTaskPrimaryTranslation(floatingTask: View, dp: DeviceProfile): Float = floatingTask.translationY + override fun getHandlerTypeForLogging(): TaskSwitcherContainer.OrientationHandler = + TaskSwitcherContainer.OrientationHandler.LANDSCAPE + /** * Retrieves split icons position * diff --git a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java index 1be908be10..f6284d55e6 100644 --- a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java +++ b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java @@ -46,9 +46,12 @@ import android.view.View; import android.widget.FrameLayout; import android.widget.LinearLayout; +import androidx.annotation.NonNull; + import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.Utilities; +import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.touch.DefaultPagedViewHandler; import com.android.launcher3.touch.SingleAxisSwipeDetector; import com.android.launcher3.util.SplitConfigurationOptions; @@ -802,4 +805,10 @@ public class PortraitPagedViewHandler extends DefaultPagedViewHandler implements ? floatingTask.getTranslationX() : floatingTask.getTranslationY(); } + + @NonNull + @Override + public LauncherAtom.TaskSwitcherContainer.OrientationHandler getHandlerTypeForLogging() { + return LauncherAtom.TaskSwitcherContainer.OrientationHandler.PORTRAIT; + } } diff --git a/quickstep/src/com/android/quickstep/orientation/RecentsPagedOrientationHandler.kt b/quickstep/src/com/android/quickstep/orientation/RecentsPagedOrientationHandler.kt index 6c82890f73..5bc1be8a19 100644 --- a/quickstep/src/com/android/quickstep/orientation/RecentsPagedOrientationHandler.kt +++ b/quickstep/src/com/android/quickstep/orientation/RecentsPagedOrientationHandler.kt @@ -26,6 +26,7 @@ import android.view.View import android.widget.FrameLayout import android.widget.LinearLayout import com.android.launcher3.DeviceProfile +import com.android.launcher3.logger.LauncherAtom import com.android.launcher3.touch.PagedOrientationHandler import com.android.launcher3.touch.PagedOrientationHandler.Float2DAction import com.android.launcher3.touch.PagedOrientationHandler.Int2DAction @@ -371,6 +372,8 @@ interface RecentsPagedOrientationHandler : PagedOrientationHandler { */ fun getFloatingTaskPrimaryTranslation(floatingTask: View, dp: DeviceProfile): Float + fun getHandlerTypeForLogging(): LauncherAtom.TaskSwitcherContainer.OrientationHandler + companion object { @JvmField val PORTRAIT: RecentsPagedOrientationHandler = PortraitPagedViewHandler() @JvmField val LANDSCAPE: RecentsPagedOrientationHandler = LandscapePagedViewHandler() diff --git a/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt b/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt index 5bebf8c8be..46e4b0c30c 100644 --- a/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt +++ b/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt @@ -32,6 +32,7 @@ import com.android.launcher3.DeviceProfile import com.android.launcher3.Flags import com.android.launcher3.R import com.android.launcher3.Utilities +import com.android.launcher3.logger.LauncherAtom import com.android.launcher3.touch.SingleAxisSwipeDetector import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT @@ -395,4 +396,8 @@ class SeascapePagedViewHandler : LandscapePagedViewHandler() { iconView.layoutParams = layoutParams } } + + @Override + override fun getHandlerTypeForLogging(): LauncherAtom.TaskSwitcherContainer.OrientationHandler = + LauncherAtom.TaskSwitcherContainer.OrientationHandler.SEASCAPE } diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java index 8d1907ff7d..f6bae9b18c 100644 --- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java @@ -143,7 +143,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher @Override public void onStateTransitionStart(LauncherState toState) { - setOverviewStateEnabled(toState.overviewUi); + setOverviewStateEnabled(toState.isRecentsViewVisible); setOverviewGridEnabled(toState.displayOverviewTasksAsGrid(mContainer.getDeviceProfile())); setOverviewFullscreenEnabled(toState.getOverviewFullscreenProgress() == 1); @@ -154,7 +154,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher } // Set border after select mode changes to avoid showing border during state transition - if (!toState.overviewUi || toState == OVERVIEW_MODAL_TASK) { + if (!toState.isRecentsViewVisible || toState == OVERVIEW_MODAL_TASK) { setTaskBorderEnabled(false); } @@ -178,7 +178,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher setOverviewSelectEnabled(false); } - if (finalState.overviewUi && finalState != OVERVIEW_MODAL_TASK) { + if (finalState.isRecentsViewVisible && finalState != OVERVIEW_MODAL_TASK) { setTaskBorderEnabled(true); } @@ -203,7 +203,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher public boolean onTouchEvent(MotionEvent ev) { boolean result = super.onTouchEvent(ev); // Do not let touch escape to siblings below this view. - return result || getStateManager().getState().overviewUi; + return result || getStateManager().getState().isRecentsViewVisible; } @Override diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 731b839dd6..4a133afcd8 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -45,6 +45,7 @@ import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.Utilities.squaredHypot; import static com.android.launcher3.Utilities.squaredTouchSlop; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_ACTIONS_SPLIT; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_ORIENTATION_CHANGED; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_CLEAR_ALL; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_DISMISS_SWIPE_UP; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_SWIPE_DOWN; @@ -145,6 +146,7 @@ import com.android.launcher3.anim.SpringProperty; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.desktop.DesktopRecentsTransitionController; +import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.statehandlers.DepthController; @@ -2085,12 +2087,17 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo : View.LAYOUT_DIRECTION_RTL); mClearAllButton.setRotation(getPagedOrientationHandler().getDegreesRotated()); - if (forceRecreateDragLayerControllers - || !getPagedOrientationHandler().equals(oldOrientationHandler)) { + boolean isOrientationHandlerChanged = + !getPagedOrientationHandler().equals(oldOrientationHandler); + if (forceRecreateDragLayerControllers || isOrientationHandlerChanged) { // Changed orientations, update controllers so they intercept accordingly. mContainer.getDragLayer().recreateControllers(); onOrientationChanged(); resetTaskVisuals(); + // Log fake orientation changed. + if (isOrientationHandlerChanged) { + logOrientationChanged(); + } } boolean isInLandscape = mOrientationState.getTouchRotation() != ROTATION_0 @@ -4355,7 +4362,10 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo public void updateRecentsRotation() { final int rotation = TraceHelper.allowIpcs( "RecentsView.updateRecentsRotation", () -> mContainer.getDisplay().getRotation()); - mOrientationState.setRecentsRotation(rotation); + // Log real orientation change. + if (mOrientationState.setRecentsRotation(rotation)) { + logOrientationChanged(); + } } public void setLayoutRotation(int touchRotation, int displayRotation) { @@ -6301,6 +6311,24 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo successCallback.run(); } + // Logs when the orientation of Overview changes. We log both real and fake orientation changes. + private void logOrientationChanged() { + // Only log when Overview is showing. + if (mOverviewStateEnabled) { + mContainer.getStatsLogManager() + .logger() + .withContainerInfo( + LauncherAtom.ContainerInfo.newBuilder() + .setTaskSwitcherContainer( + LauncherAtom.TaskSwitcherContainer.newBuilder() + .setOrientationHandler( + getPagedOrientationHandler() + .getHandlerTypeForLogging())) + .build()) + .log(LAUNCHER_OVERVIEW_ORIENTATION_CHANGED); + } + } + public interface TaskLaunchListener { void onTaskLaunched(); } diff --git a/src/com/android/quickstep/views/RecentsViewContainer.java b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java index 0c3f4f1ee5..060c71e446 100644 --- a/src/com/android/quickstep/views/RecentsViewContainer.java +++ b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java @@ -27,6 +27,7 @@ import android.view.View; import android.view.Window; import com.android.launcher3.BaseActivity; +import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.util.SystemUiController; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.ScrimView; @@ -165,4 +166,36 @@ public interface RecentsViewContainer extends ActivityContext { * Begins transition from overview back to homescreen */ void returnToHomescreen(); + + /** + * True if the overview panel is visible. + * @return Boolean + */ + boolean isRecentsViewVisible(); + + /** + * Overwrites any logged item in Launcher that doesn't have a container with the + * {@link com.android.launcher3.touch.PagedOrientationHandler} in use for Overview. + * + * @param itemInfoBuilder {@link LauncherAtom.ItemInfo.Builder} + */ + default void applyOverwritesToLogItem(LauncherAtom.ItemInfo.Builder itemInfoBuilder) { + if (!itemInfoBuilder.getContainerInfo().hasTaskSwitcherContainer()) { + return; + } + + if (!isRecentsViewVisible()) { + return; + } + + RecentsView<?, ?> recentsView = getOverviewPanel(); + var orientationForLogging = + recentsView.getPagedOrientationHandler().getHandlerTypeForLogging(); + itemInfoBuilder.setContainerInfo( + LauncherAtom.ContainerInfo.newBuilder() + .setTaskSwitcherContainer( + LauncherAtom.TaskSwitcherContainer.newBuilder() + .setOrientationHandler(orientationForLogging)) + .build()); + } } diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java index 3bdd8635cf..72a3c53c7b 100644 --- a/src/com/android/launcher3/LauncherState.java +++ b/src/com/android/launcher3/LauncherState.java @@ -83,7 +83,7 @@ public abstract class LauncherState implements BaseState<LauncherState> { public static final int FLAG_HAS_SYS_UI_SCRIM = BaseState.getFlag(4); // Flag to inticate that all popups should be closed when this state is enabled. public static final int FLAG_CLOSE_POPUPS = BaseState.getFlag(5); - public static final int FLAG_OVERVIEW_UI = BaseState.getFlag(6); + public static final int FLAG_RECENTS_VIEW_VISIBLE = BaseState.getFlag(6); // Flag indicating that hotseat and its contents are not accessible. public static final int FLAG_HOTSEAT_INACCESSIBLE = BaseState.getFlag(7); @@ -158,14 +158,14 @@ public abstract class LauncherState implements BaseState<LauncherState> { /** * True if the state has overview panel visible. */ - public final boolean overviewUi; + public final boolean isRecentsViewVisible; private final int mFlags; public LauncherState(int id, int statsLogOrdinal, int flags) { this.statsLogOrdinal = statsLogOrdinal; this.mFlags = flags; - this.overviewUi = (flags & FLAG_OVERVIEW_UI) != 0; + this.isRecentsViewVisible = (flags & FLAG_RECENTS_VIEW_VISIBLE) != 0; this.ordinal = id; sAllStates[id] = this; } diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java index 25eeacb189..861631dbed 100644 --- a/src/com/android/launcher3/logging/StatsLogManager.java +++ b/src/com/android/launcher3/logging/StatsLogManager.java @@ -781,7 +781,19 @@ public class StatsLogManager implements ResourceBasedOverride { LAUNCHER_PRIVATE_SPACE_UNLOCK_ANIMATION_BEGIN(1727), @UiEvent(doc = "Private space unlock animation finished") - LAUNCHER_PRIVATE_SPACE_UNLOCK_ANIMATION_END(1728) + LAUNCHER_PRIVATE_SPACE_UNLOCK_ANIMATION_END(1728), + + @UiEvent(doc = "User rotates whilst in Overview / RecentsView") + LAUNCHER_OVERVIEW_ORIENTATION_CHANGED(1762), + + @UiEvent(doc = "User launches Overview from 3 button navigation") + LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_3_BUTTON(1763), + + @UiEvent(doc = "User launches Overview from alt+tab keyboard quick switch") + LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_KEYBOARD_QUICK_SWITCH(1764), + + @UiEvent(doc = "User launches Overview from meta+tab keyboard shortcut") + LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_KEYBOARD_SHORTCUT(1765), // ADD MORE ; diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java index 50f98f297b..3817563b0b 100644 --- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java @@ -411,17 +411,29 @@ public abstract class AbstractStateChangeTouchController mLauncher.getStatsLogManager().logger() .withSrcState(mStartState.statsLogOrdinal) .withDstState(targetState.statsLogOrdinal) - .withContainerInfo(LauncherAtom.ContainerInfo.newBuilder() - .setWorkspace( - LauncherAtom.WorkspaceContainer.newBuilder() - .setPageIndex(mLauncher.getWorkspace().getCurrentPage())) - .build()) + .withContainerInfo(getContainerInfo(targetState)) .log(StatsLogManager.getLauncherAtomEvent(mStartState.statsLogOrdinal, targetState.statsLogOrdinal, mToState.ordinal > mFromState.ordinal ? LAUNCHER_UNKNOWN_SWIPEUP : LAUNCHER_UNKNOWN_SWIPEDOWN)); } + private LauncherAtom.ContainerInfo getContainerInfo(LauncherState targetState) { + if (targetState.isRecentsViewVisible) { + return LauncherAtom.ContainerInfo.newBuilder() + .setTaskSwitcherContainer( + LauncherAtom.TaskSwitcherContainer.getDefaultInstance() + ) + .build(); + } + + return LauncherAtom.ContainerInfo.newBuilder() + .setWorkspace( + LauncherAtom.WorkspaceContainer.newBuilder() + .setPageIndex(mLauncher.getWorkspace().getCurrentPage())) + .build(); + } + protected void clearState() { cancelAnimationControllers(); mGoingBetweenStates = true; |