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

Commit cde9b32d authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Remove flag break_uhid_polling_early

Change-Id: Id591d40607f2b70b37e130495f4b840609edbfe1
Test: mmm packages/modules/Bluetooth
Flag: com.android.bluetooth.flags.break_uhid_polling_early
Bug: 319846147
parent 8b6cab9e
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
package: "com.android.bluetooth.flags"
container: "com.android.btservices"

flag {
    name: "break_uhid_polling_early"
    namespace: "bluetooth"
    description: "Break from UHID polling early if HID host disconnects"
    bug: "319846147"
}

flag {
    name: "allow_switching_hid_and_hogp"
    is_exported: true
+1 −9
Original line number Diff line number Diff line
@@ -553,8 +553,7 @@ static int uhid_fd_poll(btif_hh_uhid_t* p_uhid, struct pollfd* pfds, int nfds) {
  int counter = 0;

  do {
    if (com::android::bluetooth::flags::break_uhid_polling_early() &&
        !com::android::bluetooth::flags::hid_report_queuing() && !p_uhid->hh_keep_polling) {
    if (!com::android::bluetooth::flags::hid_report_queuing() && !p_uhid->hh_keep_polling) {
      log::debug("Polling stopped");
      return -1;
    }
@@ -570,13 +569,6 @@ static int uhid_fd_poll(btif_hh_uhid_t* p_uhid, struct pollfd* pfds, int nfds) {
    ret = poll(pfds, nfds, uhid_poll_timeout);
  } while (ret == -1 && errno == EINTR);

  if (!com::android::bluetooth::flags::break_uhid_polling_early()) {
    if (ret == 0) {
      log::verbose("Polling timed out, attempt to read (old behavior)");
      return 1;
    }
  }

  return ret;
}