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

Commit 7ef7812c authored by Petr Cermak's avatar Petr Cermak
Browse files

Tear down broadcast receiver in RemoteInputView and SmartReplyView tests

Bug: 73803843
Test: atest RemoteInputViewTest SmartReplyViewTest
Change-Id: Iea933874fd76d445971864c743dd02b20ff1e1e9
parent 6094f7fb
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@ import com.android.systemui.statusbar.ExpandableNotificationRow;
import com.android.systemui.statusbar.NotificationTestHelper;
import com.android.systemui.statusbar.NotificationTestHelper;
import com.android.systemui.statusbar.RemoteInputController;
import com.android.systemui.statusbar.RemoteInputController;


import org.junit.After;
import org.junit.Before;
import org.junit.Before;
import org.junit.Test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runner.RunWith;
@@ -68,6 +69,11 @@ public class RemoteInputViewTest extends SysuiTestCase {
        mView = RemoteInputView.inflate(mContext, null, row.getEntry(), mController);
        mView = RemoteInputView.inflate(mContext, null, row.getEntry(), mController);
    }
    }


    @After
    public void tearDown() {
        mContext.unregisterReceiver(mReceiver);
    }

    @Test
    @Test
    public void testSendRemoteInput_intentContainsResultsAndSource() throws InterruptedException {
    public void testSendRemoteInput_intentContainsResultsAndSource() throws InterruptedException {
        PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0,
        PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0,
+6 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,7 @@ import android.widget.LinearLayout;
import com.android.systemui.R;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.SysuiTestCase;


import org.junit.After;
import org.junit.Before;
import org.junit.Before;
import org.junit.Test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runner.RunWith;
@@ -76,6 +77,11 @@ public class SmartReplyViewTest extends SysuiTestCase {
        mSpacing = res.getDimensionPixelSize(R.dimen.smart_reply_button_spacing);
        mSpacing = res.getDimensionPixelSize(R.dimen.smart_reply_button_spacing);
    }
    }


    @After
    public void tearDown() {
        mContext.unregisterReceiver(mReceiver);
    }

    @Test
    @Test
    public void testSendSmartReply_intentContainsResultsAndSource() throws InterruptedException {
    public void testSendSmartReply_intentContainsResultsAndSource() throws InterruptedException {
        setRepliesFromRemoteInput(TEST_CHOICES);
        setRepliesFromRemoteInput(TEST_CHOICES);