File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
policy/src/com/android/internal/policy/impl Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2953,10 +2953,11 @@ public void applyPostLayoutPolicyLw(WindowState win,
29532953 boolean applyWindow = attrs .type >= FIRST_APPLICATION_WINDOW
29542954 && attrs .type <= LAST_APPLICATION_WINDOW ;
29552955 if (attrs .type == TYPE_DREAM ) {
2956- mShowingDream = true ;
2957- if (!mDreamingLockscreen ) {
2958- applyWindow = true ;
2959- } else if (win .isVisibleLw () && win .hasDrawnLw ()) {
2956+ // If the lockscreen was showing when the dream started then wait
2957+ // for the dream to draw before hiding the lockscreen.
2958+ if (!mDreamingLockscreen
2959+ || (win .isVisibleLw () && win .hasDrawnLw ())) {
2960+ mShowingDream = true ;
29602961 applyWindow = true ;
29612962 }
29622963 }
@@ -2992,8 +2993,10 @@ public int finishPostLayoutPolicyLw() {
29922993 ? mTopFullscreenOpaqueWindowState .getAttrs ()
29932994 : null ;
29942995
2995- // If we are not currently showing a dream, then update the lockscreen
2996- // state that will apply if a dream is shown next time.
2996+ // If we are not currently showing a dream then remember the current
2997+ // lockscreen state. We will use this to determine whether the dream
2998+ // started while the lockscreen was showing and remember this state
2999+ // while the dream is showing.
29973000 if (!mShowingDream ) {
29983001 mDreamingLockscreen = mShowingLockscreen ;
29993002 }
You can’t perform that action at this time.
0 commit comments