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

Commit acb22cf8 authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Maybe avoid NPE in tear down" into main

parents 992914b9 f742c599
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -204,8 +204,6 @@ import com.android.wm.shell.taskview.TaskViewRepository;
import com.android.wm.shell.taskview.TaskViewTransitions;
import com.android.wm.shell.transition.Transitions;

import kotlin.Lazy;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -216,9 +214,6 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;

import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
import platform.test.runner.parameterized.Parameters;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -227,6 +222,10 @@ import java.util.List;
import java.util.Optional;
import java.util.concurrent.Executor;

import kotlin.Lazy;
import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
import platform.test.runner.parameterized.Parameters;

@SmallTest
@RunWith(ParameterizedAndroidJunit4.class)
@TestableLooper.RunWithLooper(setAsMainLooper = true)
@@ -609,11 +608,13 @@ public class BubblesTest extends SysuiTestCase {

    @After
    public void tearDown() throws Exception {
        if (mBubbleData != null) {
            ArrayList<Bubble> bubbles = new ArrayList<>(mBubbleData.getBubbles());
            for (int i = 0; i < bubbles.size(); i++) {
                mBubbleController.removeBubble(bubbles.get(i).getKey(),
                        Bubbles.DISMISS_NO_LONGER_BUBBLE);
            }
        }
        mTestableLooper.processAllMessages();

        // check that no animations are running before finishing the test to make sure that the