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

Commit e5734a4b authored by Gopi Sakshihally Bhuthaiah's avatar Gopi Sakshihally Bhuthaiah
Browse files

Added 50ms delay after onSetReport() RPC call

Bug: 378268278
Test: atest -v HidHostTest
Flag: TEST_ONLY
Change-Id: I0a237dedfbae95aae29be9bff6d152480df1cf06
parent 3b15d68f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -662,6 +662,12 @@ public class HidHostTest {
                mHidBlockingStub
                        .withDeadlineAfter(PROTO_MODE_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS)
                        .onSetReport(Empty.getDefaultInstance());

        // Todo: as a workaround added 50ms delay.
        // To be removed once root cause is identified for b/382180335
        final CompletableFuture<Integer> future = new CompletableFuture<>();
        future.completeOnTimeout(null, 50, TimeUnit.MILLISECONDS).join();

        // Keyboard report
        String kbReportData = "010203040506070809";
        mHidService.setReport(mDevice, BluetoothHidHost.REPORT_TYPE_INPUT, kbReportData);