From 50a6b24222642353201b7f74035f9d59f18af3a4 Mon Sep 17 00:00:00 2001 From: Console Chen Date: Fri, 11 Jan 2019 14:50:51 +0800 Subject: [PATCH] Gives unvailable slice of Night Light a customized subtitle When a slice depends on some setting and the setting is off, it shows "depends on another setting". Base on the new introduced attribute on ag/5843828 , assigns customized subtitle for showing the unavailabe slice when the Night Light is off. Change-Id: I5c3530281fac4ef63caf2d3ac8e2be872d704bcb Fixes: 118399193 Test: Manual --- res/values/strings.xml | 2 ++ res/xml/night_display_settings.xml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index c6aded35479..f45bd9e0d8e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2715,6 +2715,8 @@ Turn on until %1$s Turn off until %1$s + + Night Light not currently on Sleep diff --git a/res/xml/night_display_settings.xml b/res/xml/night_display_settings.xml index b6f625174f2..07687eae5ba 100644 --- a/res/xml/night_display_settings.xml +++ b/res/xml/night_display_settings.xml @@ -41,7 +41,8 @@ android:key="night_display_temperature" android:title="@string/night_display_temperature_title" settings:keywords="@string/keywords_display_night_display" - settings:controller="com.android.settings.display.NightDisplayIntensityPreferenceController" /> + settings:controller="com.android.settings.display.NightDisplayIntensityPreferenceController" + settings:unavailableSliceSubtitle="@string/night_display_not_currently_on" />