Merge "Update stepped clock animation to use real specs." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3d100cf87c
@@ -613,7 +613,7 @@ class AnimatableClockView @JvmOverloads constructor(
|
|||||||
private const val CHARGE_ANIM_DURATION_PHASE_1: Long = 1000
|
private const val CHARGE_ANIM_DURATION_PHASE_1: Long = 1000
|
||||||
|
|
||||||
// Constants for the animation
|
// Constants for the animation
|
||||||
private val MOVE_INTERPOLATOR = Interpolators.STANDARD
|
private val MOVE_INTERPOLATOR = Interpolators.EMPHASIZED
|
||||||
|
|
||||||
// Calculate the positions of all of the digits...
|
// Calculate the positions of all of the digits...
|
||||||
// Offset each digit by, say, 0.1
|
// Offset each digit by, say, 0.1
|
||||||
@@ -637,7 +637,10 @@ class AnimatableClockView @JvmOverloads constructor(
|
|||||||
// How much delay to apply to each subsequent digit. This is measured in terms of "fraction"
|
// How much delay to apply to each subsequent digit. This is measured in terms of "fraction"
|
||||||
// (i.e. a value of 0.1 would cause a digit to wait until fraction had hit 0.1, or 0.2 etc
|
// (i.e. a value of 0.1 would cause a digit to wait until fraction had hit 0.1, or 0.2 etc
|
||||||
// before moving).
|
// before moving).
|
||||||
private const val MOVE_DIGIT_STEP = 0.1f
|
//
|
||||||
|
// The current specs dictate that each digit should have a 33ms gap between them. The
|
||||||
|
// overall time is 1s right now.
|
||||||
|
private const val MOVE_DIGIT_STEP = 0.033f
|
||||||
|
|
||||||
// Total available transition time for each digit, taking into account the step. If step is
|
// Total available transition time for each digit, taking into account the step. If step is
|
||||||
// 0.1, then digit 0 would animate over 0.0 - 0.7, making availableTime 0.7.
|
// 0.1, then digit 0 would animate over 0.0 - 0.7, making availableTime 0.7.
|
||||||
|
|||||||
@@ -279,6 +279,11 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
private static final String COUNTER_PANEL_OPEN_PEEK = "panel_open_peek";
|
private static final String COUNTER_PANEL_OPEN_PEEK = "panel_open_peek";
|
||||||
private static final Rect M_DUMMY_DIRTY_RECT = new Rect(0, 0, 1, 1);
|
private static final Rect M_DUMMY_DIRTY_RECT = new Rect(0, 0, 1, 1);
|
||||||
private static final Rect EMPTY_RECT = new Rect();
|
private static final Rect EMPTY_RECT = new Rect();
|
||||||
|
/**
|
||||||
|
* Duration to use for the animator when the keyguard status view alignment changes, and a
|
||||||
|
* custom clock animation is in use.
|
||||||
|
*/
|
||||||
|
private static final int KEYGUARD_STATUS_VIEW_CUSTOM_CLOCK_MOVE_DURATION = 1000;
|
||||||
|
|
||||||
private final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
|
private final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
|
||||||
private final Resources mResources;
|
private final Resources mResources;
|
||||||
@@ -1592,7 +1597,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
|
|
||||||
// Use linear here, so the actual clock can pick its own interpolator.
|
// Use linear here, so the actual clock can pick its own interpolator.
|
||||||
adapter.setInterpolator(Interpolators.LINEAR);
|
adapter.setInterpolator(Interpolators.LINEAR);
|
||||||
adapter.setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);
|
adapter.setDuration(KEYGUARD_STATUS_VIEW_CUSTOM_CLOCK_MOVE_DURATION);
|
||||||
adapter.addTarget(clockView);
|
adapter.addTarget(clockView);
|
||||||
set.addTransition(adapter);
|
set.addTransition(adapter);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user