diff options
| author | 2016-07-21 19:22:09 -0700 | |
|---|---|---|
| committer | 2016-07-21 19:22:09 -0700 | |
| commit | 06c0cb7acdc07344463d8b9022c69125b14adb16 (patch) | |
| tree | dcb13478361974c6a6a3b98ff7a76cc82685055d | |
| parent | 3fa345b5c2cf5d7fd8c87e44d1887f011787c548 (diff) | |
Add Settings#ACTION_NIGHT_DISPLAY_SETTINGS
- The ACTION_NIGHT_DISPLAY_SETTINGS action can be used to launch
Night display settings directly.
- Updated NightDisplayTile to use ACTION_NIGHT_DISPLAY_SETTINGS.
Bug: 30291948
Change-Id: I6d912cf481f72ef5b52f53fa23942071fc795452
| -rwxr-xr-x | core/java/android/provider/Settings.java | 16 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 72420434ec7f..da09922268f8 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -440,6 +440,22 @@ public final class Settings { "android.settings.DISPLAY_SETTINGS"; /** + * Activity Action: Show settings to allow configuration of Night display. + * <p> + * In some cases, a matching Activity may not exist, so ensure you + * safeguard against this. + * <p> + * Input: Nothing. + * <p> + * Output: Nothing. + * + * @hide + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_NIGHT_DISPLAY_SETTINGS = + "android.settings.NIGHT_DISPLAY_SETTINGS"; + + /** * Activity Action: Show settings to allow configuration of locale. * <p> * In some cases, a matching Activity may not exist, so ensure you diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java index 9a3549eb6a75..2d1f753898b7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java @@ -74,7 +74,7 @@ public class NightDisplayTile extends QSTile<QSTile.BooleanState> @Override public Intent getLongClickIntent() { - return new Intent(Settings.ACTION_DISPLAY_SETTINGS); + return new Intent(Settings.ACTION_NIGHT_DISPLAY_SETTINGS); } @Override |