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

Commit 3a245a1f authored by Gopi Sakshihally Bhuthaiah's avatar Gopi Sakshihally Bhuthaiah
Browse files

Modified HidHostDualModeTest as per new hid rpc call

Introduced new RPC call to support run time HID and
HOGP service configuration. Modified the HidHostDualModeTest
accordingly

Bug: 368045103
Test: atest -v HidHostDualModeTest
Change-Id: I962094e3fbd8f18447fc701e8eb2465a683f0a39
parent be617061
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ import org.mockito.MockitoAnnotations;
import org.mockito.hamcrest.MockitoHamcrest;
import org.mockito.stubbing.Answer;

import pandora.HIDGrpc;
import pandora.HidProto.HidServiceType;
import pandora.HidProto.ServiceRequest;
import pandora.HostProto.AdvertiseRequest;
import pandora.HostProto.OwnAddressType;

@@ -108,6 +111,7 @@ public class HidHostDualModeTest {
            InstrumentationRegistry.getInstrumentation().getTargetContext();
    private final BluetoothAdapter mAdapter =
            mContext.getSystemService(BluetoothManager.class).getAdapter();
    private HIDGrpc.HIDBlockingStub mHidBlockingStub;

    @Rule(order = 0)
    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
@@ -275,6 +279,11 @@ public class HidHostDualModeTest {
        BluetoothHeadset hfpService =
                (BluetoothHeadset) verifyProfileServiceConnected(BluetoothProfile.HEADSET);

        mHidBlockingStub = mBumble.hidBlocking();
        mHidBlockingStub.registerService(
                ServiceRequest.newBuilder()
                        .setServiceType(HidServiceType.SERVICE_TYPE_BOTH)
                        .build());
        AdvertiseRequest request =
                AdvertiseRequest.newBuilder()
                        .setLegacy(true)