Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +3 −16 Original line number Diff line number Diff line Loading @@ -409,7 +409,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd private final ViewOutlineProvider mOutlineProvider = new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) { if (mAmbientState.isDarkAtAll() || !mShowDarkShelf) { if (mAmbientState.isDarkAtAll()) { float xProgress = mDarkXInterpolator.getInterpolation( (1 - mLinearDarkAmount) * mBackgroundXFactor); outline.setRoundRect(mBackgroundAnimationRect, Loading Loading @@ -507,7 +507,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd /** * If the {@link NotificationShelf} should be visible when dark. */ private boolean mShowDarkShelf; private boolean mAnimateBottomOnLayout; @Inject Loading Loading @@ -1368,8 +1367,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mIsClipped = clipped; } if (!mAmbientPulseManager.hasNotifications() && mAmbientState.isFullyDark() && mShowDarkShelf) { if (!mAmbientPulseManager.hasNotifications() && mAmbientState.isFullyDark()) { setClipBounds(null); } else if (mAmbientState.isDarkAtAll()) { clipToOutline = true; Loading Loading @@ -4723,9 +4721,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd if (mAmbientState.isDark() == dark) { return; } if (!dark) { mShowDarkShelf = false; } mAmbientState.setDark(dark); if (animate && mAnimationsEnabled) { mDarkNeedsAnimation = true; Loading Loading @@ -4787,7 +4782,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd boolean nowDarkAtAll = mAmbientState.isDarkAtAll(); if (nowFullyDark != wasFullyDark) { updateContentHeight(); if (nowFullyDark && mShowDarkShelf) { if (nowFullyDark) { updateDarkShelfVisibility(); } } Loading @@ -4803,14 +4798,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd requestChildrenUpdate(); } /** * If the shelf should be visible when the device is in ambient mode (dozing.) */ @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void showDarkShelf() { mShowDarkShelf = true; } private void updateDarkShelfVisibility() { DozeParameters dozeParameters = DozeParameters.getInstance(mContext); if (dozeParameters.shouldControlScreenOff()) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +0 −3 Original line number Diff line number Diff line Loading @@ -2853,9 +2853,6 @@ public class NotificationPanelView extends PanelView implements if (dozing == mDozing) return; mDozing = dozing; mNotificationStackScroller.setDark(mDozing, animate, wakeUpTouchLocation); if (mDozing) { mNotificationStackScroller.showDarkShelf(); } mKeyguardBottomArea.setDozing(mDozing, animate); if (mBarState == StatusBarState.KEYGUARD Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java +0 −15 Original line number Diff line number Diff line Loading @@ -119,24 +119,9 @@ public class NotificationPanelViewTest extends SysuiTestCase { mNotificationPanelView.setDozing(true /* dozing */, true /* animate */, null /* touch */); InOrder inOrder = inOrder(mNotificationStackScrollLayout, mStatusBarStateController); inOrder.verify(mNotificationStackScrollLayout).setDark(eq(true), eq(true), eq(null)); inOrder.verify(mNotificationStackScrollLayout).showDarkShelf(); inOrder.verify(mStatusBarStateController).setDozeAmount(eq(1f), eq(true)); } @Test public void testSetDozing_showsDarkShelfWithDefaultClock() { when(mKeyguardStatusView.hasCustomClock()).thenReturn(false); mNotificationPanelView.setDozing(true /* dozing */, true /* animate */, null /* touch */); verify(mNotificationStackScrollLayout).showDarkShelf(); } @Test public void testSetDozing_showsDarkShelfWhenCustomClock() { when(mKeyguardStatusView.hasCustomClock()).thenReturn(true); mNotificationPanelView.setDozing(true /* dozing */, true /* animate */, null /* touch */); verify(mNotificationStackScrollLayout).showDarkShelf(); } @Test public void testSetExpandedHeight() { mNotificationPanelView.setExpandedHeight(200); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +3 −16 Original line number Diff line number Diff line Loading @@ -409,7 +409,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd private final ViewOutlineProvider mOutlineProvider = new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) { if (mAmbientState.isDarkAtAll() || !mShowDarkShelf) { if (mAmbientState.isDarkAtAll()) { float xProgress = mDarkXInterpolator.getInterpolation( (1 - mLinearDarkAmount) * mBackgroundXFactor); outline.setRoundRect(mBackgroundAnimationRect, Loading Loading @@ -507,7 +507,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd /** * If the {@link NotificationShelf} should be visible when dark. */ private boolean mShowDarkShelf; private boolean mAnimateBottomOnLayout; @Inject Loading Loading @@ -1368,8 +1367,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mIsClipped = clipped; } if (!mAmbientPulseManager.hasNotifications() && mAmbientState.isFullyDark() && mShowDarkShelf) { if (!mAmbientPulseManager.hasNotifications() && mAmbientState.isFullyDark()) { setClipBounds(null); } else if (mAmbientState.isDarkAtAll()) { clipToOutline = true; Loading Loading @@ -4723,9 +4721,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd if (mAmbientState.isDark() == dark) { return; } if (!dark) { mShowDarkShelf = false; } mAmbientState.setDark(dark); if (animate && mAnimationsEnabled) { mDarkNeedsAnimation = true; Loading Loading @@ -4787,7 +4782,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd boolean nowDarkAtAll = mAmbientState.isDarkAtAll(); if (nowFullyDark != wasFullyDark) { updateContentHeight(); if (nowFullyDark && mShowDarkShelf) { if (nowFullyDark) { updateDarkShelfVisibility(); } } Loading @@ -4803,14 +4798,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd requestChildrenUpdate(); } /** * If the shelf should be visible when the device is in ambient mode (dozing.) */ @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void showDarkShelf() { mShowDarkShelf = true; } private void updateDarkShelfVisibility() { DozeParameters dozeParameters = DozeParameters.getInstance(mContext); if (dozeParameters.shouldControlScreenOff()) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +0 −3 Original line number Diff line number Diff line Loading @@ -2853,9 +2853,6 @@ public class NotificationPanelView extends PanelView implements if (dozing == mDozing) return; mDozing = dozing; mNotificationStackScroller.setDark(mDozing, animate, wakeUpTouchLocation); if (mDozing) { mNotificationStackScroller.showDarkShelf(); } mKeyguardBottomArea.setDozing(mDozing, animate); if (mBarState == StatusBarState.KEYGUARD Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java +0 −15 Original line number Diff line number Diff line Loading @@ -119,24 +119,9 @@ public class NotificationPanelViewTest extends SysuiTestCase { mNotificationPanelView.setDozing(true /* dozing */, true /* animate */, null /* touch */); InOrder inOrder = inOrder(mNotificationStackScrollLayout, mStatusBarStateController); inOrder.verify(mNotificationStackScrollLayout).setDark(eq(true), eq(true), eq(null)); inOrder.verify(mNotificationStackScrollLayout).showDarkShelf(); inOrder.verify(mStatusBarStateController).setDozeAmount(eq(1f), eq(true)); } @Test public void testSetDozing_showsDarkShelfWithDefaultClock() { when(mKeyguardStatusView.hasCustomClock()).thenReturn(false); mNotificationPanelView.setDozing(true /* dozing */, true /* animate */, null /* touch */); verify(mNotificationStackScrollLayout).showDarkShelf(); } @Test public void testSetDozing_showsDarkShelfWhenCustomClock() { when(mKeyguardStatusView.hasCustomClock()).thenReturn(true); mNotificationPanelView.setDozing(true /* dozing */, true /* animate */, null /* touch */); verify(mNotificationStackScrollLayout).showDarkShelf(); } @Test public void testSetExpandedHeight() { mNotificationPanelView.setExpandedHeight(200); Loading