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

Commit d7404d2e authored by Myles Watson's avatar Myles Watson
Browse files

ProfileServiceTest: Call AdapterService.initNative

Bug: 70585142
Test: runtest bluetooth \
     -c com.android.bluetooth.btservice.ProfileServiceTest
Change-Id: I20977120fcf5e0fa835bd286ef851d92850143ea
parent c35f5abc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2572,9 +2572,9 @@ public class AdapterService extends Service {

    private static native void classInitNative();

    private native boolean initNative();
    native boolean initNative();

    private native void cleanupNative();
    native void cleanupNative();

    /*package*/
    native boolean enableNative(boolean startRestricted);
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,8 @@ public class ProfileServiceTest {

        mProfiles = Config.getSupportedProfiles();

        mMockAdapterService.initNative();

        TestUtils.setAdapterService(mMockAdapterService);

        Assert.assertNotNull(AdapterService.getAdapterService());
@@ -92,6 +94,7 @@ public class ProfileServiceTest {
    @After
    public void tearDown()
            throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        mMockAdapterService.cleanupNative();
        TestUtils.clearAdapterService(mMockAdapterService);
        mMockAdapterService = null;
        mProfiles = null;