Fix task icon not showing if you press home
Instead of setting the icon scale to 0 in showTask(), which is
called whenever we get a new intent, only set it to 0 when
starting the swipe up gesture.
Change-Id: I657a1c5763c60b65e28f453ffe854ae8dab83bbc
diff --git a/quickstep/src/com/android/quickstep/RecentsView.java b/quickstep/src/com/android/quickstep/RecentsView.java
index a9d5e63..cb510c8 100644
--- a/quickstep/src/com/android/quickstep/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/RecentsView.java
@@ -478,9 +478,7 @@
mRunningTaskId = runningTaskId;
setCurrentPage(mFirstTaskIndex);
if (mCurrentPage >= mFirstTaskIndex) {
- TaskView currentTask = (TaskView) getPageAt(mCurrentPage);
- currentTask.setIconScale(0);
- currentTask.setAlpha(0);
+ getPageAt(mCurrentPage).setAlpha(0);
}
}
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 6b1c5e1..ddddbf6 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -569,6 +569,14 @@
*/
private void notifyGestureStarted() {
mLauncher.onQuickstepGestureStarted(mWasLauncherAlreadyVisible);
+
+ mMainExecutor.execute(() -> {
+ // Prepare to animate the first icon.
+ View currentRecentsPage = mRecentsView.getPageAt(mRecentsView.getCurrentPage());
+ if (currentRecentsPage instanceof TaskView) {
+ ((TaskView) currentRecentsPage).setIconScale(0f);
+ }
+ });
}
@WorkerThread
@@ -673,7 +681,7 @@
// Re apply state in case we did something funky during the transition.
mLauncher.getStateManager().reapplyState();
- // Animate ui the first icon.
+ // Animate the first icon.
View currentRecentsPage = mRecentsView.getPageAt(mRecentsView.getCurrentPage());
if (currentRecentsPage instanceof TaskView) {
((TaskView) currentRecentsPage).animateIconToScale(1f);