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

Commit 7e982e5d authored by Hieu Dang's avatar Hieu Dang Committed by Gerrit Code Review
Browse files

Merge "Fix NPE on BluetoothOppServiceTest" into main

parents 407799cf 6b63d581
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