Correct inotify usage and fix strong count accounting error
Fix an error in polling of inotify fd to avoid 100% CPU usage.
Refactored code to use android Looper.
Fix a string count accounting error that causes unpaired decStrong
crashing sensor hidl service.
Bug: 37719320
Bug: 37714835
Test: no longer have 100% CPU usage.
Test: tested connection of a few mouse/keyboard/usb disk/gnubby
no crash observed.
Test: cts still working properly after fix.
Change-Id: Ibaa026151e5e4919d8dd134c16f5865d5e30ef8a
3 files changed