Skip handling recents toggle if a task is locked.

- When a task is locked, the logic will still try to start the recents
  activity (but will fail since it's a lock mode violation).  Nothing
  resets the state, so the button will stop responding.  Instead, skip
  handling of the button until the user unlocks the task.  Also add a
  final fallback for resetting the waiting state, whenever an app
  transition completes.

Bug: 65059121
Test: Launch app after pinning app, tap the recents button, and then
      un-pin and try to re-enter recents.

Change-Id: I0215957f041241b5a61d7fd5b784410368bbd996
2 files changed