Ensure mSysUiState update is run on SysUiMain thread

Avoids a race condition by explicitly posting the mSysUiState update within
addOnIsInPipStateChangedListener to the SysUiMain thread.

The previous cross-thread access could cause the
SYSUI_STATE_DISABLE_GESTURE_PIP_ANIMATING flag to be set incorrectly. When
this race condition occurred, the swipe-up gesture for system navigation
would fail to work.

Bug: 421930052
Flag: EXEMPT BUGFIX
Test: Confirm in the code that setting mSysUiState is now done on the SysUiMain thread.
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:9e4eb3d31f3dfab3ee760a1a39efe31f198a6b12
Merged-In: I753bcf8e01681ca18e1b759ffd6bb0e854838dff
Change-Id: I753bcf8e01681ca18e1b759ffd6bb0e854838dff
1 file changed