diff options
author | Tony Wickham <twickham@google.com> | 2019-09-17 15:02:52 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2019-09-17 15:10:33 -0700 |
commit | 0638249b3eeb714b74645c63e42db302d1b6af4c (patch) | |
tree | b4a31a5a8e37ff4a04a40b6f6adbaf6f80b72847 | |
parent | b1ccbd9def7c1baa92ffb8a5d16ec623bb6acd5d (diff) | |
download | android_packages_apps_Trebuchet-0638249b3eeb714b74645c63e42db302d1b6af4c.tar.gz android_packages_apps_Trebuchet-0638249b3eeb714b74645c63e42db302d1b6af4c.tar.bz2 android_packages_apps_Trebuchet-0638249b3eeb714b74645c63e42db302d1b6af4c.zip |
Allow scroll to clear all in 3 button+fallback mode
We weren't calling onSwipeUpToRecentsComplete(), which meant we kept the
disallowScrollToClearAll from prepareRecentsUi indefinitely.
Also don't update the icon scale if it is supposed to be scaled down, to
avoid it from scaling up and overlapping with the app window.
Fixes: 141184247
Change-Id: I49406764373e7121e289da7477dcbb58d0b98fd5
3 files changed, 10 insertions, 4 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java index 5ebefa337..ad90e1686 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java @@ -102,6 +102,7 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple anim.addListener(new AnimationSuccessListener() { @Override public void onAnimationSuccess(Animator animator) { + mHelper.onSwipeUpToRecentsComplete(mActivity); if (mRecentsView != null) { mRecentsView.animateUpRunningTaskIconScale(); } diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 1bf77f53c..d6117c1a7 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -941,6 +941,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl } } + public boolean isTaskIconScaledDown(TaskView taskView) { + return mRunningTaskIconScaledDown && getRunningTaskView() == taskView; + } + private void applyRunningTaskIconScale() { TaskView firstTask = getRunningTaskView(); if (firstTask != null) { diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java index 2211eb4dd..bfb961320 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java @@ -28,7 +28,6 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; -import android.animation.ValueAnimator.AnimatorUpdateListener; import android.app.ActivityOptions; import android.content.Context; import android.content.res.Resources; @@ -54,7 +53,6 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.logging.UserEventDispatcher; -import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; @@ -818,8 +816,11 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { / (getWidth() + currentInsetsLeft + currentInsetsRight)); } - // Some of the items in here are dependent on the current fullscreen params - setIconScaleAndDim(progress, true /* invert */); + if (!getRecentsView().isTaskIconScaledDown(this)) { + // Some of the items in here are dependent on the current fullscreen params, but don't + // update them if the icon is supposed to be scaled down. + setIconScaleAndDim(progress, true /* invert */); + } thumbnail.setFullscreenParams(mCurrentFullscreenParams); mOutlineProvider.setFullscreenParams(mCurrentFullscreenParams); |