Always call onStateChanged/onControlsChanged from the handler thread

InsetsController#mRunningAnimations might be accessed while these
methods are called, and it is not safe to be accessed from multiple
threads.

Fix: 309555866
Test: 1. Swipe to show status bar while watching a video in fullscreen
         in YouTube, and wait for the bar being hidden.
      2. Receive a heads up notification while watching a video in
         fullscreen in YouTube, and wait for the bar being hidden.
      Make sure there is no crash while doing 1 and 2.
Change-Id: Ifdbab981a8e37027a4e017a0050052f3fd8c6a48
1 file changed