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

Commit dc62b4bf authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Automerger Merge Worker
Browse files

Merge "Hid Java bumble test case" into main am: 7bdd7465 am: 0b3d441e

parents 1a51c802 0b3d441e
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -236,21 +236,27 @@ public class HidHostTest {
        mFutureConnectionIntent = SettableFuture.create();
        mFutureConnectionIntent = SettableFuture.create();


        mDevice = mBumble.getRemoteDevice();
        mDevice = mBumble.getRemoteDevice();
        mFutureBondIntent = SettableFuture.create();
        assertThat(mDevice.createBond()).isTrue();
        assertThat(mDevice.createBond()).isTrue();
        assertThat(mFutureBondIntent.get()).isEqualTo(BluetoothDevice.BOND_BONDED);


        assertThat(mFutureConnectionIntent.get()).isEqualTo(BluetoothProfile.STATE_CONNECTED);
        if (mA2dpService != null
        if (mA2dpService != null) {
                && mA2dpService.getConnectionPolicy(mDevice)
                        == BluetoothProfile.CONNECTION_POLICY_ALLOWED) {
            assertThat(
            assertThat(
                            mA2dpService.setConnectionPolicy(
                            mA2dpService.setConnectionPolicy(
                                    mDevice, BluetoothProfile.CONNECTION_POLICY_FORBIDDEN))
                                    mDevice, BluetoothProfile.CONNECTION_POLICY_FORBIDDEN))
                    .isTrue();
                    .isTrue();
        }
        }
        if (mHfpService != null) {
        if (mHfpService != null
                && mHfpService.getConnectionPolicy(mDevice)
                        == BluetoothProfile.CONNECTION_POLICY_ALLOWED) {
            assertThat(
            assertThat(
                            mHfpService.setConnectionPolicy(
                            mHfpService.setConnectionPolicy(
                                    mDevice, BluetoothProfile.CONNECTION_POLICY_FORBIDDEN))
                                    mDevice, BluetoothProfile.CONNECTION_POLICY_FORBIDDEN))
                    .isTrue();
                    .isTrue();
        }
        }
        assertThat(mFutureConnectionIntent.get()).isEqualTo(BluetoothProfile.STATE_CONNECTED);
    }
    }


    @After
    @After