Merge "Change dream IN animation duration to 250ms." into tm-qpr-dev
This commit is contained in:
@@ -19,5 +19,5 @@
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
android:duration="100" />
|
||||
android:duration="@integer/config_dreamCloseAnimationDuration" />
|
||||
|
||||
|
||||
@@ -22,5 +22,5 @@ those two has to be the same. -->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="1000" />
|
||||
android:duration="@integer/config_dreamOpenAnimationDuration" />
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ dream_activity_open_enter animation. -->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="1000" />
|
||||
android:duration="@integer/config_dreamOpenAnimationDuration" />
|
||||
|
||||
@@ -2482,6 +2482,11 @@
|
||||
<!-- Whether dreams are disabled when ambient mode is suppressed. -->
|
||||
<bool name="config_dreamsDisabledByAmbientModeSuppressionConfig">false</bool>
|
||||
|
||||
<!-- The duration in milliseconds of the dream opening animation. -->
|
||||
<integer name="config_dreamOpenAnimationDuration">250</integer>
|
||||
<!-- The duration in milliseconds of the dream closing animation. -->
|
||||
<integer name="config_dreamCloseAnimationDuration">100</integer>
|
||||
|
||||
<!-- Whether to dismiss the active dream when an activity is started. Doesn't apply to
|
||||
assistant activities (ACTIVITY_TYPE_ASSISTANT) -->
|
||||
<bool name="config_dismissDreamOnActivityStart">false</bool>
|
||||
|
||||
@@ -2237,6 +2237,8 @@
|
||||
<java-symbol type="string" name="config_dreamsDefaultComponent" />
|
||||
<java-symbol type="bool" name="config_dreamsDisabledByAmbientModeSuppressionConfig" />
|
||||
<java-symbol type="bool" name="config_dreamsOnlyEnabledForSystemUser" />
|
||||
<java-symbol type="integer" name="config_dreamOpenAnimationDuration" />
|
||||
<java-symbol type="integer" name="config_dreamCloseAnimationDuration" />
|
||||
<java-symbol type="array" name="config_supportedDreamComplications" />
|
||||
<java-symbol type="array" name="config_disabledDreamComponents" />
|
||||
<java-symbol type="bool" name="config_dismissDreamOnActivityStart" />
|
||||
|
||||
@@ -400,6 +400,11 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
|
||||
private final float mPowerButtonY;
|
||||
private final float mWindowCornerRadius;
|
||||
|
||||
/**
|
||||
* The duration in milliseconds of the dream open animation.
|
||||
*/
|
||||
private final int mDreamOpenAnimationDuration;
|
||||
|
||||
/**
|
||||
* The animation used for hiding keyguard. This is used to fetch the animation timings if
|
||||
* WindowManager is not providing us with them.
|
||||
@@ -946,8 +951,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
|
||||
}
|
||||
|
||||
mOccludeByDreamAnimator = ValueAnimator.ofFloat(0f, 1f);
|
||||
// Use the same duration as for the UNOCCLUDE.
|
||||
mOccludeByDreamAnimator.setDuration(UNOCCLUDE_ANIMATION_DURATION);
|
||||
mOccludeByDreamAnimator.setDuration(mDreamOpenAnimationDuration);
|
||||
mOccludeByDreamAnimator.setInterpolator(Interpolators.LINEAR);
|
||||
mOccludeByDreamAnimator.addUpdateListener(
|
||||
animation -> {
|
||||
@@ -1179,6 +1183,9 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
|
||||
mPowerButtonY = context.getResources().getDimensionPixelSize(
|
||||
R.dimen.physical_power_button_center_screen_location_y);
|
||||
mWindowCornerRadius = ScreenDecorationsUtils.getWindowCornerRadius(context);
|
||||
|
||||
mDreamOpenAnimationDuration = context.getResources().getInteger(
|
||||
com.android.internal.R.integer.config_dreamOpenAnimationDuration);
|
||||
}
|
||||
|
||||
public void userActivity() {
|
||||
|
||||
Reference in New Issue
Block a user