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
Loading
Please register or sign in to comment