Merge "Add recents launch animation to Recents Go" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2019-03-20 21:57:49 +00:00 committed by Android (Google) Code Review
commit d6585350d0
3 changed files with 16 additions and 4 deletions

View File

@ -31,7 +31,8 @@ public final class GoLauncherAppTransitionManagerImpl extends QuickstepAppTransi
@Override
protected void composeRecentsLaunchAnimator(AnimatorSet anim, View v,
RemoteAnimationTargetCompat[] targets, boolean launcherClosing) {
//TODO: Implement this based off IconRecentsView
// Stubbed. Recents launch animation will come from the recents view itself and will not
// use remote animations.
}
@Override

View File

@ -61,7 +61,7 @@ public final class RecentsActivity extends BaseRecentsActivity {
@Override
public ActivityOptions getActivityLaunchOptions(View v) {
//TODO: Hook into recents launch animation
// Stubbed. Recents launch animation will come from the recents view itself.
return null;
}

View File

@ -15,6 +15,10 @@
*/
package com.android.quickstep;
import android.app.ActivityOptions;
import android.view.View;
import com.android.quickstep.views.TaskItemView;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@ -37,9 +41,16 @@ public final class TaskInputController {
* @param viewHolder the task view holder that has been tapped
*/
public void onTaskClicked(TaskHolder viewHolder) {
// TODO: Add app launch animation as part of the launch options here.
TaskItemView itemView = (TaskItemView) (viewHolder.itemView);
View v = itemView.getThumbnailView();
int left = 0;
int top = 0;
int width = v.getMeasuredWidth();
int height = v.getMeasuredHeight();
ActivityOptions opts = ActivityOptions.makeClipRevealAnimation(v, left, top, width, height);
ActivityManagerWrapper.getInstance().startActivityFromRecentsAsync(viewHolder.getTask().key,
null /* options */, null /* resultCallback */, null /* resultCallbackHandler */);
opts, null /* resultCallback */, null /* resultCallbackHandler */);
}
public void onTaskSwiped(TaskHolder viewHolder) {