Fix a couple of rotation bugs

- device stuck in landscape mode: rotation watcher should not be
unregistered when rotation button is hidden. In the case of launcher
forcing portrait mode, rotation watcher listens to the rotation change
and update the current rotation on the System UI side
- floating rotation button animation timeout: because we attach and
detach the view upon rotation visibility change, posting the callback on
the view is not a good idea. We change it to post on the main thread
instead.

Fixes: 134643704
Test: Open any app in the fully gestural mode, rotate to landscape mode
using the rotation button, and swipe up. Go back to the app and observe
it's opened in the portrait mode.
Test: Previously if user changes the device orientation and presses on
the rotation button in the middle of the animation, and quickly changes
the orientation back, the second rotation button animation duration is
cut short. Now the duration of both animations are the full 5 seconds.

Change-Id: I9b58ef3d284e7366e83ffaa777fd822ed1e0bc23
5 files changed