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

Commit ac0bcdea authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Explicitly attach before detach

To attempt to reduce flakes

Test: NotificationTemplateViewWrapperTest
Flag: EXEMPT bug fix
Bug: 402229212
Change-Id: Ie2c12185897d959a1dd889f80881bf9e6a0fc4e1
parent df92d35d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ class NotificationTemplateViewWrapperTest : SysuiTestCase() {

    @Test
    fun actionViewDetached_pendingIntentListenersDeregistered() {
        ViewUtils.detachView(root)
        val pi =
            PendingIntent.getActivity(
                mContext,
@@ -182,6 +183,9 @@ class NotificationTemplateViewWrapperTest : SysuiTestCase() {
        createActionWithPendingIntent(spy)
        val wrapper = NotificationTemplateViewWrapper(mContext, view, row)
        wrapper.onContentUpdated(row)
        ViewUtils.attachView(root)
        looper.processAllMessages()

        ViewUtils.detachView(root)
        looper.processAllMessages()