From 4cc1e9e707242479e00c4bc4bc0ea02bffccfa85 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Thu, 12 Feb 2015 11:01:06 -0800 Subject: Add support for user-selectable night mode Adds a Material theme that automatically selects light or dark UI based on the night mode resource qualifier. Removes restriction that night mode only works when car mode is enabled or the device is docked, which was applied inconsistently anyway and only actually worked when in car mode (regardless of docked state). Night mode is now always applied according to the system preference. Change-Id: I526807c907eb29a2ab588d15932afe3e6ab180c2 --- core/java/android/app/UiModeManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/java/android/app/UiModeManager.java') diff --git a/core/java/android/app/UiModeManager.java b/core/java/android/app/UiModeManager.java index 0a255f7..0f6ce12 100644 --- a/core/java/android/app/UiModeManager.java +++ b/core/java/android/app/UiModeManager.java @@ -219,10 +219,9 @@ public class UiModeManager { } /** - * Returns the currently configured night mode. - * - * @return {@link #MODE_NIGHT_NO}, {@link #MODE_NIGHT_YES}, or - * {@link #MODE_NIGHT_AUTO}. When an error occurred -1 is returned. + * @return the currently configured night mode. May be one of + * {@link #MODE_NIGHT_NO}, {@link #MODE_NIGHT_YES}, + * {@link #MODE_NIGHT_AUTO}, or -1 on error. */ public int getNightMode() { if (mService != null) { -- cgit v1.1