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
This commit is contained in:
Daniel Sandler
2012-08-10 13:18:40 -04:00
parent 6950992645
commit 9252dbd314

View File

@@ -172,11 +172,6 @@ public class Dream extends Service implements Window.Callback {
@Override
public void onAttachedToWindow() {
mWindow.addFlags(
WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
);
lightsOut();
}
@Override
@@ -306,7 +301,8 @@ public class Dream extends Service implements Window.Callback {
// turn the lights down low
final View v = mWindow.getDecorView();
if (v != null) {
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
| View.SYSTEM_UI_FLAG_FULLSCREEN);
}
}