OSDN Git Service

Improve transient bar transitions.
authorJohn Spurlock <jspurlock@google.com>
Tue, 20 Aug 2013 19:13:47 +0000 (15:13 -0400)
committerJohn Spurlock <jspurlock@google.com>
Tue, 20 Aug 2013 19:37:03 +0000 (15:37 -0400)
commit5b9145bf990a9bbf4fdef1739e61ff8c70ec868f
treec5236d3ccb4ea8f305064cf302861679ad7fa8e7
parentf01f1e9b9e6b9ced969d79489619947fd5fedcbe
Improve transient bar transitions.

1. If app clears transient flag w/ a gesture, the touch-outside
listener would always win, causing an unsightly hide + immediate
reshow.  Instead, give the app some time to clear the flag, then
perform a smooth transition in place.

2. When the transient bars are hidden, we do not know ahead of time
which background will be used on reshow (if transient bars are
revealed, the background is semi-transparent, if transient bars
are cleared, the background is opaque).  Window manager is responsible
for showing windows, but sysui is responsible for setting the view
background.  Therefore, we need some level of coordination between
the two in this case.  Introduce two new non-public sysui flags
that represent the window manager's request to reshow the hidden
bars, but do not reshow until sysui acknowledges (by clearing the flag).
This gives sysui whatever time is necessary to prepare itself for
reshow, avoiding unsightly blip from opaque -> transparent during
the enter animation.

3. When both system bars are hidden, any low-profile changes are
moot.  Avoid unsightly low-profile animations during bar reshow
by suppressing the flag in this case.

4. Improve transient bar home -> launcher transition by cancelling
the -> opaque animation.  This also fixes a bug where hitting
home from the transient bar would leave you with a semi-transparent
bar in a non-transient state.

Bug:10284800
Change-Id: I238210561d8d5f70c1a517283b986c9105a1ec75
core/java/android/app/StatusBarManager.java
core/java/android/view/View.java
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
policy/src/com/android/internal/policy/impl/BarController.java
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java