DO NOT MERGE: Update ActivityRecordInputSink using the pending transaction

In some cases where finishTransition happens before the pending
transaction is applied, we can end up with a stale state. Subsequent
prepareSurfaces does not fix the issue because the InputWindowHandle is
only applied on changes.

Fix the race by only using pending transactions to apply
ActivityRecordInputSink state changes.

Bug: 332277530
Test: POC from bug
Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9636a50783d9e909b356db8da6e879db5a477929)
Merged-In: If93840ad7b2abbcb48c0c332870c48046c0f8fdc
Change-Id: If93840ad7b2abbcb48c0c332870c48046c0f8fdc
1 file changed