diff options
author | Alan Viverette <alanv@google.com> | 2015-02-12 11:01:06 -0800 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2015-02-12 11:01:06 -0800 |
commit | 4cc1e9e707242479e00c4bc4bc0ea02bffccfa85 (patch) | |
tree | 8134bef2e7d2047d0a7e6098ff98f3b3bc5cc529 /core/java/android/app/UiModeManager.java | |
parent | 5e789f03b2bd018ab44cb4d1018f3682f27fd510 (diff) | |
download | frameworks_base-4cc1e9e707242479e00c4bc4bc0ea02bffccfa85.zip frameworks_base-4cc1e9e707242479e00c4bc4bc0ea02bffccfa85.tar.gz frameworks_base-4cc1e9e707242479e00c4bc4bc0ea02bffccfa85.tar.bz2 |
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
Diffstat (limited to 'core/java/android/app/UiModeManager.java')
-rw-r--r-- | core/java/android/app/UiModeManager.java | 7 |
1 files changed, 3 insertions, 4 deletions
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) { |