Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +12 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.animation.ObjectAnimator; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.os.UserHandle; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.Surface; Loading @@ -42,6 +43,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.appprediction.PredictionUiStateManager; import com.android.launcher3.appprediction.PredictionUiStateManager.Client; import com.android.launcher3.model.AppLaunchTracker; import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.statemanager.StateManager.StateListener; import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper; Loading @@ -52,6 +54,7 @@ import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.util.TransformParams; import com.android.systemui.plugins.PluginListener; import com.android.systemui.plugins.RecentsExtraCard; import com.android.systemui.shared.recents.model.Task; /** * {@link RecentsView} used in Launcher activity Loading Loading @@ -167,14 +170,21 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher> } @Override protected void onTaskLaunched(boolean success) { protected void onTaskLaunchAnimationEnd(boolean success) { if (success) { mActivity.getStateManager().goToState(NORMAL, false /* animate */); } else { LauncherState state = mActivity.getStateManager().getState(); mActivity.getAllAppsController().setState(state); } super.onTaskLaunched(success); super.onTaskLaunchAnimationEnd(success); } @Override public void onTaskLaunched(Task task) { UserHandle user = UserHandle.of(task.key.userId); AppLaunchTracker.INSTANCE.get(getContext()).onStartApp(task.getTopComponent(), user, AppLaunchTracker.CONTAINER_OVERVIEW); } @Override Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +8 −3 Original line number Diff line number Diff line Loading @@ -1952,7 +1952,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView mPendingAnimation.addEndListener((endState) -> { if (endState.isSuccess) { Consumer<Boolean> onLaunchResult = (result) -> { onTaskLaunched(result); onTaskLaunchAnimationEnd(result); if (!result) { tv.notifyTaskLaunchFailed(TAG); } Loading @@ -1967,7 +1967,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView .log(LAUNCHER_TASK_LAUNCH_SWIPE_DOWN); } } else { onTaskLaunched(false); onTaskLaunchAnimationEnd(false); } mPendingAnimation = null; }); Loading @@ -1979,12 +1979,17 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView public abstract boolean shouldUseMultiWindowTaskSizeStrategy(); protected void onTaskLaunched(boolean success) { protected void onTaskLaunchAnimationEnd(boolean success) { if (success) { resetTaskVisuals(); } } /** * Called when task activity is launched */ public void onTaskLaunched(Task task){ } @Override protected void notifyPageSwitchListener(int prevPage) { super.notifyPageSwitchListener(prevPage); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +3 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent .LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP; import android.animation.Animator; Loading Loading @@ -384,6 +385,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } }, resultCallbackHandler); } getRecentsView().onTaskLaunched(mTask); } } Loading src/com/android/launcher3/model/AppLaunchTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class AppLaunchTracker implements ResourceBasedOverride { public static final String CONTAINER_ALL_APPS = Integer.toString(ContainerType.ALLAPPS); public static final String CONTAINER_PREDICTIONS = Integer.toString(ContainerType.PREDICTION); public static final String CONTAINER_SEARCH = Integer.toString(ContainerType.SEARCHRESULT); public static final String CONTAINER_OVERVIEW = Integer.toString(ContainerType.OVERVIEW); public static final MainThreadInitializedObject<AppLaunchTracker> INSTANCE = Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +12 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.animation.ObjectAnimator; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.os.UserHandle; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.Surface; Loading @@ -42,6 +43,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.appprediction.PredictionUiStateManager; import com.android.launcher3.appprediction.PredictionUiStateManager.Client; import com.android.launcher3.model.AppLaunchTracker; import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.statemanager.StateManager.StateListener; import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper; Loading @@ -52,6 +54,7 @@ import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.util.TransformParams; import com.android.systemui.plugins.PluginListener; import com.android.systemui.plugins.RecentsExtraCard; import com.android.systemui.shared.recents.model.Task; /** * {@link RecentsView} used in Launcher activity Loading Loading @@ -167,14 +170,21 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher> } @Override protected void onTaskLaunched(boolean success) { protected void onTaskLaunchAnimationEnd(boolean success) { if (success) { mActivity.getStateManager().goToState(NORMAL, false /* animate */); } else { LauncherState state = mActivity.getStateManager().getState(); mActivity.getAllAppsController().setState(state); } super.onTaskLaunched(success); super.onTaskLaunchAnimationEnd(success); } @Override public void onTaskLaunched(Task task) { UserHandle user = UserHandle.of(task.key.userId); AppLaunchTracker.INSTANCE.get(getContext()).onStartApp(task.getTopComponent(), user, AppLaunchTracker.CONTAINER_OVERVIEW); } @Override Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +8 −3 Original line number Diff line number Diff line Loading @@ -1952,7 +1952,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView mPendingAnimation.addEndListener((endState) -> { if (endState.isSuccess) { Consumer<Boolean> onLaunchResult = (result) -> { onTaskLaunched(result); onTaskLaunchAnimationEnd(result); if (!result) { tv.notifyTaskLaunchFailed(TAG); } Loading @@ -1967,7 +1967,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView .log(LAUNCHER_TASK_LAUNCH_SWIPE_DOWN); } } else { onTaskLaunched(false); onTaskLaunchAnimationEnd(false); } mPendingAnimation = null; }); Loading @@ -1979,12 +1979,17 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView public abstract boolean shouldUseMultiWindowTaskSizeStrategy(); protected void onTaskLaunched(boolean success) { protected void onTaskLaunchAnimationEnd(boolean success) { if (success) { resetTaskVisuals(); } } /** * Called when task activity is launched */ public void onTaskLaunched(Task task){ } @Override protected void notifyPageSwitchListener(int prevPage) { super.notifyPageSwitchListener(prevPage); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +3 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent .LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP; import android.animation.Animator; Loading Loading @@ -384,6 +385,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } }, resultCallbackHandler); } getRecentsView().onTaskLaunched(mTask); } } Loading
src/com/android/launcher3/model/AppLaunchTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class AppLaunchTracker implements ResourceBasedOverride { public static final String CONTAINER_ALL_APPS = Integer.toString(ContainerType.ALLAPPS); public static final String CONTAINER_PREDICTIONS = Integer.toString(ContainerType.PREDICTION); public static final String CONTAINER_SEARCH = Integer.toString(ContainerType.SEARCHRESULT); public static final String CONTAINER_OVERVIEW = Integer.toString(ContainerType.OVERVIEW); public static final MainThreadInitializedObject<AppLaunchTracker> INSTANCE = Loading