Config to disable AOD wallpapers

Test: manual
Change-Id: I58f70ef87ddb0706dd7fce72282880140c94f763
This commit is contained in:
Lucas Dupin
2018-12-03 18:03:59 -08:00
parent 9180cf1d46
commit a2f2fbe544
3 changed files with 8 additions and 2 deletions

View File

@@ -2125,6 +2125,9 @@
during initialization when the setting is still null. -->
<bool name="config_dozeAlwaysOnEnabled">true</bool>
<!-- If AOD can show an ambient version of the wallpaper -->
<bool name="config_dozeSupportsAodWallpaper">true</bool>
<!-- Whether the display blanks itself when transitioning from a doze to a non-doze state -->
<bool name="config_displayBlanksAfterDoze">false</bool>

View File

@@ -3310,6 +3310,7 @@
<java-symbol type="integer" name="config_autoGroupAtCount" />
<java-symbol type="bool" name="config_dozeAlwaysOnDisplayAvailable" />
<java-symbol type="bool" name="config_dozeAlwaysOnEnabled" />
<java-symbol type="bool" name="config_dozeSupportsAodWallpaper" />
<java-symbol type="bool" name="config_displayBlanksAfterDoze" />
<java-symbol type="bool" name="config_displayBrightnessBucketsInDoze" />
<java-symbol type="integer" name="config_storageManagerDaystoRetainDefault" />

View File

@@ -474,8 +474,10 @@ public class StatusBar extends SystemUI implements DemoMode,
return;
}
WallpaperInfo info = wallpaperManager.getWallpaperInfo(UserHandle.USER_CURRENT);
final boolean supportsAmbientMode = info != null &&
info.supportsAmbientMode();
final boolean deviceSupportsAodWallpaper = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_dozeSupportsAodWallpaper);
final boolean supportsAmbientMode = deviceSupportsAodWallpaper
&& info != null && info.supportsAmbientMode();
mStatusBarWindowController.setWallpaperSupportsAmbientMode(supportsAmbientMode);
mScrimController.setWallpaperSupportsAmbientMode(supportsAmbientMode);