Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1063c532 authored by Mady Mellor's avatar Mady Mellor Committed by android-build-merger
Browse files

Merge "Adjust some of the timings around animating / showing the dismiss gradient" into oc-dev

am: 1e28c8fa

Change-Id: I0a30560842b0bd4f083c8fe9c04fb9696a658418
parents 119fe0ec 1e28c8fa
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -39,7 +39,8 @@ public class PipDismissViewController {
    // This delay controls how long to wait before we show the target when the user first moves
    // This delay controls how long to wait before we show the target when the user first moves
    // the PIP, to prevent the target from animating if the user just wants to fling the PIP
    // the PIP, to prevent the target from animating if the user just wants to fling the PIP
    private static final int SHOW_TARGET_DELAY = 100;
    private static final int SHOW_TARGET_DELAY = 100;
    private static final int SHOW_TARGET_DURATION = 200;
    private static final int SHOW_TARGET_DURATION = 350;
    private static final int HIDE_TARGET_DURATION = 225;


    private Context mContext;
    private Context mContext;
    private WindowManager mWindowManager;
    private WindowManager mWindowManager;
@@ -96,7 +97,7 @@ public class PipDismissViewController {
    public void showDismissTarget() {
    public void showDismissTarget() {
        mDismissView.animate()
        mDismissView.animate()
                .alpha(1f)
                .alpha(1f)
                .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
                .setInterpolator(Interpolators.LINEAR)
                .setStartDelay(SHOW_TARGET_DELAY)
                .setStartDelay(SHOW_TARGET_DELAY)
                .setDuration(SHOW_TARGET_DURATION)
                .setDuration(SHOW_TARGET_DURATION)
                .start();
                .start();
@@ -109,9 +110,9 @@ public class PipDismissViewController {
        if (mDismissView != null) {
        if (mDismissView != null) {
            mDismissView.animate()
            mDismissView.animate()
                    .alpha(0f)
                    .alpha(0f)
                    .setInterpolator(Interpolators.FAST_OUT_LINEAR_IN)
                    .setInterpolator(Interpolators.LINEAR)
                    .setStartDelay(0)
                    .setStartDelay(0)
                    .setDuration(SHOW_TARGET_DURATION)
                    .setDuration(HIDE_TARGET_DURATION)
                    .withEndAction(new Runnable() {
                    .withEndAction(new Runnable() {
                        @Override
                        @Override
                        public void run() {
                        public void run() {
+1 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ public class PipTouchHandler implements TunerService.Tunable {
    private static final int METRIC_VALUE_DISMISSED_BY_TAP = 0;
    private static final int METRIC_VALUE_DISMISSED_BY_TAP = 0;
    private static final int METRIC_VALUE_DISMISSED_BY_DRAG = 1;
    private static final int METRIC_VALUE_DISMISSED_BY_DRAG = 1;


    private static final int SHOW_DISMISS_AFFORDANCE_DELAY = 200;
    private static final int SHOW_DISMISS_AFFORDANCE_DELAY = 225;


    // Allow dragging the PIP to a location to close it
    // Allow dragging the PIP to a location to close it
    private static final boolean ENABLE_DISMISS_DRAG_TO_EDGE = true;
    private static final boolean ENABLE_DISMISS_DRAG_TO_EDGE = true;