Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +3 −1 Original line number Diff line number Diff line Loading @@ -329,7 +329,9 @@ class NotificationShadeDepthController @Inject constructor( /** * Update blurs when pulling down the shade */ override fun onPanelExpansionChanged(rawFraction: Float, tracking: Boolean) { override fun onPanelExpansionChanged( rawFraction: Float, expanded: Boolean, tracking: Boolean ) { val timestamp = SystemClock.elapsedRealtimeNanos() val expansion = MathUtils.saturate( (rawFraction - panelPullDownMinFraction) / (1f - panelPullDownMinFraction)) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ class NotificationWakeUpCoordinator @Inject constructor( this.state = newState } override fun onPanelExpansionChanged(fraction: Float, tracking: Boolean) { override fun onPanelExpansionChanged(fraction: Float, expanded: Boolean, tracking: Boolean) { val collapsedEnough = fraction <= 0.9f if (collapsedEnough != this.collapsedEnoughToHide) { val couldShowPulsingHuns = canShowPulsingHuns Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +2 −1 Original line number Diff line number Diff line Loading @@ -1093,7 +1093,8 @@ public abstract class PanelViewController { mBar.panelExpansionChanged(mExpandedFraction, isExpanded()); } updateVisibility(); mPanelExpansionStateManager.onPanelExpansionChanged(mExpandedFraction, mTracking); mPanelExpansionStateManager.onPanelExpansionChanged( mExpandedFraction, isExpanded(), mTracking); } public boolean isExpanded() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +1 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } }); panelExpansionStateManager.addListener( (fraction, tracking) -> setRawPanelExpansionFraction(fraction) (fraction, expanded, tracking) -> setRawPanelExpansionFraction(fraction) ); mColors = new GradientColors(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +11 −11 Original line number Diff line number Diff line Loading @@ -909,7 +909,7 @@ public class StatusBar extends SystemUI implements lockscreenShadeTransitionController.setStatusbar(this); mExpansionChangedListeners = new ArrayList<>(); addExpansionChangedListener(this::onPanelExpansionChanged); mPanelExpansionStateManager.addListener(this::onPanelExpansionChanged); mBubbleExpandListener = (isExpanding, key) -> mContext.getMainExecutor().execute(() -> { Loading Loading @@ -1158,8 +1158,6 @@ public class StatusBar extends SystemUI implements mNotificationIconAreaController.setupShelf(mNotificationShelfController); mPanelExpansionStateManager.addListener(mWakeUpCoordinator); mPanelExpansionStateManager.addListener( this::dispatchPanelExpansionForKeyguardDismiss); mUserSwitcherController.init(mNotificationShadeWindowView); Loading Loading @@ -1424,15 +1422,15 @@ public class StatusBar extends SystemUI implements /** * When swiping up to dismiss the lock screen, the panel expansion goes from 1f to 0f. This * results in the clock/notifications/other content disappearing off the top of the screen. * When swiping up to dismiss the lock screen, the panel expansion fraction goes from 1f to 0f. * This results in the clock/notifications/other content disappearing off the top of the screen. * * We also use the expansion amount to animate in the app/launcher surface from the bottom of * We also use the expansion fraction to animate in the app/launcher surface from the bottom of * the screen, 'pushing' off the notifications and other content. To do this, we dispatch the * expansion amount to the KeyguardViewMediator if we're in the process of dismissing the * expansion fraction to the KeyguardViewMediator if we're in the process of dismissing the * keyguard. */ private void dispatchPanelExpansionForKeyguardDismiss(float expansion, boolean trackingTouch) { private void dispatchPanelExpansionForKeyguardDismiss(float fraction, boolean trackingTouch) { // Things that mean we're not dismissing the keyguard, and should ignore this expansion: // - Keyguard isn't even visible. // - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt). Loading @@ -1451,12 +1449,14 @@ public class StatusBar extends SystemUI implements || mKeyguardViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe() || mKeyguardUnlockAnimationController.isUnlockingWithSmartSpaceTransition()) { mKeyguardStateController.notifyKeyguardDismissAmountChanged( 1f - expansion, trackingTouch); 1f - fraction, trackingTouch); } } private void onPanelExpansionChanged(float frac, boolean expanded) { if (frac == 0 || frac == 1) { private void onPanelExpansionChanged(float fraction, boolean expanded, boolean tracking) { dispatchPanelExpansionForKeyguardDismiss(fraction, tracking); if (fraction == 0 || fraction == 1) { if (getNavigationBarView() != null) { getNavigationBarView().onStatusBarPanelStateChanged(); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +3 −1 Original line number Diff line number Diff line Loading @@ -329,7 +329,9 @@ class NotificationShadeDepthController @Inject constructor( /** * Update blurs when pulling down the shade */ override fun onPanelExpansionChanged(rawFraction: Float, tracking: Boolean) { override fun onPanelExpansionChanged( rawFraction: Float, expanded: Boolean, tracking: Boolean ) { val timestamp = SystemClock.elapsedRealtimeNanos() val expansion = MathUtils.saturate( (rawFraction - panelPullDownMinFraction) / (1f - panelPullDownMinFraction)) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ class NotificationWakeUpCoordinator @Inject constructor( this.state = newState } override fun onPanelExpansionChanged(fraction: Float, tracking: Boolean) { override fun onPanelExpansionChanged(fraction: Float, expanded: Boolean, tracking: Boolean) { val collapsedEnough = fraction <= 0.9f if (collapsedEnough != this.collapsedEnoughToHide) { val couldShowPulsingHuns = canShowPulsingHuns Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +2 −1 Original line number Diff line number Diff line Loading @@ -1093,7 +1093,8 @@ public abstract class PanelViewController { mBar.panelExpansionChanged(mExpandedFraction, isExpanded()); } updateVisibility(); mPanelExpansionStateManager.onPanelExpansionChanged(mExpandedFraction, mTracking); mPanelExpansionStateManager.onPanelExpansionChanged( mExpandedFraction, isExpanded(), mTracking); } public boolean isExpanded() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +1 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } }); panelExpansionStateManager.addListener( (fraction, tracking) -> setRawPanelExpansionFraction(fraction) (fraction, expanded, tracking) -> setRawPanelExpansionFraction(fraction) ); mColors = new GradientColors(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +11 −11 Original line number Diff line number Diff line Loading @@ -909,7 +909,7 @@ public class StatusBar extends SystemUI implements lockscreenShadeTransitionController.setStatusbar(this); mExpansionChangedListeners = new ArrayList<>(); addExpansionChangedListener(this::onPanelExpansionChanged); mPanelExpansionStateManager.addListener(this::onPanelExpansionChanged); mBubbleExpandListener = (isExpanding, key) -> mContext.getMainExecutor().execute(() -> { Loading Loading @@ -1158,8 +1158,6 @@ public class StatusBar extends SystemUI implements mNotificationIconAreaController.setupShelf(mNotificationShelfController); mPanelExpansionStateManager.addListener(mWakeUpCoordinator); mPanelExpansionStateManager.addListener( this::dispatchPanelExpansionForKeyguardDismiss); mUserSwitcherController.init(mNotificationShadeWindowView); Loading Loading @@ -1424,15 +1422,15 @@ public class StatusBar extends SystemUI implements /** * When swiping up to dismiss the lock screen, the panel expansion goes from 1f to 0f. This * results in the clock/notifications/other content disappearing off the top of the screen. * When swiping up to dismiss the lock screen, the panel expansion fraction goes from 1f to 0f. * This results in the clock/notifications/other content disappearing off the top of the screen. * * We also use the expansion amount to animate in the app/launcher surface from the bottom of * We also use the expansion fraction to animate in the app/launcher surface from the bottom of * the screen, 'pushing' off the notifications and other content. To do this, we dispatch the * expansion amount to the KeyguardViewMediator if we're in the process of dismissing the * expansion fraction to the KeyguardViewMediator if we're in the process of dismissing the * keyguard. */ private void dispatchPanelExpansionForKeyguardDismiss(float expansion, boolean trackingTouch) { private void dispatchPanelExpansionForKeyguardDismiss(float fraction, boolean trackingTouch) { // Things that mean we're not dismissing the keyguard, and should ignore this expansion: // - Keyguard isn't even visible. // - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt). Loading @@ -1451,12 +1449,14 @@ public class StatusBar extends SystemUI implements || mKeyguardViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe() || mKeyguardUnlockAnimationController.isUnlockingWithSmartSpaceTransition()) { mKeyguardStateController.notifyKeyguardDismissAmountChanged( 1f - expansion, trackingTouch); 1f - fraction, trackingTouch); } } private void onPanelExpansionChanged(float frac, boolean expanded) { if (frac == 0 || frac == 1) { private void onPanelExpansionChanged(float fraction, boolean expanded, boolean tracking) { dispatchPanelExpansionForKeyguardDismiss(fraction, tracking); if (fraction == 0 || fraction == 1) { if (getNavigationBarView() != null) { getNavigationBarView().onStatusBarPanelStateChanged(); } Loading