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

Commit 8e8738a1 authored by Etienne Ruffieux's avatar Etienne Ruffieux
Browse files

Restore AsyncTask Executor after AdapterServiceTests

Bug: 255598188
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: Ifab113acfdfa487981c894882f901e537cfd03c9
parent 00292aec
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ import com.android.internal.app.IBatteryStats;
import libcore.util.HexEncoding;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -342,6 +343,11 @@ public class AdapterServiceTest {
        mAdapterService.cleanup();
    }

    @AfterClass
    public static void tearDownOnce() {
        AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    }

    private void verifyStateChange(int prevState, int currState, int callNumber, int timeoutMs) {
        try {
            verify(mIBluetoothCallback, timeout(timeoutMs)