FloatingActionMode: Avoid calling delayed code if view is inactive.

If something's gone wrong with the floating toolbar's host view while
there is logic posted in a runnable, avoid running that code.

These runnable callbacks are currently removed when the action mode
is finished but the issue we're running into is something else.
Seems like the app doesn't get a chance to call finish when something
went wrong with the view or host activity. Anyway, defend against
this case.

Test: Not able to reproduce the issue. This code is a defensive
fix to prevent reported crashes in GSA. Will keep if the crashes no
longer happen or revert if they continue to happen.
Bug: 29951043
Change-Id: I0e7833b8d8a63bf6205b7035b477bd8a3a7968b2
1 file changed