diff options
| author | John Spurlock <jspurlock@google.com> | 2013-08-20 15:13:47 -0400 |
|---|---|---|
| committer | John Spurlock <jspurlock@google.com> | 2013-08-20 15:37:03 -0400 |
| commit | 5b9145bf990a9bbf4fdef1739e61ff8c70ec868f (patch) | |
| tree | c5236d3ccb4ea8f305064cf302861679ad7fa8e7 /core/java/android/app/StatusBarManager.java | |
| parent | f01f1e9b9e6b9ced969d79489619947fd5fedcbe (diff) | |
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
Diffstat (limited to 'core/java/android/app/StatusBarManager.java')
| -rw-r--r-- | core/java/android/app/StatusBarManager.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java index 1acac851121b..7bcf43eb8d03 100644 --- a/core/java/android/app/StatusBarManager.java +++ b/core/java/android/app/StatusBarManager.java @@ -66,8 +66,9 @@ public class StatusBarManager { public static final int WINDOW_STATUS_BAR = 1; public static final int WINDOW_NAVIGATION_BAR = 2; + public static final int WINDOW_STATE_SHOWING = 0; public static final int WINDOW_STATE_HIDING = 1; - public static final int WINDOW_STATE_SHOWING = 2; + public static final int WINDOW_STATE_HIDDEN = 2; private Context mContext; private IStatusBarService mService; @@ -185,4 +186,12 @@ public class StatusBarManager { throw new RuntimeException(ex); } } + + /** @hide */ + public static String windowStateToString(int state) { + if (state == WINDOW_STATE_HIDING) return "WINDOW_STATE_HIDING"; + if (state == WINDOW_STATE_HIDDEN) return "WINDOW_STATE_HIDDEN"; + if (state == WINDOW_STATE_SHOWING) return "WINDOW_STATE_SHOWING"; + return "WINDOW_STATE_UNKNOWN"; + } } |
