Close uhid file and polling thread together
UHID file descriptor is closed by btif_hh in jni thread on disconnection or open failure while the UHID polling thread is closed by bta_hh in the main thread on disconnection. Closing UHID file descriptor without stopping polling thread can result in high battery drain. This change ensures that UHID fd closure is aligned with closing of the polling thread. Bug: 280170626 Test: Regression (cherry picked from https://android-review.googlesource.com/q/commit:5d0360323fc9157397ddfa035e987c1e9c5258ad) Merged-In: I64daa836351f1ab3766947353d7824364eb9530f Change-Id: I64daa836351f1ab3766947353d7824364eb9530f
Showing
- system/bta/hh/bta_hh_act.cc 0 additions, 2 deletionssystem/bta/hh/bta_hh_act.cc
- system/bta/hh/bta_hh_le.cc 1 addition, 2 deletionssystem/bta/hh/bta_hh_le.cc
- system/bta/include/bta_hh_co.h 0 additions, 12 deletionssystem/bta/include/bta_hh_co.h
- system/btif/co/bta_hh_co.cc 82 additions, 75 deletionssystem/btif/co/bta_hh_co.cc
- system/btif/include/btif_hh.h 0 additions, 1 deletionsystem/btif/include/btif_hh.h
- system/btif/src/btif_hh.cc 4 additions, 18 deletionssystem/btif/src/btif_hh.cc
- system/test/mock/mock_btif_co_bta_hh_co.cc 1 addition, 4 deletionssystem/test/mock/mock_btif_co_bta_hh_co.cc
Loading
Please register or sign in to comment