summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-11-07 16:51:19 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-07 16:51:19 -0800
commit9f6e8e0361ce615644208dd11adcbeed3265edc7 (patch)
tree9cb1a6cd3c4431d7dba223d55d8af404790ba8cb /policy/src
parentebd616e88dab185bbf5b309d29c92a9eea9817e0 (diff)
parent94cab389e4f81d454316789fb0a6fbe954080a08 (diff)
downloadframeworks_base-9f6e8e0361ce615644208dd11adcbeed3265edc7.zip
frameworks_base-9f6e8e0361ce615644208dd11adcbeed3265edc7.tar.gz
frameworks_base-9f6e8e0361ce615644208dd11adcbeed3265edc7.tar.bz2
am 94cab389: am 1e45fd78: Merge "Fix improperly hidden status bar." into klp-dev
* commit '94cab389e4f81d454316789fb0a6fbe954080a08': Fix improperly hidden status bar.
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/BarController.java22
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java4
2 files changed, 16 insertions, 10 deletions
diff --git a/policy/src/com/android/internal/policy/impl/BarController.java b/policy/src/com/android/internal/policy/impl/BarController.java
index c38ad04..0ce4b12 100644
--- a/policy/src/com/android/internal/policy/impl/BarController.java
+++ b/policy/src/com/android/internal/policy/impl/BarController.java
@@ -37,8 +37,9 @@ public class BarController {
private static final boolean DEBUG = false;
private static final int TRANSIENT_BAR_NONE = 0;
- private static final int TRANSIENT_BAR_SHOWING = 1;
- private static final int TRANSIENT_BAR_HIDING = 2;
+ private static final int TRANSIENT_BAR_SHOW_REQUESTED = 1;
+ private static final int TRANSIENT_BAR_SHOWING = 2;
+ private static final int TRANSIENT_BAR_HIDING = 3;
private static final int TRANSLUCENT_ANIMATION_DELAY_MS = 1000;
@@ -73,13 +74,9 @@ public class BarController {
mWin = win;
}
- public boolean isHidden() {
- return mState == StatusBarManager.WINDOW_STATE_HIDDEN;
- }
-
public void showTransient() {
if (mWin != null) {
- setTransientBarState(TRANSIENT_BAR_SHOWING);
+ setTransientBarState(TRANSIENT_BAR_SHOW_REQUESTED);
}
}
@@ -87,6 +84,10 @@ public class BarController {
return mTransientBarState == TRANSIENT_BAR_SHOWING;
}
+ public boolean isTransientShowRequested() {
+ return mTransientBarState == TRANSIENT_BAR_SHOW_REQUESTED;
+ }
+
public boolean wasRecentlyTranslucent() {
return (SystemClock.uptimeMillis() - mLastTranslucent) < TRANSLUCENT_ANIMATION_DELAY_MS;
}
@@ -198,6 +199,9 @@ public class BarController {
if (mTransientBarState == TRANSIENT_BAR_SHOWING) {
if (DEBUG) Slog.d(mTag, "Not showing transient bar, already shown");
return false;
+ } else if (mTransientBarState == TRANSIENT_BAR_SHOW_REQUESTED) {
+ if (DEBUG) Slog.d(mTag, "Not showing transient bar, already requested");
+ return false;
} else if (mWin == null) {
if (DEBUG) Slog.d(mTag, "Not showing transient bar, bar doesn't exist");
return false;
@@ -211,12 +215,13 @@ public class BarController {
public int updateVisibilityLw(boolean transientAllowed, int oldVis, int vis) {
if (mWin == null) return vis;
- if (mTransientBarState == TRANSIENT_BAR_SHOWING) { // transient bar requested
+ if (isTransientShowing() || isTransientShowRequested()) { // transient bar requested
if (transientAllowed) {
vis |= mTransientFlag;
if ((oldVis & mTransientFlag) == 0) {
vis |= mUnhideFlag; // tell sysui we're ready to unhide
}
+ setTransientBarState(TRANSIENT_BAR_SHOWING); // request accepted
} else {
setTransientBarState(TRANSIENT_BAR_NONE); // request denied
}
@@ -254,6 +259,7 @@ public class BarController {
private static String transientBarStateToString(int state) {
if (state == TRANSIENT_BAR_HIDING) return "TRANSIENT_BAR_HIDING";
if (state == TRANSIENT_BAR_SHOWING) return "TRANSIENT_BAR_SHOWING";
+ if (state == TRANSIENT_BAR_SHOW_REQUESTED) return "TRANSIENT_BAR_SHOW_REQUESTED";
if (state == TRANSIENT_BAR_NONE) return "TRANSIENT_BAR_NONE";
throw new IllegalArgumentException("Unknown state " + state);
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index faca949..8bb4a6c 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -5158,9 +5158,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mNavigationBar != null &&
hideNavBarSysui && immersiveSticky;
- boolean denyTransientStatus = mStatusBarController.isTransientShowing()
+ boolean denyTransientStatus = mStatusBarController.isTransientShowRequested()
&& !transientStatusBarAllowed && hideStatusBarSysui;
- boolean denyTransientNav = mNavigationBarController.isTransientShowing()
+ boolean denyTransientNav = mNavigationBarController.isTransientShowRequested()
&& !transientNavBarAllowed;
if (denyTransientStatus || denyTransientNav) {
// clear the clearable flags instead