summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-08 00:58:46 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-08 00:58:46 -0400
commitb134b2038ecabcbec3f9b657834d45de27707068 (patch)
tree3b47e7ce57f82c971b5d1cd223bfdf493b5dda65
parent281acf421f4b977add75d736d1083413e1d5f24a (diff)
parent3d163f073f5cf3b3bf0287fc7d60fabce0269748 (diff)
downloadframeworks_base-b134b2038ecabcbec3f9b657834d45de27707068.zip
frameworks_base-b134b2038ecabcbec3f9b657834d45de27707068.tar.gz
frameworks_base-b134b2038ecabcbec3f9b657834d45de27707068.tar.bz2
Merge change Id8c9cb2f into eclair
* changes: More fix #2163209: alarm clock rings but is hidden behind lock screen
-rw-r--r--core/java/android/view/WindowManagerPolicy.java7
-rw-r--r--services/java/com/android/server/WindowManagerService.java15
2 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 78999fa..916fc2d 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -263,6 +263,13 @@ public interface WindowManagerPolicy {
boolean isVisibleLw();
/**
+ * Like {@link #isVisibleLw}, but also counts a window that is currently
+ * "hidden" behind the keyguard as visible. This allows us to apply
+ * things like window flags that impact the keyguard.
+ */
+ boolean isVisibleOrBehindKeyguardLw();
+
+ /**
* Is this window currently visible to the user on-screen? It is
* displayed either if it is visible or it is currently running an
* animation before no longer being visible. Must be called with the
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 67b8a85..00636c4 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -7574,6 +7574,21 @@ public class WindowManagerService extends IWindowManager.Stub
}
/**
+ * Like {@link #isVisibleLw}, but also counts a window that is currently
+ * "hidden" behind the keyguard as visible. This allows us to apply
+ * things like window flags that impact the keyguard.
+ * XXX I am starting to think we need to have ANOTHER visibility flag
+ * for this "hidden behind keyguard" state rather than overloading
+ * mPolicyVisibility. Ungh.
+ */
+ public boolean isVisibleOrBehindKeyguardLw() {
+ final AppWindowToken atoken = mAppToken;
+ return mSurface != null && !mAttachedHidden
+ && (atoken == null ? mPolicyVisibility : !atoken.hiddenRequested)
+ && !mExiting && !mDestroying;
+ }
+
+ /**
* Is this window visible, ignoring its app token? It is not visible
* if there is no surface, or we are in the process of running an exit animation
* that will remove the surface.