Avoid sending top-resumed gain/loss to client if resume deferred

Defer-resume is enabled while applying WCT. However, it is still
possible starting an Activity in the transaction, i.e.
HIERARCHY_OP_TYPE_PENDING_INTENT. In that case, the focused-app
may be updated while the top-resumed activity is not.

Instead of not updating the top-resumed activity, this CL now only
avoid sending the top-resumed state loss/gain to the client, and
keeps the top-resumed Activity being updated to match the wm
hierarchy.

Bug: 378110725
Test: ActivityTaskSupervisorTests
Flag: EXEMPT bugfix
Change-Id: Ic91bd4b367b2d5d19ad91d86a3e803bea0ff3a04
3 files changed