From the latest documentation,
boolean registerListener (SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs)
Registers a SensorEventListener for the given sensor at the given sampling frequency and the given maximum reporting latency.
This function is similar to registerListener(SensorEventListener, Sensor, int) but it allows events to stay temporarily in the hardware FIFO (queue) before being delivered. The events can be stored in the hardware FIFO up to maxReportLatencyUs microseconds. Once one of the events in the FIFO needs to be reported, all of the events in the FIFO are reported sequentially. This means that some events will be reported before the maximum reporting latency has elapsed.
When maxReportLatencyUs is 0, the call is equivalent to a call to registerListener(SensorEventListener, Sensor, int), as it requires the events to be delivered as soon as possible.
When sensor.maxFifoEventCount() is 0, the sensor does not use a FIFO, so the call will also be equivalent to registerListener(SensorEventListener, Sensor, int).
Setting maxReportLatencyUs to a positive value allows to reduce the number of interrupts the AP (Application Processor) receives, hence reducing power consumption, as the AP can switch to a lower power state while the sensor is capturing the data. This is especially important when registering to wake-up sensors, for which each interrupt causes the AP to wake up if it was in suspend mode. See isWakeUpSensor() for more information on wake-up sensors.
Assuming the system respects to samplingPeriodUs
and the sensor uses a FIFO,
Is the actual report interval of registerListener(listener, sensor, 200000, 200000)
400000us?
Can registerListener(listener, sensor, 200000, 190000)
reduce the number of interrupts the AP (Application Processor) receives, hence reducing power consumption?
How do you compute 400000us?
The samplingPeriodUs is the period when the sensor stores a sample in the hardware FIFO (Just a hint but typically values sensed within a small variation) without waking up the CPU.
The maxReportLatencyUs is the interval when the sensor delivers the stored samples to the listener by calling onSensorChanged() repeatedly in a burst. It is necessary for the sensor to be a wake-up sensor or the wakelock is held in ahead before reporting.
Therefore to your questions, A1: Every 200000us, you may get one reported sample in the event. A2: Every 190000us, it is reported only if there are stored samples. Since your maxReportLatencyUs < samplingPeriodUs, there could be no reporting for no samples in the FIFO. So yes, the CPU is notified nearly every 190000us and can sleep in the interval.