summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mady Mellor <madym@google.com> 2017-04-18 12:48:04 -0700
committer Mady Mellor <madym@google.com> 2017-04-18 12:48:04 -0700
commit5d58d25781a98d738e2d3513c63641307ae5ab0b (patch)
tree49ca67d9179d8e1feb1d5ea43f7224f6732fdc60
parentab312729cef8e0272ffa11f5eb13c5f2468f2135 (diff)
Adjust some of the timings around animating / showing the dismiss gradient
Dan wanted longer + linear fade in of the dismiss gradient. Also wanted fade out to match the timing of 'snap to edge'. Test: Manual -- move PIP around, observe how gradient fades in / out Bug: 35358628 Change-Id: I847d96e70184c0093e64a7e2e895a9c5f30fea8b
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java2
2 files changed, 6 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java
index 86bb0deff067..4b3cdfbcd71c 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java
@@ -39,7 +39,8 @@ public class PipDismissViewController {
// 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
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 WindowManager mWindowManager;
@@ -96,7 +97,7 @@ public class PipDismissViewController {
public void showDismissTarget() {
mDismissView.animate()
.alpha(1f)
- .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
+ .setInterpolator(Interpolators.LINEAR)
.setStartDelay(SHOW_TARGET_DELAY)
.setDuration(SHOW_TARGET_DURATION)
.start();
@@ -109,9 +110,9 @@ public class PipDismissViewController {
if (mDismissView != null) {
mDismissView.animate()
.alpha(0f)
- .setInterpolator(Interpolators.FAST_OUT_LINEAR_IN)
+ .setInterpolator(Interpolators.LINEAR)
.setStartDelay(0)
- .setDuration(SHOW_TARGET_DURATION)
+ .setDuration(HIDE_TARGET_DURATION)
.withEndAction(new Runnable() {
@Override
public void run() {
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
index 3f26fddb1b3c..161e0575d6bb 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
@@ -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_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
private static final boolean ENABLE_DISMISS_DRAG_TO_EDGE = true;