From bc1aa7bbc753ebcd32da4507fa23215489b6d314 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 20 Sep 2011 11:20:31 -0700 Subject: Fix issue #5312624: Lock screen very flickery The key thing was to fix isVisibleOrBehindKeyguardLw() so that it wouldn't count a window as not visible if it was just currently in the process of drawing due to an orientation change. Also improve logic in deciding when to turn screen on to better ensure the screen is in a stable state, in particular treating screen off as a frozen screen and not allowing it to turn on until the update of the screen due to any config change is done. Change-Id: If82199f3773270b2d07f9c7de9da2dad8c7b28d7 --- core/java/android/view/WindowManagerPolicy.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/java/android') diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index fdbda4c..c07faf6 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -784,9 +784,14 @@ public interface WindowManagerPolicy { public void screenTurningOn(ScreenOnListener screenOnListener); /** - * Return whether the screen is currently on. + * Return whether the screen is about to turn on or is currently on. */ - public boolean isScreenOn(); + public boolean isScreenOnEarly(); + + /** + * Return whether the screen is fully turned on. + */ + public boolean isScreenOnFully(); /** * Tell the policy that the lid switch has changed state. -- cgit v1.1