More fix #2163209: alarm clock rings but is hidden behind lock screen

There was another way we could ignore the application windows flags
while the lock screen was displayed.  This is the infrastructure to
deal with that.

Change-Id: Id8c9cb2f7081df6757ccb797a7cde618e82f7b38
This commit is contained in:
Dianne Hackborn
2009-10-07 21:26:57 -07:00
parent 7c12540f09
commit 3d163f073f
2 changed files with 22 additions and 0 deletions

View File

@@ -7573,6 +7573,21 @@ public class WindowManagerService extends IWindowManager.Stub
&& !mExiting && !mDestroying;
}
/**
* 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