summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin <kevhan@google.com>2019-03-19 10:25:27 -0700
committerKevin <kevhan@google.com>2019-03-20 14:47:32 -0700
commit72114efef69f5449b784cd45c7e3b66f8f53290b (patch)
tree5ca3ee293ac281cfce33880a645e37ede532b02e
parent0825e414f05c525e46a58c32d534989b20da6a41 (diff)
downloadpackages_apps_Trebuchet-72114efef69f5449b784cd45c7e3b66f8f53290b.tar.gz
packages_apps_Trebuchet-72114efef69f5449b784cd45c7e3b66f8f53290b.tar.bz2
packages_apps_Trebuchet-72114efef69f5449b784cd45c7e3b66f8f53290b.zip
Add recents launch animation to Recents Go
We use the basic clip reveal animation to animate from the task thumbnail view to the opening app. Bug: 114136250 Test: Tap task from recents Change-Id: Id582385fc022c75ee322beebdc6cf7a0f209e720
-rw-r--r--go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java3
-rw-r--r--go/quickstep/src/com/android/quickstep/RecentsActivity.java2
-rw-r--r--go/quickstep/src/com/android/quickstep/TaskInputController.java15
3 files changed, 16 insertions, 4 deletions
diff --git a/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java b/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java
index 96b4ae569..d189c504c 100644
--- a/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java
+++ b/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java
@@ -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
diff --git a/go/quickstep/src/com/android/quickstep/RecentsActivity.java b/go/quickstep/src/com/android/quickstep/RecentsActivity.java
index c814a71f0..447e7e723 100644
--- a/go/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/go/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -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;
}
diff --git a/go/quickstep/src/com/android/quickstep/TaskInputController.java b/go/quickstep/src/com/android/quickstep/TaskInputController.java
index d97ac8da9..843300741 100644
--- a/go/quickstep/src/com/android/quickstep/TaskInputController.java
+++ b/go/quickstep/src/com/android/quickstep/TaskInputController.java
@@ -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) {