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
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 7242043..da09922 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -440,6 +440,22 @@
"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 9a3549e..2d1f753 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 @@
@Override
public Intent getLongClickIntent() {
- return new Intent(Settings.ACTION_DISPLAY_SETTINGS);
+ return new Intent(Settings.ACTION_NIGHT_DISPLAY_SETTINGS);
}
@Override