summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2018-05-14 16:00:15 -0700
committerVadim Tryshev <vadimt@google.com>2018-05-14 17:24:00 -0700
commiteb701c636095791d6a6171836c0837a2dad7f02b (patch)
tree031911a157b09e1494796c2e4c62641ec726f486 /quickstep
parent98f4fc00ac8f6ca8289c8823b07bcc400576ef09 (diff)
downloadandroid_packages_apps_Trebuchet-eb701c636095791d6a6171836c0837a2dad7f02b.tar.gz
android_packages_apps_Trebuchet-eb701c636095791d6a6171836c0837a2dad7f02b.tar.bz2
android_packages_apps_Trebuchet-eb701c636095791d6a6171836c0837a2dad7f02b.zip
Scrolling on the most recent task upon Overview start
Fixes this problem: 1. Open a single task in Recents 2. Dismiss via Clear-all 3. Start a task 4. Press Home 5. Press square button get Recents revealing Clear All button Bug: 79117932 Test: Manual Change-Id: I47bcc50cb72f1757025d2abac0196460e0bb3f36
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/views/RecentsView.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index a8e38a1ab..ad85d9ed4 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -21,8 +21,8 @@ import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
-import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
import android.animation.Animator;
import android.animation.AnimatorSet;
@@ -1038,14 +1038,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
}
updateClearAllButtonAlpha();
- if (!mShowEmptyMessage) return;
-
- // The icon needs to be centered. Need to scoll to horizontal 0 because with Clear-All
- // space on the right, it's not guaranteed that after deleting all tasks, the horizontal
- // scroll position will be zero.
- scrollTo(0, 0);
-
- if (hasValidSize && mEmptyTextLayout == null) {
+ if (mShowEmptyMessage && hasValidSize && mEmptyTextLayout == null) {
int availableWidth = mLastMeasureSize.x - mEmptyMessagePadding - mEmptyMessagePadding;
mEmptyTextLayout = StaticLayout.Builder.obtain(mEmptyMessage, 0, mEmptyMessage.length(),
mEmptyMessagePaint, availableWidth)
@@ -1072,7 +1065,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
mTempRect.set(mInsets.left + getPaddingLeft(), mInsets.top + getPaddingTop(),
mInsets.right + getPaddingRight(), mInsets.bottom + getPaddingBottom());
canvas.save();
- canvas.translate((mTempRect.left - mTempRect.right) / 2,
+ canvas.translate(getScrollX() + (mTempRect.left - mTempRect.right) / 2,
(mTempRect.top - mTempRect.bottom) / 2);
mEmptyIcon.draw(canvas);
canvas.translate(mEmptyMessagePadding,