Although the mag modules in the daemon were limited to 20hz, the HAL
was announcing 50hz. Fix the HAL value so that it matches the daemon
implementation
android.hardware.cts.SingleSensorTests#testMagneticFieldUncalibrated_100hz,
testMagneticFieldUncalibrated_100hz, testMagneticFieldUncalibrated_25hz,
testMagneticFieldUncalibrated_50hz, testMagneticFieldUncalibrated_fastest,
testMagneticField_100hz, testMagneticField_200hz, testMagneticField_25hz,
testMagneticField_fastest
Ref CRACKLING-962
Change-Id: Ia74473d72b2275a3f86e3ff4735b89fd89ddd294
Flushing a pending batch of requested events is blocking for several
causes. The readEvents API call wasn't properly returning the state
of the pendings, and even after that's corrected we were still blocking
on the input reader _after_ filling out the pending requests.
While we're at it, follow the CDD recommendation synchronize with
SystemClock.elapsedRealtimeNano() clock. Replace the monotonic time
with boot time as reference time.
Fixes android.hardware.cts.SensorTest#testBatchAndFlush, addresses
CRACKLING-641
Change-Id: Iae460f503e1ad408a0cb7855000daabec414a459