Search in sources :

Example 11 with TaskView

use of com.android.quickstep.views.TaskView in project android_packages_apps_Launcher3 by crdroidandroid.

the class PortraitOverviewStateTouchHelper method createSwipeDownToTaskAppAnimation.

/**
 * Create the animation for going from overview to the task app via swiping. Should only be
 * called when {@link #shouldSwipeDownReturnToApp()} returns true.
 *
 * @param duration how long the animation should be
 * @return the animation
 */
PendingAnimation createSwipeDownToTaskAppAnimation(long duration, Interpolator interpolator) {
    mRecentsView.setCurrentPage(mRecentsView.getDestinationPage());
    TaskView taskView = mRecentsView.getCurrentPageTaskView();
    if (taskView == null) {
        throw new IllegalStateException("There is no task view to animate to.");
    }
    return mRecentsView.createTaskLaunchAnimation(taskView, duration, interpolator);
}
Also used : TaskView(com.android.quickstep.views.TaskView)

Example 12 with TaskView

use of com.android.quickstep.views.TaskView in project android_packages_apps_Launcher3 by crdroidandroid.

the class QuickSwitchTouchController method updateFullscreenProgress.

private void updateFullscreenProgress(float progress) {
    mOverviewPanel.setFullscreenProgress(progress);
    if (progress > UPDATE_SYSUI_FLAGS_THRESHOLD) {
        int sysuiFlags = 0;
        TaskView tv = mOverviewPanel.getTaskViewAt(0);
        if (tv != null) {
            sysuiFlags = tv.getThumbnail().getSysUiStatusNavFlags();
        }
        mLauncher.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, sysuiFlags);
    } else {
        mLauncher.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
    }
}
Also used : TaskView(com.android.quickstep.views.TaskView)

Example 13 with TaskView

use of com.android.quickstep.views.TaskView in project android_packages_apps_Launcher3 by crdroidandroid.

the class OverviewCommandHelper method onTransitionComplete.

private void onTransitionComplete(CommandInfo cmd, AbsSwipeUpHandler handler) {
    cmd.removeListener(handler);
    Trace.endAsyncSection(TRANSITION_NAME, 0);
    if (cmd.type == TYPE_SHOW_NEXT_FOCUS) {
        RecentsView rv = mOverviewComponentObserver.getActivityInterface().getVisibleRecentsView();
        if (rv != null) {
            // Ensure that recents view has focus so that it receives the followup key inputs
            TaskView taskView = rv.getNextTaskView();
            if (taskView == null) {
                if (rv.getTaskViewCount() > 0) {
                    taskView = rv.getTaskViewAt(0);
                    taskView.requestFocus();
                } else {
                    rv.requestFocus();
                }
            } else {
                taskView.requestFocus();
            }
        }
    }
    scheduleNextTask(cmd);
}
Also used : TaskView(com.android.quickstep.views.TaskView) RecentsView(com.android.quickstep.views.RecentsView)

Example 14 with TaskView

use of com.android.quickstep.views.TaskView in project android_packages_apps_Launcher3 by crdroidandroid.

the class DigitalWellBeingToastTest method getToast.

private DigitalWellBeingToast getToast() {
    executeOnLauncher(launcher -> launcher.getStateManager().goToState(OVERVIEW));
    waitForState("Launcher internal state didn't switch to Overview", () -> OVERVIEW);
    final TaskView task = getOnceNotNull("No latest task", launcher -> getLatestTask(launcher));
    return getFromLauncher(launcher -> {
        assertTrue("Latest task is not Calculator", CALCULATOR_PACKAGE.equals(task.getTask().getTopComponent().getPackageName()));
        return task.getDigitalWellBeingToast();
    });
}
Also used : TaskView(com.android.quickstep.views.TaskView)

Aggregations

TaskView (com.android.quickstep.views.TaskView)14 AnimatorPlaybackController (com.android.launcher3.anim.AnimatorPlaybackController)2 PendingAnimation (com.android.launcher3.anim.PendingAnimation)2 RecentsView (com.android.quickstep.views.RecentsView)2 RemoteAnimationTargetCompat (com.android.systemui.shared.system.RemoteAnimationTargetCompat)2 Animator (android.animation.Animator)1 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)1 AnimatorSet (android.animation.AnimatorSet)1 ObjectAnimator (android.animation.ObjectAnimator)1 ComponentName (android.content.ComponentName)1 Context (android.content.Context)1 Intent (android.content.Intent)1 PointF (android.graphics.PointF)1 UiThread (androidx.annotation.UiThread)1 DeviceProfile (com.android.launcher3.DeviceProfile)1 LauncherAnimationRunner (com.android.launcher3.LauncherAnimationRunner)1 AnimationResult (com.android.launcher3.LauncherAnimationRunner.AnimationResult)1 RemoteAnimationFactory (com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory)1 ItemInfo (com.android.launcher3.model.data.ItemInfo)1 ActivityOptionsWrapper (com.android.launcher3.util.ActivityOptionsWrapper)1