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

Commit e6f0bbeb 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: Id980c8cc86be2d0529ca690d4062f5170459fc2e
parent 6cf15457
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -83,6 +83,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;

@@ -106,6 +109,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();
@@ -272,6 +276,11 @@ public class HidHostDualModeTest {
        mAdapter.getProfileProxy(mContext, mProfileServiceListener, BluetoothProfile.HEADSET);
        BluetoothHeadset hfpService =
                (BluetoothHeadset) verifyProfileServiceConnected(BluetoothProfile.HEADSET);
        mHidBlockingStub = mBumble.hidBlocking();
        mHidBlockingStub.registerService(
                ServiceRequest.newBuilder()
                        .setServiceType(HidServiceType.SERVICE_TYPE_BOTH)
                        .build());

        AdvertiseRequest request =
                AdvertiseRequest.newBuilder()