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 @@ -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 }
You can’t perform that action at this time.
0 commit comments