Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 848fe733 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Camera2: Check for sequence complete sooner.

It's possible, especially with legacy mode, for a last frame for a
sequence to have already arrived when a repeating sequence is stopped.

In that case, need to check for sequence complete as soon as the
requestId, framenumber pair is added to the pending queue of completions.

Bug: 17428716
Change-Id: Ie5c6ea5a43639c812b8441da326c6303e150fce0
parent 8246e815
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -578,6 +578,9 @@ public class CameraDeviceImpl extends CameraDevice {
            mFrameNumberRequestPairs.add(
            mFrameNumberRequestPairs.add(
                    new SimpleEntry<Long, Integer>(lastFrameNumber,
                    new SimpleEntry<Long, Integer>(lastFrameNumber,
                            requestId));
                            requestId));
            // It is possible that the last frame has already arrived, so we need to check
            // for sequence completion right away
            checkAndFireSequenceComplete();
        }
        }
    }
    }