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

Commit ab8ea9f7 authored by Etienne Ruffieux's avatar Etienne Ruffieux
Browse files

Restore AsyncTask Executor after AdapterServiceTests

Bug: 255598188
Test: atest BluetoothInstrumentationTests
Tag: #feature
Ignore-AOSP-First: cherry-pick
Merged-In: Ifab113acfdfa487981c894882f901e537cfd03c9
Change-Id: Ifab113acfdfa487981c894882f901e537cfd03c9
parent 9455efcb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -87,6 +87,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;
@@ -328,6 +329,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)