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);
}
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);
}
}
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);
}
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();
});
}
Aggregations