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
This commit is contained in:
Justin Klaassen
2016-07-21 19:22:09 -07:00
parent 3fa345b5c2
commit 06c0cb7acd
2 changed files with 17 additions and 1 deletions

View File

@@ -439,6 +439,22 @@ public final class Settings {
public static final String ACTION_DISPLAY_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>

View File

@@ -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