Loading packages/SystemUI/src/com/android/systemui/shade/DebugDrawable.java +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class DebugDrawable extends Drawable { Color.YELLOW, "calculatePanelHeightShade()"); drawDebugInfo(canvas, (int) mQsController.calculateNotificationsTopPadding( mNotificationPanelViewController.isExpanding(), mNotificationPanelViewController.isExpandingOrCollapsing(), mNotificationPanelViewController.getKeyguardNotificationStaticPadding(), mNotificationPanelViewController.getExpandedFraction()), Color.MAGENTA, "calculateNotificationsTopPadding()"); Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +20 −14 Original line number Diff line number Diff line Loading @@ -233,7 +233,6 @@ import javax.inject.Inject; import javax.inject.Provider; import kotlin.Unit; import kotlinx.coroutines.CoroutineDispatcher; @CentralSurfacesComponent.CentralSurfacesScope Loading Loading @@ -415,7 +414,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private final KeyguardClockPositionAlgorithm.Result mClockPositionResult = new KeyguardClockPositionAlgorithm.Result(); private boolean mIsExpanding; /** * Indicates shade (or just QS) is expanding or collapsing but doesn't fully cover KEYGUARD * state when shade can be expanded with swipe down or swipe down from the top to full QS. */ private boolean mIsExpandingOrCollapsing; /** * Indicates drag starting height when swiping down or up on heads-up notifications. Loading Loading @@ -1862,7 +1865,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump @Override public void expandToNotifications() { if (mSplitShadeEnabled && (isShadeFullyExpanded() || isExpanding())) { if (mSplitShadeEnabled && (isShadeFullyExpanded() || isExpandingOrCollapsing())) { return; } if (mQsController.getExpanded()) { Loading Loading @@ -2269,7 +2272,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump void requestScrollerTopPaddingUpdate(boolean animate) { mNotificationStackScrollLayoutController.updateTopPadding( mQsController.calculateNotificationsTopPadding(mIsExpanding, mQsController.calculateNotificationsTopPadding(mIsExpandingOrCollapsing, getKeyguardNotificationStaticPadding(), mExpandedFraction), animate); if (isKeyguardShowing() && mKeyguardBypassController.getBypassEnabled()) { Loading Loading @@ -2322,7 +2325,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } int maxHeight; if (mQsController.isExpandImmediate() || mQsController.getExpanded() || mIsExpanding && mQsController.getExpandedWhenExpandingStarted() || mIsExpandingOrCollapsing && mQsController.getExpandedWhenExpandingStarted() || mPulsing || mSplitShadeEnabled) { maxHeight = mQsController.calculatePanelHeightExpanded( mClockPositionResult.stackScrollerPadding); Loading @@ -2342,8 +2345,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump return maxHeight; } public boolean isExpanding() { return mIsExpanding; @Override public boolean isExpandingOrCollapsing() { float lockscreenExpansionProgress = mQsController.getLockscreenShadeDragProgress(); return mIsExpandingOrCollapsing || (0 < lockscreenExpansionProgress && lockscreenExpansionProgress < 1); } private void onHeightUpdated(float expandedHeight) { Loading @@ -2355,7 +2361,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx); } if (!mQsController.getExpanded() || mQsController.isExpandImmediate() || mIsExpanding && mQsController.getExpandedWhenExpandingStarted()) { || mIsExpandingOrCollapsing && mQsController.getExpandedWhenExpandingStarted()) { // Updating the clock position will set the top padding which might // trigger a new panel height and re-position the clock. // This is a circular dependency and should be avoided, otherwise we'll have Loading Loading @@ -2493,7 +2499,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mNotificationStackScrollLayoutController.onExpansionStopped(); mHeadsUpManager.onExpandingFinished(); mConversationNotificationManager.onNotificationPanelExpandStateChanged(isFullyCollapsed()); mIsExpanding = false; mIsExpandingOrCollapsing = false; mMediaHierarchyManager.setCollapsingShadeFromQS(false); mMediaHierarchyManager.setQsExpanded(mQsController.getExpanded()); if (isFullyCollapsed()) { Loading Loading @@ -3199,7 +3205,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump ipw.print("mDisplayTopInset="); ipw.println(mDisplayTopInset); ipw.print("mDisplayRightInset="); ipw.println(mDisplayRightInset); ipw.print("mDisplayLeftInset="); ipw.println(mDisplayLeftInset); ipw.print("mIsExpanding="); ipw.println(mIsExpanding); ipw.print("mIsExpandingOrCollapsing="); ipw.println(mIsExpandingOrCollapsing); ipw.print("mHeadsUpStartHeight="); ipw.println(mHeadsUpStartHeight); ipw.print("mListenForHeadsUp="); ipw.println(mListenForHeadsUp); ipw.print("mNavigationBarBottomHeight="); ipw.println(mNavigationBarBottomHeight); Loading Loading @@ -3431,7 +3437,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump void notifyExpandingStarted() { if (!mExpanding) { mExpanding = true; mIsExpanding = true; mIsExpandingOrCollapsing = true; mQsController.onExpandingStarted(mQsController.getFullyExpanded()); } } Loading Loading @@ -3792,7 +3798,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } else if (mBarState == SHADE_LOCKED) { return true; } else { // case of two finger swipe from the top of keyguard // case of swipe from the top of keyguard to expanded QS return mQsController.computeExpansionFraction() == 1; } } Loading Loading @@ -4044,7 +4050,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump * shade QS are always expanded */ private void closeQsIfPossible() { boolean openOrOpening = isShadeFullyExpanded() || isExpanding(); boolean openOrOpening = isShadeFullyExpanded() || isExpandingOrCollapsing(); if (!(mSplitShadeEnabled && openOrOpening)) { mQsController.closeQs(); } Loading Loading @@ -4767,7 +4773,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump // If pulse is expanding already, let's give it the touch. There are situations // where the panel starts expanding even though we're also pulsing boolean pulseShouldGetTouch = (!mIsExpanding boolean pulseShouldGetTouch = (!mIsExpandingOrCollapsing && !mQsController.shouldQuickSettingsIntercept(mDownX, mDownY, 0)) || mPulseExpansionHandler.isExpanding(); if (pulseShouldGetTouch && mPulseExpansionHandler.onTouchEvent(event)) { Loading packages/SystemUI/src/com/android/systemui/shade/ShadeController.java +5 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,11 @@ public interface ShadeController { */ boolean isShadeFullyOpen(); /** * Returns whether shade or QS are currently opening or collapsing. */ boolean isExpandingOrCollapsing(); /** * Add a runnable for NotificationPanelView to post when the panel is expanded. * Loading packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java +5 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,11 @@ public final class ShadeControllerImpl implements ShadeController { return mNotificationPanelViewController.isShadeFullyExpanded(); } @Override public boolean isExpandingOrCollapsing() { return mNotificationPanelViewController.isExpandingOrCollapsing(); } @Override public void postOnShadeExpanded(Runnable executable) { mNotificationPanelViewController.addOnGlobalLayoutListener( Loading packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ interface ShadeViewController { fun expandToNotifications() /** Returns whether the shade is expanding or collapsing itself or quick settings. */ val isExpanding: Boolean val isExpandingOrCollapsing: Boolean /** * Returns whether the shade height is greater than zero (i.e. partially or fully expanded), Loading Loading
packages/SystemUI/src/com/android/systemui/shade/DebugDrawable.java +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class DebugDrawable extends Drawable { Color.YELLOW, "calculatePanelHeightShade()"); drawDebugInfo(canvas, (int) mQsController.calculateNotificationsTopPadding( mNotificationPanelViewController.isExpanding(), mNotificationPanelViewController.isExpandingOrCollapsing(), mNotificationPanelViewController.getKeyguardNotificationStaticPadding(), mNotificationPanelViewController.getExpandedFraction()), Color.MAGENTA, "calculateNotificationsTopPadding()"); Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +20 −14 Original line number Diff line number Diff line Loading @@ -233,7 +233,6 @@ import javax.inject.Inject; import javax.inject.Provider; import kotlin.Unit; import kotlinx.coroutines.CoroutineDispatcher; @CentralSurfacesComponent.CentralSurfacesScope Loading Loading @@ -415,7 +414,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private final KeyguardClockPositionAlgorithm.Result mClockPositionResult = new KeyguardClockPositionAlgorithm.Result(); private boolean mIsExpanding; /** * Indicates shade (or just QS) is expanding or collapsing but doesn't fully cover KEYGUARD * state when shade can be expanded with swipe down or swipe down from the top to full QS. */ private boolean mIsExpandingOrCollapsing; /** * Indicates drag starting height when swiping down or up on heads-up notifications. Loading Loading @@ -1862,7 +1865,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump @Override public void expandToNotifications() { if (mSplitShadeEnabled && (isShadeFullyExpanded() || isExpanding())) { if (mSplitShadeEnabled && (isShadeFullyExpanded() || isExpandingOrCollapsing())) { return; } if (mQsController.getExpanded()) { Loading Loading @@ -2269,7 +2272,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump void requestScrollerTopPaddingUpdate(boolean animate) { mNotificationStackScrollLayoutController.updateTopPadding( mQsController.calculateNotificationsTopPadding(mIsExpanding, mQsController.calculateNotificationsTopPadding(mIsExpandingOrCollapsing, getKeyguardNotificationStaticPadding(), mExpandedFraction), animate); if (isKeyguardShowing() && mKeyguardBypassController.getBypassEnabled()) { Loading Loading @@ -2322,7 +2325,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } int maxHeight; if (mQsController.isExpandImmediate() || mQsController.getExpanded() || mIsExpanding && mQsController.getExpandedWhenExpandingStarted() || mIsExpandingOrCollapsing && mQsController.getExpandedWhenExpandingStarted() || mPulsing || mSplitShadeEnabled) { maxHeight = mQsController.calculatePanelHeightExpanded( mClockPositionResult.stackScrollerPadding); Loading @@ -2342,8 +2345,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump return maxHeight; } public boolean isExpanding() { return mIsExpanding; @Override public boolean isExpandingOrCollapsing() { float lockscreenExpansionProgress = mQsController.getLockscreenShadeDragProgress(); return mIsExpandingOrCollapsing || (0 < lockscreenExpansionProgress && lockscreenExpansionProgress < 1); } private void onHeightUpdated(float expandedHeight) { Loading @@ -2355,7 +2361,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx); } if (!mQsController.getExpanded() || mQsController.isExpandImmediate() || mIsExpanding && mQsController.getExpandedWhenExpandingStarted()) { || mIsExpandingOrCollapsing && mQsController.getExpandedWhenExpandingStarted()) { // Updating the clock position will set the top padding which might // trigger a new panel height and re-position the clock. // This is a circular dependency and should be avoided, otherwise we'll have Loading Loading @@ -2493,7 +2499,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mNotificationStackScrollLayoutController.onExpansionStopped(); mHeadsUpManager.onExpandingFinished(); mConversationNotificationManager.onNotificationPanelExpandStateChanged(isFullyCollapsed()); mIsExpanding = false; mIsExpandingOrCollapsing = false; mMediaHierarchyManager.setCollapsingShadeFromQS(false); mMediaHierarchyManager.setQsExpanded(mQsController.getExpanded()); if (isFullyCollapsed()) { Loading Loading @@ -3199,7 +3205,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump ipw.print("mDisplayTopInset="); ipw.println(mDisplayTopInset); ipw.print("mDisplayRightInset="); ipw.println(mDisplayRightInset); ipw.print("mDisplayLeftInset="); ipw.println(mDisplayLeftInset); ipw.print("mIsExpanding="); ipw.println(mIsExpanding); ipw.print("mIsExpandingOrCollapsing="); ipw.println(mIsExpandingOrCollapsing); ipw.print("mHeadsUpStartHeight="); ipw.println(mHeadsUpStartHeight); ipw.print("mListenForHeadsUp="); ipw.println(mListenForHeadsUp); ipw.print("mNavigationBarBottomHeight="); ipw.println(mNavigationBarBottomHeight); Loading Loading @@ -3431,7 +3437,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump void notifyExpandingStarted() { if (!mExpanding) { mExpanding = true; mIsExpanding = true; mIsExpandingOrCollapsing = true; mQsController.onExpandingStarted(mQsController.getFullyExpanded()); } } Loading Loading @@ -3792,7 +3798,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } else if (mBarState == SHADE_LOCKED) { return true; } else { // case of two finger swipe from the top of keyguard // case of swipe from the top of keyguard to expanded QS return mQsController.computeExpansionFraction() == 1; } } Loading Loading @@ -4044,7 +4050,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump * shade QS are always expanded */ private void closeQsIfPossible() { boolean openOrOpening = isShadeFullyExpanded() || isExpanding(); boolean openOrOpening = isShadeFullyExpanded() || isExpandingOrCollapsing(); if (!(mSplitShadeEnabled && openOrOpening)) { mQsController.closeQs(); } Loading Loading @@ -4767,7 +4773,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump // If pulse is expanding already, let's give it the touch. There are situations // where the panel starts expanding even though we're also pulsing boolean pulseShouldGetTouch = (!mIsExpanding boolean pulseShouldGetTouch = (!mIsExpandingOrCollapsing && !mQsController.shouldQuickSettingsIntercept(mDownX, mDownY, 0)) || mPulseExpansionHandler.isExpanding(); if (pulseShouldGetTouch && mPulseExpansionHandler.onTouchEvent(event)) { Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeController.java +5 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,11 @@ public interface ShadeController { */ boolean isShadeFullyOpen(); /** * Returns whether shade or QS are currently opening or collapsing. */ boolean isExpandingOrCollapsing(); /** * Add a runnable for NotificationPanelView to post when the panel is expanded. * Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java +5 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,11 @@ public final class ShadeControllerImpl implements ShadeController { return mNotificationPanelViewController.isShadeFullyExpanded(); } @Override public boolean isExpandingOrCollapsing() { return mNotificationPanelViewController.isExpandingOrCollapsing(); } @Override public void postOnShadeExpanded(Runnable executable) { mNotificationPanelViewController.addOnGlobalLayoutListener( Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ interface ShadeViewController { fun expandToNotifications() /** Returns whether the shade is expanding or collapsing itself or quick settings. */ val isExpanding: Boolean val isExpandingOrCollapsing: Boolean /** * Returns whether the shade height is greater than zero (i.e. partially or fully expanded), Loading