Loading packages/SystemUI/tests/src/com/android/systemui/dump/LogBufferHelper.kt +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import com.android.systemui.log.LogcatEchoTracker /** * Creates a LogBuffer that will echo everything to logcat, which is useful for debugging tests. */ @JvmOverloads fun logcatLogBuffer(name: String = "EchoToLogcatLogBuffer") = LogBuffer(name, 50, LogcatEchoTrackerAlways()) Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.shade; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static com.android.keyguard.KeyguardClockSwitch.LARGE; import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer; import static com.google.common.truth.Truth.assertThat; Loading Loading @@ -221,7 +222,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; @Mock protected KeyguardStateController mKeyguardStateController; @Mock protected DozeLog mDozeLog; @Mock protected ShadeLogger mShadeLog; private final ShadeLogger mShadeLog = new ShadeLogger(logcatLogBuffer()); @Mock protected CommandQueue mCommandQueue; @Mock protected VibratorHelper mVibratorHelper; @Mock protected LatencyTracker mLatencyTracker; Loading Loading @@ -309,7 +310,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected MotionEvent mDownMotionEvent; @Mock protected CoroutineDispatcher mMainDispatcher; @Mock protected KeyguardSliceViewController mKeyguardSliceViewController; @Mock protected KeyguardLogger mKeyguardLogger; private final KeyguardLogger mKeyguardLogger = new KeyguardLogger(logcatLogBuffer()); @Mock protected KeyguardStatusView mKeyguardStatusView; @Captor protected ArgumentCaptor<NotificationStackScrollLayout.OnEmptySpaceClickListener> Loading Loading @@ -518,7 +519,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mKeyguardBypassController, mDozeParameters, mScreenOffAnimationController, mock(NotificationWakeUpCoordinatorLogger.class)); new NotificationWakeUpCoordinatorLogger(logcatLogBuffer())); mConfigurationController = new ConfigurationControllerImpl(mContext); PulseExpansionHandler expansionHandler = new PulseExpansionHandler( mContext, Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar; import static android.app.Notification.FLAG_FSI_REQUESTED_BUT_DENIED; import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer; import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_CONTRACTED; import static junit.framework.Assert.assertFalse; Loading @@ -45,7 +46,6 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.HeadsUpManagerLogger; import org.junit.After; Loading Loading @@ -88,7 +88,7 @@ public class AlertingNotificationManagerTest extends SysuiTestCase { private AlertEntry mLastCreatedEntry; private TestableAlertingNotificationManager(Handler handler) { super(mock(HeadsUpManagerLogger.class), handler); super(new HeadsUpManagerLogger(logcatLogBuffer()), handler); mMinimumDisplayTime = TEST_MINIMUM_DISPLAY_TIME; mStickyDisplayTime = TEST_STICKY_DISPLAY_TIME; mAutoDismissNotificationDecay = TEST_AUTO_DISMISS_TIME; Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.statusbar; import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer; import static junit.framework.Assert.assertTrue; import static org.mockito.Mockito.mock; Loading Loading @@ -82,9 +84,9 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase { mPowerInteractor, mStateController, mRemoteInputUriController, mock(RemoteInputControllerLogger.class), new RemoteInputControllerLogger(logcatLogBuffer()), mClickNotifier, mock(ActionClickLogger.class), new ActionClickLogger(logcatLogBuffer()), mock(DumpManager.class)); mEntry = new NotificationEntryBuilder() .setPkg(TEST_PACKAGE_NAME) Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt +2 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import androidx.core.animation.AnimatorTestRule import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.dump.DumpManager import com.android.systemui.dump.logcatLogBuffer import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.shade.ShadeViewController.Companion.WAKEUP_ANIMATION_DELAY_MS import com.android.systemui.statusbar.StatusBarState Loading Loading @@ -59,7 +60,7 @@ class NotificationWakeUpCoordinatorTest : SysuiTestCase() { private val bypassController: KeyguardBypassController = mock() private val dozeParameters: DozeParameters = mock() private val screenOffAnimationController: ScreenOffAnimationController = mock() private val logger: NotificationWakeUpCoordinatorLogger = mock() private val logger = NotificationWakeUpCoordinatorLogger(logcatLogBuffer()) private val stackScrollerController: NotificationStackScrollLayoutController = mock() private val wakeUpListener: NotificationWakeUpCoordinator.WakeUpListener = mock() Loading Loading
packages/SystemUI/tests/src/com/android/systemui/dump/LogBufferHelper.kt +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import com.android.systemui.log.LogcatEchoTracker /** * Creates a LogBuffer that will echo everything to logcat, which is useful for debugging tests. */ @JvmOverloads fun logcatLogBuffer(name: String = "EchoToLogcatLogBuffer") = LogBuffer(name, 50, LogcatEchoTrackerAlways()) Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.shade; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static com.android.keyguard.KeyguardClockSwitch.LARGE; import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer; import static com.google.common.truth.Truth.assertThat; Loading Loading @@ -221,7 +222,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; @Mock protected KeyguardStateController mKeyguardStateController; @Mock protected DozeLog mDozeLog; @Mock protected ShadeLogger mShadeLog; private final ShadeLogger mShadeLog = new ShadeLogger(logcatLogBuffer()); @Mock protected CommandQueue mCommandQueue; @Mock protected VibratorHelper mVibratorHelper; @Mock protected LatencyTracker mLatencyTracker; Loading Loading @@ -309,7 +310,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected MotionEvent mDownMotionEvent; @Mock protected CoroutineDispatcher mMainDispatcher; @Mock protected KeyguardSliceViewController mKeyguardSliceViewController; @Mock protected KeyguardLogger mKeyguardLogger; private final KeyguardLogger mKeyguardLogger = new KeyguardLogger(logcatLogBuffer()); @Mock protected KeyguardStatusView mKeyguardStatusView; @Captor protected ArgumentCaptor<NotificationStackScrollLayout.OnEmptySpaceClickListener> Loading Loading @@ -518,7 +519,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mKeyguardBypassController, mDozeParameters, mScreenOffAnimationController, mock(NotificationWakeUpCoordinatorLogger.class)); new NotificationWakeUpCoordinatorLogger(logcatLogBuffer())); mConfigurationController = new ConfigurationControllerImpl(mContext); PulseExpansionHandler expansionHandler = new PulseExpansionHandler( mContext, Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar; import static android.app.Notification.FLAG_FSI_REQUESTED_BUT_DENIED; import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer; import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_CONTRACTED; import static junit.framework.Assert.assertFalse; Loading @@ -45,7 +46,6 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.HeadsUpManagerLogger; import org.junit.After; Loading Loading @@ -88,7 +88,7 @@ public class AlertingNotificationManagerTest extends SysuiTestCase { private AlertEntry mLastCreatedEntry; private TestableAlertingNotificationManager(Handler handler) { super(mock(HeadsUpManagerLogger.class), handler); super(new HeadsUpManagerLogger(logcatLogBuffer()), handler); mMinimumDisplayTime = TEST_MINIMUM_DISPLAY_TIME; mStickyDisplayTime = TEST_STICKY_DISPLAY_TIME; mAutoDismissNotificationDecay = TEST_AUTO_DISMISS_TIME; Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.statusbar; import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer; import static junit.framework.Assert.assertTrue; import static org.mockito.Mockito.mock; Loading Loading @@ -82,9 +84,9 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase { mPowerInteractor, mStateController, mRemoteInputUriController, mock(RemoteInputControllerLogger.class), new RemoteInputControllerLogger(logcatLogBuffer()), mClickNotifier, mock(ActionClickLogger.class), new ActionClickLogger(logcatLogBuffer()), mock(DumpManager.class)); mEntry = new NotificationEntryBuilder() .setPkg(TEST_PACKAGE_NAME) Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt +2 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import androidx.core.animation.AnimatorTestRule import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.dump.DumpManager import com.android.systemui.dump.logcatLogBuffer import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.shade.ShadeViewController.Companion.WAKEUP_ANIMATION_DELAY_MS import com.android.systemui.statusbar.StatusBarState Loading Loading @@ -59,7 +60,7 @@ class NotificationWakeUpCoordinatorTest : SysuiTestCase() { private val bypassController: KeyguardBypassController = mock() private val dozeParameters: DozeParameters = mock() private val screenOffAnimationController: ScreenOffAnimationController = mock() private val logger: NotificationWakeUpCoordinatorLogger = mock() private val logger = NotificationWakeUpCoordinatorLogger(logcatLogBuffer()) private val stackScrollerController: NotificationStackScrollLayoutController = mock() private val wakeUpListener: NotificationWakeUpCoordinator.WakeUpListener = mock() Loading