Skip to content

Commit 9252dbd

Browse files
committed
Add fullscreen to Dream.lightsOut().
Also don't go into lightsOut() by default in onAttachedToWindow(), in case some dream doesn't want to do that. We should probably make this even more flexible, but this is a start. Change-Id: I606b42a288259902e89d59595ad60548a89866da
1 parent 6950992 commit 9252dbd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/java/android/service/dreams/Dream.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@ public void onWindowFocusChanged(boolean hasFocus) {
172172

173173
@Override
174174
public void onAttachedToWindow() {
175-
mWindow.addFlags(
176-
WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
177-
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
178-
);
179-
lightsOut();
180175
}
181176

182177
@Override
@@ -306,7 +301,8 @@ protected void lightsOut() {
306301
// turn the lights down low
307302
final View v = mWindow.getDecorView();
308303
if (v != null) {
309-
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
304+
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
305+
| View.SYSTEM_UI_FLAG_FULLSCREEN);
310306
}
311307
}
312308

0 commit comments

Comments
 (0)