Show Styles & Wallpaper in Settings
Show "Styles & Wallpaper" in Settings based on whether the ThemePicker component is availalable. Also update dashboard summary for display. Bug: 129874298 Test: m RunSettingsRoboTests Change-Id: Id7e0bb9cbc689bb9e637919a10a7d1006397afab
This commit is contained in:
@@ -36,11 +36,15 @@ public class TopLevelDisplayPreferenceController extends BasePreferenceControlle
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
if (new WallpaperPreferenceController(mContext, "dummy_key").isAvailable()) {
|
||||
return mContext.getText(R.string.display_dashboard_summary);
|
||||
final WallpaperPreferenceController controller =
|
||||
new WallpaperPreferenceController(mContext, "dummy_key");
|
||||
if (controller.isAvailable()) {
|
||||
return mContext.getText(
|
||||
controller.areStylesAvailable()
|
||||
? R.string.display_dashboard_summary_with_style
|
||||
: R.string.display_dashboard_summary);
|
||||
} else {
|
||||
return mContext.getText(R.string.display_dashboard_nowallpaper_summary);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user