Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +3 −1 Original line number Diff line number Diff line Loading @@ -1452,7 +1452,8 @@ public class StatusBar extends SystemUI implements DemoMode, @VisibleForTesting protected void updateFooter() { boolean showFooterView = mState != StatusBarState.KEYGUARD && mEntryManager.getNotificationData().getActiveNotifications().size() != 0; && mEntryManager.getNotificationData().getActiveNotifications().size() != 0 && !mRemoteInputManager.getController().isRemoteInputActive(); boolean showDismissView = mClearAllEnabled && mState != StatusBarState.KEYGUARD && hasActiveClearableNotifications(); Loading Loading @@ -2832,6 +2833,7 @@ public class StatusBar extends SystemUI implements DemoMode, boolean remoteInputActive) { mHeadsUpManager.setRemoteInputActive(entry, remoteInputActive); entry.row.notifyHeightChanged(true /* needsAnimation */); updateFooter(); } public void lockScrollTo(NotificationData.Entry entry) { mStackScroller.lockScrollTo(entry.row); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +22 −1 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.RemoteInputController; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; import com.android.systemui.statusbar.notification.VisualStabilityManager; Loading Loading @@ -139,6 +140,8 @@ public class StatusBarTest extends SysuiTestCase { @Mock private NotificationListener mNotificationListener; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private NotificationLockscreenUserManager mLockscreenUserManager; @Mock private NotificationRemoteInputManager mRemoteInputManager; @Mock private RemoteInputController mRemoteInputController; private TestableStatusBar mStatusBar; private FakeMetricsLogger mMetricsLogger; Loading Loading @@ -200,13 +203,14 @@ public class StatusBarTest extends SysuiTestCase { mEntryManager = new TestableNotificationEntryManager(mSystemServicesProxy, mPowerManager, mContext); when(mRemoteInputManager.getController()).thenReturn(mRemoteInputController); mStatusBar = new TestableStatusBar(mStatusBarKeyguardViewManager, mUnlockMethodCache, mKeyguardIndicationController, mStackScroller, mHeadsUpManager, mPowerManager, mNotificationPanelView, mBarService, mNotificationListener, mNotificationLogger, mVisualStabilityManager, mViewHierarchyManager, mEntryManager, mScrimController, mFingerprintUnlockController, mock(ActivityLaunchAnimator.class), mKeyguardViewMediator, mock(NotificationRemoteInputManager.class), mock(NotificationGroupManager.class), mRemoteInputManager, mock(NotificationGroupManager.class), mock(FalsingManager.class), mock(StatusBarWindowManager.class), mock(NotificationIconAreaController.class), mock(DozeScrimController.class), mock(NotificationShelf.class), mLockscreenUserManager, Loading Loading @@ -587,6 +591,23 @@ public class StatusBarTest extends SysuiTestCase { verify(mStackScroller).updateFooterView(false, false); } @Test public void testUpdateFooter_remoteInput() { mStatusBar.setBarStateForTest(StatusBarState.SHADE); ArrayList<Entry> entries = new ArrayList<>(); entries.add(mock(Entry.class)); when(mNotificationData.getActiveNotifications()).thenReturn(entries); ExpandableNotificationRow row = mock(ExpandableNotificationRow.class); when(row.canViewBeDismissed()).thenReturn(true); when(mStackScroller.getChildCount()).thenReturn(1); when(mStackScroller.getChildAt(anyInt())).thenReturn(row); when(mRemoteInputController.isRemoteInputActive()).thenReturn(true); mStatusBar.updateFooter(); verify(mStackScroller).updateFooterView(false, true); } @Test public void testUpdateFooter_oneClearableNotification() { mStatusBar.setBarStateForTest(StatusBarState.SHADE); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +3 −1 Original line number Diff line number Diff line Loading @@ -1452,7 +1452,8 @@ public class StatusBar extends SystemUI implements DemoMode, @VisibleForTesting protected void updateFooter() { boolean showFooterView = mState != StatusBarState.KEYGUARD && mEntryManager.getNotificationData().getActiveNotifications().size() != 0; && mEntryManager.getNotificationData().getActiveNotifications().size() != 0 && !mRemoteInputManager.getController().isRemoteInputActive(); boolean showDismissView = mClearAllEnabled && mState != StatusBarState.KEYGUARD && hasActiveClearableNotifications(); Loading Loading @@ -2832,6 +2833,7 @@ public class StatusBar extends SystemUI implements DemoMode, boolean remoteInputActive) { mHeadsUpManager.setRemoteInputActive(entry, remoteInputActive); entry.row.notifyHeightChanged(true /* needsAnimation */); updateFooter(); } public void lockScrollTo(NotificationData.Entry entry) { mStackScroller.lockScrollTo(entry.row); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +22 −1 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.RemoteInputController; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; import com.android.systemui.statusbar.notification.VisualStabilityManager; Loading Loading @@ -139,6 +140,8 @@ public class StatusBarTest extends SysuiTestCase { @Mock private NotificationListener mNotificationListener; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private NotificationLockscreenUserManager mLockscreenUserManager; @Mock private NotificationRemoteInputManager mRemoteInputManager; @Mock private RemoteInputController mRemoteInputController; private TestableStatusBar mStatusBar; private FakeMetricsLogger mMetricsLogger; Loading Loading @@ -200,13 +203,14 @@ public class StatusBarTest extends SysuiTestCase { mEntryManager = new TestableNotificationEntryManager(mSystemServicesProxy, mPowerManager, mContext); when(mRemoteInputManager.getController()).thenReturn(mRemoteInputController); mStatusBar = new TestableStatusBar(mStatusBarKeyguardViewManager, mUnlockMethodCache, mKeyguardIndicationController, mStackScroller, mHeadsUpManager, mPowerManager, mNotificationPanelView, mBarService, mNotificationListener, mNotificationLogger, mVisualStabilityManager, mViewHierarchyManager, mEntryManager, mScrimController, mFingerprintUnlockController, mock(ActivityLaunchAnimator.class), mKeyguardViewMediator, mock(NotificationRemoteInputManager.class), mock(NotificationGroupManager.class), mRemoteInputManager, mock(NotificationGroupManager.class), mock(FalsingManager.class), mock(StatusBarWindowManager.class), mock(NotificationIconAreaController.class), mock(DozeScrimController.class), mock(NotificationShelf.class), mLockscreenUserManager, Loading Loading @@ -587,6 +591,23 @@ public class StatusBarTest extends SysuiTestCase { verify(mStackScroller).updateFooterView(false, false); } @Test public void testUpdateFooter_remoteInput() { mStatusBar.setBarStateForTest(StatusBarState.SHADE); ArrayList<Entry> entries = new ArrayList<>(); entries.add(mock(Entry.class)); when(mNotificationData.getActiveNotifications()).thenReturn(entries); ExpandableNotificationRow row = mock(ExpandableNotificationRow.class); when(row.canViewBeDismissed()).thenReturn(true); when(mStackScroller.getChildCount()).thenReturn(1); when(mStackScroller.getChildAt(anyInt())).thenReturn(row); when(mRemoteInputController.isRemoteInputActive()).thenReturn(true); mStatusBar.updateFooter(); verify(mStackScroller).updateFooterView(false, true); } @Test public void testUpdateFooter_oneClearableNotification() { mStatusBar.setBarStateForTest(StatusBarState.SHADE); Loading