Skip to content

Commit 409c89c

Browse files
Jeff BrownAndroid Git Automerger
authored andcommitted
am c1c53e5: Merge "Fix dream/keyguard infinite layout loop." into jb-mr1-dev
* commit 'c1c53e56fb5222bfdd17f0a9f735efe5c1b8cb70': Fix dream/keyguard infinite layout loop.
2 parents 688d038 + c1c53e5 commit 409c89c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,10 +2965,11 @@ public void applyPostLayoutPolicyLw(WindowState win,
29652965
boolean applyWindow = attrs.type >= FIRST_APPLICATION_WINDOW
29662966
&& attrs.type <= LAST_APPLICATION_WINDOW;
29672967
if (attrs.type == TYPE_DREAM) {
2968-
mShowingDream = true;
2969-
if (!mDreamingLockscreen) {
2970-
applyWindow = true;
2971-
} else if (win.isVisibleLw() && win.hasDrawnLw()) {
2968+
// If the lockscreen was showing when the dream started then wait
2969+
// for the dream to draw before hiding the lockscreen.
2970+
if (!mDreamingLockscreen
2971+
|| (win.isVisibleLw() && win.hasDrawnLw())) {
2972+
mShowingDream = true;
29722973
applyWindow = true;
29732974
}
29742975
}
@@ -3008,8 +3009,10 @@ public int finishPostLayoutPolicyLw() {
30083009
? mTopFullscreenOpaqueWindowState.getAttrs()
30093010
: null;
30103011

3011-
// If we are not currently showing a dream, then update the lockscreen
3012-
// state that will apply if a dream is shown next time.
3012+
// If we are not currently showing a dream then remember the current
3013+
// lockscreen state. We will use this to determine whether the dream
3014+
// started while the lockscreen was showing and remember this state
3015+
// while the dream is showing.
30133016
if (!mShowingDream) {
30143017
mDreamingLockscreen = mShowingLockscreen;
30153018
}

0 commit comments

Comments
 (0)