Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +9 −12 Original line number Diff line number Diff line Loading @@ -393,7 +393,6 @@ object KeyguardRootViewBinder { iconsAppearTranslationPx: Int, screenOffAnimationController: ScreenOffAnimationController, ) { val statusViewMigrated = KeyguardShadeMigrationNssl.isEnabled animate().cancel() val animatorListener = object : AnimatorListenerAdapter() { Loading @@ -404,13 +403,13 @@ object KeyguardRootViewBinder { when { !isVisible.isAnimating -> { alpha = 1f if (!statusViewMigrated) { if (!KeyguardShadeMigrationNssl.isEnabled) { translationY = 0f } visibility = if (isVisible.value) View.VISIBLE else View.INVISIBLE } newAodTransition() -> { animateInIconTranslation(statusViewMigrated) animateInIconTranslation() if (isVisible.value) { CrossFadeHelper.fadeIn(this, animatorListener) } else { Loading @@ -419,7 +418,7 @@ object KeyguardRootViewBinder { } !isVisible.value -> { // Let's make sure the icon are translated to 0, since we cancelled it above animateInIconTranslation(statusViewMigrated) animateInIconTranslation() CrossFadeHelper.fadeOut(this, animatorListener) } visibility != View.VISIBLE -> { Loading @@ -429,13 +428,12 @@ object KeyguardRootViewBinder { appearIcons( animate = screenOffAnimationController.shouldAnimateAodIcons(), iconsAppearTranslationPx, statusViewMigrated, animatorListener, ) } else -> { // Let's make sure the icons are translated to 0, since we cancelled it above animateInIconTranslation(statusViewMigrated) animateInIconTranslation() // We were fading out, let's fade in instead CrossFadeHelper.fadeIn(this, animatorListener) } Loading @@ -445,11 +443,10 @@ object KeyguardRootViewBinder { private fun View.appearIcons( animate: Boolean, iconAppearTranslation: Int, statusViewMigrated: Boolean, animatorListener: Animator.AnimatorListener, ) { if (animate) { if (!statusViewMigrated) { if (!KeyguardShadeMigrationNssl.isEnabled) { translationY = -iconAppearTranslation.toFloat() } alpha = 0f Loading @@ -457,19 +454,19 @@ object KeyguardRootViewBinder { .alpha(1f) .setInterpolator(Interpolators.LINEAR) .setDuration(AOD_ICONS_APPEAR_DURATION) .apply { if (statusViewMigrated) animateInIconTranslation() } .apply { if (KeyguardShadeMigrationNssl.isEnabled) animateInIconTranslation() } .setListener(animatorListener) .start() } else { alpha = 1.0f if (!statusViewMigrated) { if (!KeyguardShadeMigrationNssl.isEnabled) { translationY = 0f } } } private fun View.animateInIconTranslation(statusViewMigrated: Boolean) { if (!statusViewMigrated) { private fun View.animateInIconTranslation() { if (!KeyguardShadeMigrationNssl.isEnabled) { animate().animateInIconTranslation().setDuration(AOD_ICONS_APPEAR_DURATION).start() } } Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1096,7 +1096,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } @Override public void onPulseExpansionChanged(boolean expandingChanged) { public void onPulseExpansionAmountChanged(boolean expandingChanged) { if (mKeyguardBypassController.getBypassEnabled()) { // Position the notifications while dragging down while pulsing requestScrollerTopPaddingUpdate(false /* animate */); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +19 −4 Original line number Diff line number Diff line Loading @@ -20,9 +20,9 @@ import android.util.FloatProperty import android.view.animation.Interpolator import androidx.annotation.VisibleForTesting import androidx.core.animation.ObjectAnimator import com.android.systemui.Dumpable import com.android.app.animation.Interpolators import com.android.app.animation.InterpolatorsAndroidX import com.android.systemui.Dumpable import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dump.DumpManager import com.android.systemui.plugins.statusbar.StatusBarStateController Loading @@ -31,6 +31,7 @@ import com.android.systemui.shade.ShadeExpansionListener import com.android.systemui.shade.ShadeViewController import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController import com.android.systemui.statusbar.notification.stack.StackStateAnimator import com.android.systemui.statusbar.phone.DozeParameters Loading Loading @@ -206,8 +207,15 @@ constructor( val nowExpanding = isPulseExpanding() val changed = nowExpanding != pulseExpanding pulseExpanding = nowExpanding if (!NotificationIconContainerRefactor.isEnabled) { for (listener in wakeUpListeners) { listener.onPulseExpansionAmountChanged(changed) } } if (changed) { for (listener in wakeUpListeners) { listener.onPulseExpansionChanged(changed) listener.onPulseExpandingChanged(pulseExpanding) } } } } Loading Loading @@ -620,13 +628,20 @@ constructor( * * @param expandingChanged if the user has started or stopped expanding */ fun onPulseExpansionChanged(expandingChanged: Boolean) {} @Deprecated( message = "Use onPulseExpandedChanged instead.", replaceWith = ReplaceWith("onPulseExpandedChanged"), ) fun onPulseExpansionAmountChanged(expandingChanged: Boolean) {} /** * Called when the animator started by [scheduleDelayedDozeAmountAnimation] begins running * after the start delay, or after it ends/is cancelled. */ fun onDelayedDozeAmountAnimationRunning(running: Boolean) {} /** Called whenever a pulse has started or stopped expanding. */ fun onPulseExpandingChanged(isPulseExpanding: Boolean) {} } companion object { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationsKeyguardViewStateRepository.kt +2 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,8 @@ constructor( override val isPulseExpanding: Flow<Boolean> = conflatedCallbackFlow { val listener = object : NotificationWakeUpCoordinator.WakeUpListener { override fun onPulseExpansionChanged(expandingChanged: Boolean) { trySend(expandingChanged) override fun onPulseExpandingChanged(isPulseExpanding: Boolean) { trySend(isPulseExpanding) } } trySend(wakeUpCoordinator.isPulseExpanding()) Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -608,7 +608,7 @@ public class LegacyNotificationIconAreaControllerImpl implements } @Override public void onPulseExpansionChanged(boolean expandingChanged) { public void onPulseExpansionAmountChanged(boolean expandingChanged) { if (expandingChanged) { updateAodIconsVisibility(true /* animate */, false /* force */); } Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +9 −12 Original line number Diff line number Diff line Loading @@ -393,7 +393,6 @@ object KeyguardRootViewBinder { iconsAppearTranslationPx: Int, screenOffAnimationController: ScreenOffAnimationController, ) { val statusViewMigrated = KeyguardShadeMigrationNssl.isEnabled animate().cancel() val animatorListener = object : AnimatorListenerAdapter() { Loading @@ -404,13 +403,13 @@ object KeyguardRootViewBinder { when { !isVisible.isAnimating -> { alpha = 1f if (!statusViewMigrated) { if (!KeyguardShadeMigrationNssl.isEnabled) { translationY = 0f } visibility = if (isVisible.value) View.VISIBLE else View.INVISIBLE } newAodTransition() -> { animateInIconTranslation(statusViewMigrated) animateInIconTranslation() if (isVisible.value) { CrossFadeHelper.fadeIn(this, animatorListener) } else { Loading @@ -419,7 +418,7 @@ object KeyguardRootViewBinder { } !isVisible.value -> { // Let's make sure the icon are translated to 0, since we cancelled it above animateInIconTranslation(statusViewMigrated) animateInIconTranslation() CrossFadeHelper.fadeOut(this, animatorListener) } visibility != View.VISIBLE -> { Loading @@ -429,13 +428,12 @@ object KeyguardRootViewBinder { appearIcons( animate = screenOffAnimationController.shouldAnimateAodIcons(), iconsAppearTranslationPx, statusViewMigrated, animatorListener, ) } else -> { // Let's make sure the icons are translated to 0, since we cancelled it above animateInIconTranslation(statusViewMigrated) animateInIconTranslation() // We were fading out, let's fade in instead CrossFadeHelper.fadeIn(this, animatorListener) } Loading @@ -445,11 +443,10 @@ object KeyguardRootViewBinder { private fun View.appearIcons( animate: Boolean, iconAppearTranslation: Int, statusViewMigrated: Boolean, animatorListener: Animator.AnimatorListener, ) { if (animate) { if (!statusViewMigrated) { if (!KeyguardShadeMigrationNssl.isEnabled) { translationY = -iconAppearTranslation.toFloat() } alpha = 0f Loading @@ -457,19 +454,19 @@ object KeyguardRootViewBinder { .alpha(1f) .setInterpolator(Interpolators.LINEAR) .setDuration(AOD_ICONS_APPEAR_DURATION) .apply { if (statusViewMigrated) animateInIconTranslation() } .apply { if (KeyguardShadeMigrationNssl.isEnabled) animateInIconTranslation() } .setListener(animatorListener) .start() } else { alpha = 1.0f if (!statusViewMigrated) { if (!KeyguardShadeMigrationNssl.isEnabled) { translationY = 0f } } } private fun View.animateInIconTranslation(statusViewMigrated: Boolean) { if (!statusViewMigrated) { private fun View.animateInIconTranslation() { if (!KeyguardShadeMigrationNssl.isEnabled) { animate().animateInIconTranslation().setDuration(AOD_ICONS_APPEAR_DURATION).start() } } Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1096,7 +1096,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } @Override public void onPulseExpansionChanged(boolean expandingChanged) { public void onPulseExpansionAmountChanged(boolean expandingChanged) { if (mKeyguardBypassController.getBypassEnabled()) { // Position the notifications while dragging down while pulsing requestScrollerTopPaddingUpdate(false /* animate */); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +19 −4 Original line number Diff line number Diff line Loading @@ -20,9 +20,9 @@ import android.util.FloatProperty import android.view.animation.Interpolator import androidx.annotation.VisibleForTesting import androidx.core.animation.ObjectAnimator import com.android.systemui.Dumpable import com.android.app.animation.Interpolators import com.android.app.animation.InterpolatorsAndroidX import com.android.systemui.Dumpable import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dump.DumpManager import com.android.systemui.plugins.statusbar.StatusBarStateController Loading @@ -31,6 +31,7 @@ import com.android.systemui.shade.ShadeExpansionListener import com.android.systemui.shade.ShadeViewController import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController import com.android.systemui.statusbar.notification.stack.StackStateAnimator import com.android.systemui.statusbar.phone.DozeParameters Loading Loading @@ -206,8 +207,15 @@ constructor( val nowExpanding = isPulseExpanding() val changed = nowExpanding != pulseExpanding pulseExpanding = nowExpanding if (!NotificationIconContainerRefactor.isEnabled) { for (listener in wakeUpListeners) { listener.onPulseExpansionAmountChanged(changed) } } if (changed) { for (listener in wakeUpListeners) { listener.onPulseExpansionChanged(changed) listener.onPulseExpandingChanged(pulseExpanding) } } } } Loading Loading @@ -620,13 +628,20 @@ constructor( * * @param expandingChanged if the user has started or stopped expanding */ fun onPulseExpansionChanged(expandingChanged: Boolean) {} @Deprecated( message = "Use onPulseExpandedChanged instead.", replaceWith = ReplaceWith("onPulseExpandedChanged"), ) fun onPulseExpansionAmountChanged(expandingChanged: Boolean) {} /** * Called when the animator started by [scheduleDelayedDozeAmountAnimation] begins running * after the start delay, or after it ends/is cancelled. */ fun onDelayedDozeAmountAnimationRunning(running: Boolean) {} /** Called whenever a pulse has started or stopped expanding. */ fun onPulseExpandingChanged(isPulseExpanding: Boolean) {} } companion object { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationsKeyguardViewStateRepository.kt +2 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,8 @@ constructor( override val isPulseExpanding: Flow<Boolean> = conflatedCallbackFlow { val listener = object : NotificationWakeUpCoordinator.WakeUpListener { override fun onPulseExpansionChanged(expandingChanged: Boolean) { trySend(expandingChanged) override fun onPulseExpandingChanged(isPulseExpanding: Boolean) { trySend(isPulseExpanding) } } trySend(wakeUpCoordinator.isPulseExpanding()) Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -608,7 +608,7 @@ public class LegacyNotificationIconAreaControllerImpl implements } @Override public void onPulseExpansionChanged(boolean expandingChanged) { public void onPulseExpansionAmountChanged(boolean expandingChanged) { if (expandingChanged) { updateAodIconsVisibility(true /* animate */, false /* force */); } Loading