[DeviceOrientation] Clamp to maximum supported frequency

Currently, the device motion/orientation event pump requests the sensor
data reporting frequency to be 60Hz. However on some devices, this
frequency is larger than the maximum frequency the device can provide.
This CL modifies device event pump code to set the sensor frequency
not exceed the maximum frequency the platform supports.

Bug: 796518
Change-Id: I1cd6215f3b35498482ed3ca26cd9b44d4eb7eb1e
Reviewed-on: https://chromium-review.googlesource.com/879586
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532022}
1 file changed