Merge "Hide footer for empty shade even if bubbles are present" into sc-dev

This commit is contained in:
Lyn Han
2021-06-17 23:25:33 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 0 deletions

View File

@@ -648,6 +648,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
mController.hasActiveClearableNotifications(ROWS_ALL); mController.hasActiveClearableNotifications(ROWS_ALL);
RemoteInputController remoteInputController = mRemoteInputManager.getController(); RemoteInputController remoteInputController = mRemoteInputManager.getController();
boolean showFooterView = (showDismissView || mController.hasActiveNotifications()) boolean showFooterView = (showDismissView || mController.hasActiveNotifications())
&& mEmptyShadeView.getVisibility() == GONE
&& mStatusBarState != StatusBarState.KEYGUARD && mStatusBarState != StatusBarState.KEYGUARD
&& !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying() && !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying()
&& (remoteInputController == null || !remoteInputController.isRemoteInputActive()); && (remoteInputController == null || !remoteInputController.isRemoteInputActive());

View File

@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.stack; package com.android.systemui.statusbar.notification.stack;
import static android.provider.Settings.Secure.NOTIFICATION_HISTORY_ENABLED; import static android.provider.Settings.Secure.NOTIFICATION_HISTORY_ENABLED;
import static android.view.View.GONE;
import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL;
import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_GENTLE; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_GENTLE;
@@ -316,6 +317,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
public void testUpdateFooter_oneClearableNotification() { public void testUpdateFooter_oneClearableNotification() {
setBarStateForTest(StatusBarState.SHADE); setBarStateForTest(StatusBarState.SHADE);
when(mEmptyShadeView.getVisibility()).thenReturn(GONE);
when(mStackScrollLayoutController.hasActiveClearableNotifications(ROWS_ALL)) when(mStackScrollLayoutController.hasActiveClearableNotifications(ROWS_ALL))
.thenReturn(true); .thenReturn(true);
when(mStackScrollLayoutController.hasActiveNotifications()).thenReturn(true); when(mStackScrollLayoutController.hasActiveNotifications()).thenReturn(true);
@@ -337,6 +339,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
when(mStackScrollLayoutController.hasActiveNotifications()).thenReturn(true); when(mStackScrollLayoutController.hasActiveNotifications()).thenReturn(true);
when(mStackScrollLayoutController.hasActiveClearableNotifications(ROWS_ALL)) when(mStackScrollLayoutController.hasActiveClearableNotifications(ROWS_ALL))
.thenReturn(false); .thenReturn(false);
when(mEmptyShadeView.getVisibility()).thenReturn(GONE);
FooterView view = mock(FooterView.class); FooterView view = mock(FooterView.class);
mStackScroller.setFooterView(view); mStackScroller.setFooterView(view);