Added toast message to color temperature setting
Added a toast message to inform the user that the color temperature
setting is applied once the display is off.
Bug:26110238
Change-Id: Ia773581eb441ed2f4ac44b20e611ad3700e8abbf
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 87f7a1f..5f627dd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7047,8 +7047,11 @@
<string name="picture_color_mode_desc">Use sRGB</string>
<!-- Name of the setting to change the display's color temperature -->
- <string name="color_temperature">Display color temperature</string>
+ <string name="color_temperature">Cool color temperature</string>
<!-- Description of the setting to change the display's color temperature -->
- <string name="color_temperature_desc">Enable cool temperature</string>
+ <string name="color_temperature_desc">Use cooler display colors</string>
+
+ <!-- Toast message letting the user know the color temperature setting is not immediate -->
+ <string name="color_temperature_toast">To apply color change, turn off screen</string>
</resources>
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 4b86f98..a3a822a 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -71,6 +71,7 @@
import android.view.accessibility.AccessibilityManager;
import android.widget.Switch;
import android.widget.TextView;
+import android.widget.Toast;
import com.android.internal.logging.MetricsLogger;
import com.android.settings.fuelgauge.InactiveApps;
@@ -1197,6 +1198,7 @@
SystemProperties.set(COLOR_TEMPERATURE_PROPERTY,
mColorTemperaturePreference.isChecked() ? "1" : "0");
pokeSystemProperties();
+ Toast.makeText(getActivity(), R.string.color_temperature_toast, Toast.LENGTH_LONG).show();
}
private void updateUSBAudioOptions() {