Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −4 Original line number Diff line number Diff line Loading @@ -1130,6 +1130,8 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationIconAreaController.onDensityOrFontScaleChanged(mContext); mHeadsUpManager.onDensityOrFontScaleChanged(); inflateFooterView(); inflateEmptyShadeView(); reevaluateStyles(); } Loading Loading @@ -1158,10 +1160,8 @@ public class StatusBar extends SystemUI implements DemoMode, } } protected void reevaluateStyles() { inflateFooterView(); private void reevaluateStyles() { updateFooter(); inflateEmptyShadeView(); updateEmptyShadeView(); } Loading @@ -1182,7 +1182,8 @@ public class StatusBar extends SystemUI implements DemoMode, mStackScroller.setEmptyShadeView(mEmptyShadeView); } private void inflateFooterView() { @VisibleForTesting protected void inflateFooterView() { if (mStackScroller == null) { return; } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +9 −2 Original line number Diff line number Diff line Loading @@ -597,7 +597,7 @@ public class StatusBarTest extends SysuiTestCase { @Test public void testInflateFooterView() { mStatusBar.reevaluateStyles(); mStatusBar.inflateFooterView(); ArgumentCaptor<FooterView> captor = ArgumentCaptor.forClass(FooterView.class); verify(mStackScroller).setFooterView(captor.capture()); Loading Loading @@ -661,7 +661,7 @@ public class StatusBarTest extends SysuiTestCase { @Test public void testUpdateFooter_atEnd() { // add footer mStatusBar.reevaluateStyles(); mStatusBar.inflateFooterView(); // add notification ExpandableNotificationRow row = mock(ExpandableNotificationRow.class); Loading Loading @@ -700,6 +700,13 @@ public class StatusBarTest extends SysuiTestCase { assertTrue(mStatusBar.mState == StatusBarState.FULLSCREEN_USER_SWITCHER); } @Test public void testOnDensityOrFontScaleChanged_reInflatesFooterViews() { mStatusBar.onDensityOrFontScaleChanged(); verify(mStackScroller).setFooterView(any()); verify(mStackScroller).setEmptyShadeView(any()); } static class TestableStatusBar extends StatusBar { public TestableStatusBar(StatusBarKeyguardViewManager man, UnlockMethodCache unlock, KeyguardIndicationController key, Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −4 Original line number Diff line number Diff line Loading @@ -1130,6 +1130,8 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationIconAreaController.onDensityOrFontScaleChanged(mContext); mHeadsUpManager.onDensityOrFontScaleChanged(); inflateFooterView(); inflateEmptyShadeView(); reevaluateStyles(); } Loading Loading @@ -1158,10 +1160,8 @@ public class StatusBar extends SystemUI implements DemoMode, } } protected void reevaluateStyles() { inflateFooterView(); private void reevaluateStyles() { updateFooter(); inflateEmptyShadeView(); updateEmptyShadeView(); } Loading @@ -1182,7 +1182,8 @@ public class StatusBar extends SystemUI implements DemoMode, mStackScroller.setEmptyShadeView(mEmptyShadeView); } private void inflateFooterView() { @VisibleForTesting protected void inflateFooterView() { if (mStackScroller == null) { return; } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +9 −2 Original line number Diff line number Diff line Loading @@ -597,7 +597,7 @@ public class StatusBarTest extends SysuiTestCase { @Test public void testInflateFooterView() { mStatusBar.reevaluateStyles(); mStatusBar.inflateFooterView(); ArgumentCaptor<FooterView> captor = ArgumentCaptor.forClass(FooterView.class); verify(mStackScroller).setFooterView(captor.capture()); Loading Loading @@ -661,7 +661,7 @@ public class StatusBarTest extends SysuiTestCase { @Test public void testUpdateFooter_atEnd() { // add footer mStatusBar.reevaluateStyles(); mStatusBar.inflateFooterView(); // add notification ExpandableNotificationRow row = mock(ExpandableNotificationRow.class); Loading Loading @@ -700,6 +700,13 @@ public class StatusBarTest extends SysuiTestCase { assertTrue(mStatusBar.mState == StatusBarState.FULLSCREEN_USER_SWITCHER); } @Test public void testOnDensityOrFontScaleChanged_reInflatesFooterViews() { mStatusBar.onDensityOrFontScaleChanged(); verify(mStackScroller).setFooterView(any()); verify(mStackScroller).setEmptyShadeView(any()); } static class TestableStatusBar extends StatusBar { public TestableStatusBar(StatusBarKeyguardViewManager man, UnlockMethodCache unlock, KeyguardIndicationController key, Loading