Loading packages/SystemUI/res/values-sw600dp-land/dimens.xml +8 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,14 @@ the shade (in alpha) --> <dimen name="lockscreen_shade_scrim_transition_distance">80dp</dimen> <!-- The notifications scrim transition should start when the other scrims' transition is at 95%. --> <dimen name="lockscreen_shade_notifications_scrim_transition_delay">76dp</dimen> <!-- The notifications scrim transition duration is 66.6% of the duration of the other scrims' transition. --> <dimen name="lockscreen_shade_notifications_scrim_transition_distance">53.28dp</dimen> <!-- Distance that the full shade transition takes in order for the keyguard content on NotificationPanelViewController to fully fade (e.g. Clock & Smartspace) --> <dimen name="lockscreen_shade_npvc_keyguard_content_alpha_transition_distance">80dp</dimen> Loading packages/SystemUI/res/values/dimens.xml +6 −0 Original line number Diff line number Diff line Loading @@ -1141,6 +1141,12 @@ the shade (in alpha) --> <dimen name="lockscreen_shade_scrim_transition_distance">@dimen/lockscreen_shade_full_transition_distance</dimen> <!-- Distance that it takes in order for the notifications scrim fade in to start. --> <dimen name="lockscreen_shade_notifications_scrim_transition_delay">0dp</dimen> <!-- Distance that it takes for the notifications scrim to fully fade if after it started. --> <dimen name="lockscreen_shade_notifications_scrim_transition_distance">@dimen/lockscreen_shade_scrim_transition_distance</dimen> <!-- Distance that the full shade transition takes in order for the keyguard content on NotificationPanelViewController to fully fade (e.g. Clock & Smartspace) --> <dimen name="lockscreen_shade_npvc_keyguard_content_alpha_transition_distance">@dimen/lockscreen_shade_full_transition_distance</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +22 −2 Original line number Diff line number Diff line Loading @@ -115,6 +115,16 @@ class LockscreenShadeTransitionController @Inject constructor( */ private var scrimTransitionDistance = 0 /** * Distance that it takes in order for the notifications scrim fade in to start. */ private var notificationsScrimTransitionDelay = 0 /** * Distance that it takes for the notifications scrim to fully fade if after it started. */ private var notificationsScrimTransitionDistance = 0 /** * Distance that the full shade transition takes in order for the notification shelf to fully * expand. Loading Loading @@ -225,6 +235,10 @@ class LockscreenShadeTransitionController @Inject constructor( R.dimen.lockscreen_shade_transition_by_tap_distance) scrimTransitionDistance = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_scrim_transition_distance) notificationsScrimTransitionDelay = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_notifications_scrim_transition_delay) notificationsScrimTransitionDistance = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_notifications_scrim_transition_distance) notificationShelfTransitionDistance = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_notif_shelf_transition_distance) qsTransitionDistance = context.resources.getDimensionPixelSize( Loading Loading @@ -405,6 +419,7 @@ class LockscreenShadeTransitionController @Inject constructor( false /* animate */, 0 /* delay */) mediaHierarchyManager.setTransitionToFullShadeAmount(field) transitionToShadeAmountScrim(field) transitionToShadeAmountCommon(field) transitionToShadeAmountKeyguard(field) } Loading @@ -417,10 +432,15 @@ class LockscreenShadeTransitionController @Inject constructor( var qSDragProgress = 0f private set private fun transitionToShadeAmountCommon(dragDownAmount: Float) { private fun transitionToShadeAmountScrim(dragDownAmount: Float) { val scrimProgress = MathUtils.saturate(dragDownAmount / scrimTransitionDistance) scrimController.setTransitionToFullShadeProgress(scrimProgress) val notificationsScrimDragAmount = dragDownAmount - notificationsScrimTransitionDelay val notificationsScrimProgress = MathUtils.saturate( notificationsScrimDragAmount / notificationsScrimTransitionDistance) scrimController.setTransitionToFullShadeProgress(scrimProgress, notificationsScrimProgress) } private fun transitionToShadeAmountCommon(dragDownAmount: Float) { if (depthControllerTransitionDistance > 0) { val depthProgress = MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance) Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +21 −5 Original line number Diff line number Diff line Loading @@ -115,6 +115,15 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump */ private float mTransitionToFullShadeProgress; /** * Same as {@link #mTransitionToFullShadeProgress}, but specifically for the notifications scrim * on the lock screen. * * On split shade lock screen we want the different scrims to fade in at different times and * rates. */ private float mTransitionToLockScreenFullShadeNotificationsProgress; /** * If we're currently transitioning to the full shade. */ Loading Loading @@ -574,11 +583,17 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump * Set the amount of progress we are currently in if we're transitioning to the full shade. * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full * shade. * * @param progress the progress for all scrims. * @param lockScreenNotificationsProgress the progress specifically for the notifications scrim. */ public void setTransitionToFullShadeProgress(float progress) { if (progress != mTransitionToFullShadeProgress) { public void setTransitionToFullShadeProgress(float progress, float lockScreenNotificationsProgress) { if (progress != mTransitionToFullShadeProgress || lockScreenNotificationsProgress != mTransitionToLockScreenFullShadeNotificationsProgress) { mTransitionToFullShadeProgress = progress; setTransitionToFullShade(progress > 0.0f); mTransitionToLockScreenFullShadeNotificationsProgress = lockScreenNotificationsProgress; setTransitionToFullShade(progress > 0.0f || lockScreenNotificationsProgress > 0.0f); applyAndDispatchState(); } } Loading Loading @@ -754,12 +769,13 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } else { mNotificationsAlpha = Math.max(1.0f - getInterpolatedFraction(), mQsExpansion); } if (mState == ScrimState.KEYGUARD && mTransitionToFullShadeProgress > 0.0f) { if (mState == ScrimState.KEYGUARD && mTransitionToLockScreenFullShadeNotificationsProgress > 0.0f) { // Interpolate the notification alpha when transitioning! mNotificationsAlpha = MathUtils.lerp( mNotificationsAlpha, getInterpolatedFraction(), mTransitionToFullShadeProgress); mTransitionToLockScreenFullShadeNotificationsProgress); } mNotificationsTint = mState.getNotifTint(); mBehindTint = behindTint; Loading packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java +5 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,11 @@ public abstract class SysuiTestCase { } } /** Delegates to {@link android.testing.TestableResources#addOverride(int, Object)}. */ protected void overrideResource(int resourceId, Object value) { mContext.getOrCreateTestableResources().addOverride(resourceId, value); } public static final class EmptyRunnable implements Runnable { public void run() { } Loading Loading
packages/SystemUI/res/values-sw600dp-land/dimens.xml +8 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,14 @@ the shade (in alpha) --> <dimen name="lockscreen_shade_scrim_transition_distance">80dp</dimen> <!-- The notifications scrim transition should start when the other scrims' transition is at 95%. --> <dimen name="lockscreen_shade_notifications_scrim_transition_delay">76dp</dimen> <!-- The notifications scrim transition duration is 66.6% of the duration of the other scrims' transition. --> <dimen name="lockscreen_shade_notifications_scrim_transition_distance">53.28dp</dimen> <!-- Distance that the full shade transition takes in order for the keyguard content on NotificationPanelViewController to fully fade (e.g. Clock & Smartspace) --> <dimen name="lockscreen_shade_npvc_keyguard_content_alpha_transition_distance">80dp</dimen> Loading
packages/SystemUI/res/values/dimens.xml +6 −0 Original line number Diff line number Diff line Loading @@ -1141,6 +1141,12 @@ the shade (in alpha) --> <dimen name="lockscreen_shade_scrim_transition_distance">@dimen/lockscreen_shade_full_transition_distance</dimen> <!-- Distance that it takes in order for the notifications scrim fade in to start. --> <dimen name="lockscreen_shade_notifications_scrim_transition_delay">0dp</dimen> <!-- Distance that it takes for the notifications scrim to fully fade if after it started. --> <dimen name="lockscreen_shade_notifications_scrim_transition_distance">@dimen/lockscreen_shade_scrim_transition_distance</dimen> <!-- Distance that the full shade transition takes in order for the keyguard content on NotificationPanelViewController to fully fade (e.g. Clock & Smartspace) --> <dimen name="lockscreen_shade_npvc_keyguard_content_alpha_transition_distance">@dimen/lockscreen_shade_full_transition_distance</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +22 −2 Original line number Diff line number Diff line Loading @@ -115,6 +115,16 @@ class LockscreenShadeTransitionController @Inject constructor( */ private var scrimTransitionDistance = 0 /** * Distance that it takes in order for the notifications scrim fade in to start. */ private var notificationsScrimTransitionDelay = 0 /** * Distance that it takes for the notifications scrim to fully fade if after it started. */ private var notificationsScrimTransitionDistance = 0 /** * Distance that the full shade transition takes in order for the notification shelf to fully * expand. Loading Loading @@ -225,6 +235,10 @@ class LockscreenShadeTransitionController @Inject constructor( R.dimen.lockscreen_shade_transition_by_tap_distance) scrimTransitionDistance = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_scrim_transition_distance) notificationsScrimTransitionDelay = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_notifications_scrim_transition_delay) notificationsScrimTransitionDistance = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_notifications_scrim_transition_distance) notificationShelfTransitionDistance = context.resources.getDimensionPixelSize( R.dimen.lockscreen_shade_notif_shelf_transition_distance) qsTransitionDistance = context.resources.getDimensionPixelSize( Loading Loading @@ -405,6 +419,7 @@ class LockscreenShadeTransitionController @Inject constructor( false /* animate */, 0 /* delay */) mediaHierarchyManager.setTransitionToFullShadeAmount(field) transitionToShadeAmountScrim(field) transitionToShadeAmountCommon(field) transitionToShadeAmountKeyguard(field) } Loading @@ -417,10 +432,15 @@ class LockscreenShadeTransitionController @Inject constructor( var qSDragProgress = 0f private set private fun transitionToShadeAmountCommon(dragDownAmount: Float) { private fun transitionToShadeAmountScrim(dragDownAmount: Float) { val scrimProgress = MathUtils.saturate(dragDownAmount / scrimTransitionDistance) scrimController.setTransitionToFullShadeProgress(scrimProgress) val notificationsScrimDragAmount = dragDownAmount - notificationsScrimTransitionDelay val notificationsScrimProgress = MathUtils.saturate( notificationsScrimDragAmount / notificationsScrimTransitionDistance) scrimController.setTransitionToFullShadeProgress(scrimProgress, notificationsScrimProgress) } private fun transitionToShadeAmountCommon(dragDownAmount: Float) { if (depthControllerTransitionDistance > 0) { val depthProgress = MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance) Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +21 −5 Original line number Diff line number Diff line Loading @@ -115,6 +115,15 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump */ private float mTransitionToFullShadeProgress; /** * Same as {@link #mTransitionToFullShadeProgress}, but specifically for the notifications scrim * on the lock screen. * * On split shade lock screen we want the different scrims to fade in at different times and * rates. */ private float mTransitionToLockScreenFullShadeNotificationsProgress; /** * If we're currently transitioning to the full shade. */ Loading Loading @@ -574,11 +583,17 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump * Set the amount of progress we are currently in if we're transitioning to the full shade. * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full * shade. * * @param progress the progress for all scrims. * @param lockScreenNotificationsProgress the progress specifically for the notifications scrim. */ public void setTransitionToFullShadeProgress(float progress) { if (progress != mTransitionToFullShadeProgress) { public void setTransitionToFullShadeProgress(float progress, float lockScreenNotificationsProgress) { if (progress != mTransitionToFullShadeProgress || lockScreenNotificationsProgress != mTransitionToLockScreenFullShadeNotificationsProgress) { mTransitionToFullShadeProgress = progress; setTransitionToFullShade(progress > 0.0f); mTransitionToLockScreenFullShadeNotificationsProgress = lockScreenNotificationsProgress; setTransitionToFullShade(progress > 0.0f || lockScreenNotificationsProgress > 0.0f); applyAndDispatchState(); } } Loading Loading @@ -754,12 +769,13 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } else { mNotificationsAlpha = Math.max(1.0f - getInterpolatedFraction(), mQsExpansion); } if (mState == ScrimState.KEYGUARD && mTransitionToFullShadeProgress > 0.0f) { if (mState == ScrimState.KEYGUARD && mTransitionToLockScreenFullShadeNotificationsProgress > 0.0f) { // Interpolate the notification alpha when transitioning! mNotificationsAlpha = MathUtils.lerp( mNotificationsAlpha, getInterpolatedFraction(), mTransitionToFullShadeProgress); mTransitionToLockScreenFullShadeNotificationsProgress); } mNotificationsTint = mState.getNotifTint(); mBehindTint = behindTint; Loading
packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java +5 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,11 @@ public abstract class SysuiTestCase { } } /** Delegates to {@link android.testing.TestableResources#addOverride(int, Object)}. */ protected void overrideResource(int resourceId, Object value) { mContext.getOrCreateTestableResources().addOverride(resourceId, value); } public static final class EmptyRunnable implements Runnable { public void run() { } Loading