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

Commit 01032333 authored by Hieu Dang's avatar Hieu Dang Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE on BluetoothOppServiceTest" into main am: 7e982e5d

parents 64a6edfd 7e982e5d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;


@MediumTest
@RunWith(AndroidJUnit4.class)
public class BluetoothOppServiceTest {
@@ -90,7 +89,11 @@ public class BluetoothOppServiceTest {
        // Since the update thread is not run (we mocked it), it will not clean itself on interrupt
        // (normally, the service will wait for the update thread to clean itself after
        // being interrupted). We clean it manually here
        mService.mUpdateThread = null;
        BluetoothOppService service = mService;
        if (service != null) {
            service.mUpdateThread = null;
        }

        BluetoothMethodProxy.setInstanceForTesting(null);
        TestUtils.stopService(mServiceRule, BluetoothOppService.class);
        TestUtils.clearAdapterService(mAdapterService);
@@ -188,4 +191,3 @@ public class BluetoothOppServiceTest {
                        any());
    }
}
 No newline at end of file