Merge "Change dream IN animation duration to 250ms." into tm-qpr-dev am: d5b85d4ef2 am: 5bbd434cd0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20246465

Change-Id: I4aa1f9b9f1b5be298fdd4622693a3c2b05608de1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Darrell Shi
2022-10-21 17:56:59 +00:00
committed by Automerger Merge Worker
6 changed files with 19 additions and 5 deletions

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -2447,6 +2447,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>

View File

@@ -2236,6 +2236,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" />

View File

@@ -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.
@@ -947,8 +952,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 -> {
@@ -1180,6 +1184,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() {