From 9d38f35a8f4e2ae671337af20c640dffa92570c5 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Fri, 26 Sep 2014 01:02:49 +0200 Subject: Clear FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS for dreams By default, dreams should not get the in-window bars because those conflict with the lights-out bar mode. Bug: 17367264 Change-Id: I8c041c706f7a7c4791ed4760c34a5618fb7423d7 --- core/java/android/service/dreams/DreamService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java index 92647f0..38b0439 100644 --- a/core/java/android/service/dreams/DreamService.java +++ b/core/java/android/service/dreams/DreamService.java @@ -967,6 +967,9 @@ public class DreamService extends Service implements Window.Callback { | (mScreenBright ? WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON : 0) ); mWindow.setAttributes(lp); + // Workaround: Currently low-profile and in-window system bar backgrounds don't go + // along well. Dreams usually don't need such bars anyways, so disable them by default. + mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); mWindow.setWindowManager(null, windowToken, "dream", true); applySystemUiVisibilityFlags( -- cgit v1.1