diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 5c75e2d6003b4..f9b082fecadf4 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1408,6 +1408,17 @@ public class Intent implements Parcelable { */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_SHUTDOWN = "android.intent.action.ACTION_SHUTDOWN"; + /** + * Activity Action: Start this activity to request system shutdown. + * The optional boolean extra field {@link #EXTRA_KEY_CONFIRM} can be set to true + * to request confirmation from the user before shutting down. + * + *
This is a protected intent that can only be sent
+ * by the system.
+ *
+ * {@hide}
+ */
+ public static final String ACTION_REQUEST_SHUTDOWN = "android.intent.action.ACTION_REQUEST_SHUTDOWN";
/**
* Broadcast Action: Indicates low memory condition on the device
*
@@ -1892,6 +1903,14 @@ public class Intent implements Parcelable {
*/
public static final String EXTRA_KEY_EVENT = "android.intent.extra.KEY_EVENT";
+ /**
+ * Set to true in {@link #ACTION_REQUEST_SHUTDOWN} to request confirmation from the user
+ * before shutting down.
+ *
+ * {@hide}
+ */
+ public static final String EXTRA_KEY_CONFIRM = "android.intent.extra.KEY_CONFIRM";
+
/**
* Used as an boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED} or
* {@link android.content.Intent#ACTION_PACKAGE_CHANGED} intents to override the default action
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 1cd04f1c91842..5f94ee55f7dd2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1130,6 +1130,16 @@
android:exported="true">
+