Access mInputDevices with a lock

Before this CL, 'mInputDevices' was GUARDED_BY mLock, but for some
reason, those thread safety annotations weren't working.

This only got noticed after I added a debug print to the body of the
function 'getInputDevices'.

This appears to be a bug with thread safety annotations.

Still, the fix here is correct and needed.

Bug: 296235458
Test: atest inputflinger_tests
Change-Id: I0ae8cc7791e2042e47719ecd5a8ca00b4147be87
2 files changed