Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 251118e5 authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

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

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14949618

Change-Id: I95e9348b68e28224d5558f95cd66819b7d247964
parents 55a2fb8d caa61e6c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -648,6 +648,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
                mController.hasActiveClearableNotifications(ROWS_ALL);
        RemoteInputController remoteInputController = mRemoteInputManager.getController();
        boolean showFooterView = (showDismissView || mController.hasActiveNotifications())
                && mEmptyShadeView.getVisibility() == GONE
                && mStatusBarState != StatusBarState.KEYGUARD
                && !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying()
                && (remoteInputController == null || !remoteInputController.isRemoteInputActive());
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.stack;

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_GENTLE;
@@ -316,6 +317,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    public void testUpdateFooter_oneClearableNotification() {
        setBarStateForTest(StatusBarState.SHADE);

        when(mEmptyShadeView.getVisibility()).thenReturn(GONE);
        when(mStackScrollLayoutController.hasActiveClearableNotifications(ROWS_ALL))
                .thenReturn(true);
        when(mStackScrollLayoutController.hasActiveNotifications()).thenReturn(true);
@@ -337,6 +339,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        when(mStackScrollLayoutController.hasActiveNotifications()).thenReturn(true);
        when(mStackScrollLayoutController.hasActiveClearableNotifications(ROWS_ALL))
                .thenReturn(false);
        when(mEmptyShadeView.getVisibility()).thenReturn(GONE);

        FooterView view = mock(FooterView.class);
        mStackScroller.setFooterView(view);