Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +0 −8 Original line number Diff line number Diff line Loading @@ -4716,14 +4716,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd return mIntrinsicPadding; } /** * @return the y position of the first notification */ @ShadeViewRefactor(RefactorComponent.COORDINATOR) public float getNotificationsTopY() { return mTopPadding + getStackTranslation(); } @Override @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public boolean shouldDelayChildPressedState() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +11 −15 Original line number Diff line number Diff line Loading @@ -932,7 +932,7 @@ public class NotificationPanelView extends PanelView implements protected void flingToHeight(float vel, boolean expand, float target, float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { mHeadsUpTouchHelper.notifyFling(!expand); setClosingWithAlphaFadeout(!expand && getFadeoutAlpha() == 1.0f); setClosingWithAlphaFadeout(!expand && !isOnKeyguard() && getFadeoutAlpha() == 1.0f); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); } Loading Loading @@ -2068,8 +2068,11 @@ public class NotificationPanelView extends PanelView implements } private float getFadeoutAlpha() { float alpha = (getNotificationsTopY() + mNotificationStackScroller.getFirstItemMinHeight()) / mQsMinExpansionHeight; float alpha; if (mQsMinExpansionHeight == 0) { return 1.0f; } alpha = getExpandedHeight() / mQsMinExpansionHeight; alpha = Math.max(0, Math.min(alpha, 1)); alpha = (float) Math.pow(alpha, 0.75); return alpha; Loading Loading @@ -2127,18 +2130,18 @@ public class NotificationPanelView extends PanelView implements float alpha; if (mBarState == StatusBarState.KEYGUARD) { // When on Keyguard, we hide the header as soon as the top card of the notification // stack scroller is close enough (collision distance) to the bottom of the header. alpha = getNotificationsTopY() // When on Keyguard, we hide the header as soon as we expanded close enough to the // header alpha = getExpandedHeight() / (mKeyguardStatusBar.getHeight() + mNotificationsHeaderCollideDistance); } else { // In SHADE_LOCKED, the top card is already really close to the header. Hide it as // soon as we start translating the stack. alpha = getNotificationsTopY() / mKeyguardStatusBar.getHeight(); alpha = getExpandedHeight() / mKeyguardStatusBar.getHeight(); } alpha = MathUtils.constrain(alpha, 0, 1); alpha = MathUtils.saturate(alpha); alpha = (float) Math.pow(alpha, 0.75); return alpha; } Loading Loading @@ -2190,13 +2193,6 @@ public class NotificationPanelView extends PanelView implements mBigClockContainer.setAlpha(alpha); } private float getNotificationsTopY() { if (mNotificationStackScroller.getNotGoneChildCount() == 0) { return getExpandedHeight(); } return mNotificationStackScroller.getNotificationsTopY(); } @Override protected void onExpandingStarted() { super.onExpandingStarted(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +0 −8 Original line number Diff line number Diff line Loading @@ -4716,14 +4716,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd return mIntrinsicPadding; } /** * @return the y position of the first notification */ @ShadeViewRefactor(RefactorComponent.COORDINATOR) public float getNotificationsTopY() { return mTopPadding + getStackTranslation(); } @Override @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public boolean shouldDelayChildPressedState() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +11 −15 Original line number Diff line number Diff line Loading @@ -932,7 +932,7 @@ public class NotificationPanelView extends PanelView implements protected void flingToHeight(float vel, boolean expand, float target, float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { mHeadsUpTouchHelper.notifyFling(!expand); setClosingWithAlphaFadeout(!expand && getFadeoutAlpha() == 1.0f); setClosingWithAlphaFadeout(!expand && !isOnKeyguard() && getFadeoutAlpha() == 1.0f); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); } Loading Loading @@ -2068,8 +2068,11 @@ public class NotificationPanelView extends PanelView implements } private float getFadeoutAlpha() { float alpha = (getNotificationsTopY() + mNotificationStackScroller.getFirstItemMinHeight()) / mQsMinExpansionHeight; float alpha; if (mQsMinExpansionHeight == 0) { return 1.0f; } alpha = getExpandedHeight() / mQsMinExpansionHeight; alpha = Math.max(0, Math.min(alpha, 1)); alpha = (float) Math.pow(alpha, 0.75); return alpha; Loading Loading @@ -2127,18 +2130,18 @@ public class NotificationPanelView extends PanelView implements float alpha; if (mBarState == StatusBarState.KEYGUARD) { // When on Keyguard, we hide the header as soon as the top card of the notification // stack scroller is close enough (collision distance) to the bottom of the header. alpha = getNotificationsTopY() // When on Keyguard, we hide the header as soon as we expanded close enough to the // header alpha = getExpandedHeight() / (mKeyguardStatusBar.getHeight() + mNotificationsHeaderCollideDistance); } else { // In SHADE_LOCKED, the top card is already really close to the header. Hide it as // soon as we start translating the stack. alpha = getNotificationsTopY() / mKeyguardStatusBar.getHeight(); alpha = getExpandedHeight() / mKeyguardStatusBar.getHeight(); } alpha = MathUtils.constrain(alpha, 0, 1); alpha = MathUtils.saturate(alpha); alpha = (float) Math.pow(alpha, 0.75); return alpha; } Loading Loading @@ -2190,13 +2193,6 @@ public class NotificationPanelView extends PanelView implements mBigClockContainer.setAlpha(alpha); } private float getNotificationsTopY() { if (mNotificationStackScroller.getNotGoneChildCount() == 0) { return getExpandedHeight(); } return mNotificationStackScroller.getNotificationsTopY(); } @Override protected void onExpandingStarted() { super.onExpandingStarted(); Loading