Fix stuck status bars.

An odd little bit of logic (attempting to defend against
the status bar getting stuck on orientation change) was
ironically causing it to get stuck if the bar was closed
twice in very rapid succession (which can happen if you
manage to click the settings button as the panel is about to

Other tweaks to help defend against this sort of problem in
the future:

- When the screen goes off, immediately collapse the
  notification panel (without animation)
- When completing panel collapse, force the height of the
  expanded view to 0 (in case it ended up some other way by
  this point).
- Reduce a weird little glitch when you start
  animateCollapse() in the middle of a reveal animation.
  (The panel would jump to full height.)

Bug: 6765842
Change-Id: I233467c73e130f64401333319943289cbf3daa56
1 file changed