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

Commit 54cbe9b5 authored by Harry Cutts's avatar Harry Cutts
Browse files

uinput: don't read next line of evemu recording until peek

When EvemuParser "accepts" a line of an evemu recording (i.e. it's found
the line type it was expecting and is ready to process it), it calls
CommentAwareReader#advance() before processing the current line.
advance() was reading the next line of the file, ready for peeking,
even though the current line hadn't been processed yet.

When playing from standard input, this meant that a line wouldn't be
executed until the next one was written, requiring a no-op line to be
added to the end of event recordings. To fix this, only load the next
line when peekLine() is called after the advance().

Test: $ atest --host UinputTestsRavenwood
Test: $ atest InputTests:com.android.test.input.UinputRecordingIntegrationTests
Bug: 367419268
Flag: TEST_ONLY
Change-Id: I69c2cb651cd871ea0ceea9702c66b76abb37285a
parent 79e6e3d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment