Only use the transaction to update taskview bg if it can be done synchronously

- Otherwise, there can be a race between applying the given transaction,
  and the update to the transaction running on the view thread.  This
  only affects TaskViews that aren't created on the shell main thread.

Bug: 310802730
Test: atest WMShellUnitTests
Change-Id: Iedce1fb827e4892dba194e2fe5da5d6a868696f9
3 files changed