Workaround for handling the restart of an already visible task

- If a task is already visible, then startActivity is a no-op and the
  remote transition that launcher expects to run is not started. As a
  workaround (until restarts are an actual transition), listen for
  the case where a task is restarted and invoke the end callbacks

Fixes: 286016555
Test: Repro steps on the bug
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:57c2a79e47bc583306bd77ea3039d821a8d33dde)
Merged-In: Iec3ab97c8817a5e95399cec90f891d65f369d234
Change-Id: Iec3ab97c8817a5e95399cec90f891d65f369d234
3 files changed