Loading api/current.txt +15 −0 Original line number Diff line number Diff line Loading @@ -2086,6 +2086,21 @@ package android { field public static final int Theme_Light_Panel = 16973914; // 0x103005a field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062 field public static final int Theme_Material = 16974372; // 0x1030224 field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4 field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5 field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6 field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7 field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8 field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9 field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0 field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1 field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2 field public static final int Theme_Material_Dialog = 16974373; // 0x1030225 field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c api/system-current.txt +15 −0 Original line number Diff line number Diff line Loading @@ -2165,6 +2165,21 @@ package android { field public static final int Theme_Light_Panel = 16973914; // 0x103005a field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062 field public static final int Theme_Material = 16974372; // 0x1030224 field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4 field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5 field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6 field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7 field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8 field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9 field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0 field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1 field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2 field public static final int Theme_Material_Dialog = 16974373; // 0x1030225 field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c core/java/android/app/UiModeManager.java +3 −4 Original line number Diff line number Diff line Loading @@ -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) { Loading core/res/res/values-night/themes_material_daynight.xml 0 → 100644 +112 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2015 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- =============================================================== PLEASE READ =============================================================== The Material themes must not be modified in order to pass CTS. Many related themes and styles depend on other values defined in this file. If you would like to provide custom themes and styles for your device, please see themes_device_defaults.xml. =============================================================== PLEASE READ =============================================================== --> <resources> <!-- Material theme (day/night version) for activities. --> <style name="Theme.Material.DayNight" parent="Theme.Material" /> <!-- Variant of Material.DayNight that has a solid (opaque) action bar with an inverse color profile. The dark action bar sharply stands out against the light content (when applicable). --> <style name="Theme.Material.DayNight.DarkActionBar" parent="Theme.Material" /> <!-- Variant of Material.DayNight with no action bar. --> <style name="Theme.Material.DayNight.NoActionBar" parent="Theme.Material.NoActionBar" /> <!-- Variant of Material.DayNight that has no title bar and fills the entire screen. This theme sets {@link android.R.attr#windowFullscreen} to true. --> <style name="Theme.Material.DayNight.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen" /> <!-- Variant of Material.DayNight that has no title bar and fills the entire screen and extends into the display overscan region. This theme sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan} to true. --> <style name="Theme.Material.DayNight.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan" /> <!-- Variant of Material.DayNight that has no title bar and translucent system decor. This theme sets {@link android.R.attr#windowTranslucentStatus} and {@link android.R.attr#windowTranslucentNavigation} to true. --> <style name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" parent="Theme.Material.NoActionBar.TranslucentDecor" /> <!-- Default Material.DayNight theme for panel windows. This removes all extraneous window decorations, so you basically have an empty rectangle in which to place your content. It makes the window floating, with a transparent background, and turns off dimming behind the window. --> <style name="Theme.Material.DayNight.Panel" parent="Theme.Material.Panel" /> <!-- Material theme (day/night version) for dialog windows and activities, which is used by the {@link android.app.Dialog} class. This changes the window to be floating (not fill the entire screen), and puts a frame around its contents. You can set this theme on an activity if you would like to make an activity that looks like a Dialog. --> <style name="Theme.Material.DayNight.Dialog" parent="Theme.Material.DayNight.BaseDialog" /> <style name="Theme.Material.DayNight.BaseDialog" parent="Theme.Material.BaseDialog" /> <!-- Variant of Theme.Material.DayNight.Dialog that has a nice minimum width for a regular dialog. --> <style name="Theme.Material.DayNight.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth" /> <!-- Variant of Theme.Material.DayNight.Dialog that does not include a title bar. --> <style name="Theme.Material.DayNight.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar" /> <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a nice minimum width for a regular dialog. --> <style name="Theme.Material.DayNight.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth" /> <!-- Variant of Theme.Material.DayNight.Dialog that has a fixed size. --> <style name="Theme.Material.DayNight.Dialog.FixedSize" parent="Theme.Material.Dialog.FixedSize" /> <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a fixed size. --> <style name="Theme.Material.DayNight.Dialog.NoActionBar.FixedSize" parent="Theme.Material.Dialog.NoActionBar.FixedSize" /> <!-- Theme for a window that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge). --> <style name="Theme.Material.DayNight.DialogWhenLarge" parent="Theme.Material.DialogWhenLarge" /> <!-- Theme for a window without an action bar that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge). --> <style name="Theme.Material.DayNight.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar" /> <!-- Theme for a presentation window on a secondary display. --> <style name="Theme.Material.DayNight.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation" /> <!-- Material user theme for alert dialog windows, which is used by the {@link android.app.AlertDialog} class. --> <style name="Theme.Material.DayNight.Dialog.Alert" parent="Theme.Material.DayNight.Dialog.BaseAlert" /> <style name="Theme.Material.DayNight.Dialog.BaseAlert" parent="Theme.Material.Dialog.BaseAlert" /> <style name="Theme.Material.DayNight.SearchBar" parent="Theme.Material.SearchBar" /> <style name="Theme.Material.DayNight.CompactMenu" parent="Theme.Material.CompactMenu" /> </resources> core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -632,6 +632,14 @@ Any other values will have surprising consequences. --> <integer name="config_defaultUiModeType">1</integer> <!-- Control the default night mode to use when there is no other mode override set. One of the following values (see UiModeManager.java): 0 - MODE_NIGHT_AUTO 1 - MODE_NIGHT_NO 2 - MODE_NIGHT_YES --> <integer name="config_defaultNightMode">1</integer> <!-- Indicate whether to allow the device to suspend when the screen is off due to the proximity sensor. This resource should only be set to true if the sensor HAL correctly handles the proximity sensor as a wake-up source. Loading Loading
api/current.txt +15 −0 Original line number Diff line number Diff line Loading @@ -2086,6 +2086,21 @@ package android { field public static final int Theme_Light_Panel = 16973914; // 0x103005a field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062 field public static final int Theme_Material = 16974372; // 0x1030224 field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4 field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5 field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6 field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7 field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8 field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9 field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0 field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1 field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2 field public static final int Theme_Material_Dialog = 16974373; // 0x1030225 field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c
api/system-current.txt +15 −0 Original line number Diff line number Diff line Loading @@ -2165,6 +2165,21 @@ package android { field public static final int Theme_Light_Panel = 16973914; // 0x103005a field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062 field public static final int Theme_Material = 16974372; // 0x1030224 field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4 field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5 field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6 field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7 field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8 field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9 field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0 field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1 field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2 field public static final int Theme_Material_Dialog = 16974373; // 0x1030225 field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c
core/java/android/app/UiModeManager.java +3 −4 Original line number Diff line number Diff line Loading @@ -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) { Loading
core/res/res/values-night/themes_material_daynight.xml 0 → 100644 +112 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2015 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- =============================================================== PLEASE READ =============================================================== The Material themes must not be modified in order to pass CTS. Many related themes and styles depend on other values defined in this file. If you would like to provide custom themes and styles for your device, please see themes_device_defaults.xml. =============================================================== PLEASE READ =============================================================== --> <resources> <!-- Material theme (day/night version) for activities. --> <style name="Theme.Material.DayNight" parent="Theme.Material" /> <!-- Variant of Material.DayNight that has a solid (opaque) action bar with an inverse color profile. The dark action bar sharply stands out against the light content (when applicable). --> <style name="Theme.Material.DayNight.DarkActionBar" parent="Theme.Material" /> <!-- Variant of Material.DayNight with no action bar. --> <style name="Theme.Material.DayNight.NoActionBar" parent="Theme.Material.NoActionBar" /> <!-- Variant of Material.DayNight that has no title bar and fills the entire screen. This theme sets {@link android.R.attr#windowFullscreen} to true. --> <style name="Theme.Material.DayNight.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen" /> <!-- Variant of Material.DayNight that has no title bar and fills the entire screen and extends into the display overscan region. This theme sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan} to true. --> <style name="Theme.Material.DayNight.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan" /> <!-- Variant of Material.DayNight that has no title bar and translucent system decor. This theme sets {@link android.R.attr#windowTranslucentStatus} and {@link android.R.attr#windowTranslucentNavigation} to true. --> <style name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" parent="Theme.Material.NoActionBar.TranslucentDecor" /> <!-- Default Material.DayNight theme for panel windows. This removes all extraneous window decorations, so you basically have an empty rectangle in which to place your content. It makes the window floating, with a transparent background, and turns off dimming behind the window. --> <style name="Theme.Material.DayNight.Panel" parent="Theme.Material.Panel" /> <!-- Material theme (day/night version) for dialog windows and activities, which is used by the {@link android.app.Dialog} class. This changes the window to be floating (not fill the entire screen), and puts a frame around its contents. You can set this theme on an activity if you would like to make an activity that looks like a Dialog. --> <style name="Theme.Material.DayNight.Dialog" parent="Theme.Material.DayNight.BaseDialog" /> <style name="Theme.Material.DayNight.BaseDialog" parent="Theme.Material.BaseDialog" /> <!-- Variant of Theme.Material.DayNight.Dialog that has a nice minimum width for a regular dialog. --> <style name="Theme.Material.DayNight.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth" /> <!-- Variant of Theme.Material.DayNight.Dialog that does not include a title bar. --> <style name="Theme.Material.DayNight.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar" /> <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a nice minimum width for a regular dialog. --> <style name="Theme.Material.DayNight.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth" /> <!-- Variant of Theme.Material.DayNight.Dialog that has a fixed size. --> <style name="Theme.Material.DayNight.Dialog.FixedSize" parent="Theme.Material.Dialog.FixedSize" /> <!-- Variant of Theme.Material.DayNight.Dialog.NoActionBar that has a fixed size. --> <style name="Theme.Material.DayNight.Dialog.NoActionBar.FixedSize" parent="Theme.Material.Dialog.NoActionBar.FixedSize" /> <!-- Theme for a window that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge). --> <style name="Theme.Material.DayNight.DialogWhenLarge" parent="Theme.Material.DialogWhenLarge" /> <!-- Theme for a window without an action bar that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge). --> <style name="Theme.Material.DayNight.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar" /> <!-- Theme for a presentation window on a secondary display. --> <style name="Theme.Material.DayNight.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation" /> <!-- Material user theme for alert dialog windows, which is used by the {@link android.app.AlertDialog} class. --> <style name="Theme.Material.DayNight.Dialog.Alert" parent="Theme.Material.DayNight.Dialog.BaseAlert" /> <style name="Theme.Material.DayNight.Dialog.BaseAlert" parent="Theme.Material.Dialog.BaseAlert" /> <style name="Theme.Material.DayNight.SearchBar" parent="Theme.Material.SearchBar" /> <style name="Theme.Material.DayNight.CompactMenu" parent="Theme.Material.CompactMenu" /> </resources>
core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -632,6 +632,14 @@ Any other values will have surprising consequences. --> <integer name="config_defaultUiModeType">1</integer> <!-- Control the default night mode to use when there is no other mode override set. One of the following values (see UiModeManager.java): 0 - MODE_NIGHT_AUTO 1 - MODE_NIGHT_NO 2 - MODE_NIGHT_YES --> <integer name="config_defaultNightMode">1</integer> <!-- Indicate whether to allow the device to suspend when the screen is off due to the proximity sensor. This resource should only be set to true if the sensor HAL correctly handles the proximity sensor as a wake-up source. Loading