diff options
author | Mike Lockwood <lockwood@android.com> | 2009-07-30 01:21:08 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-07-30 10:16:28 -0700 |
commit | bad80e0dccdeaeea97991f7d092678ff0df1bc84 (patch) | |
tree | 16f00b4fb6d548c3b7023c87416bc2f55024c759 /core/java/android/content/Intent.java | |
parent | d2fb98006054f94753d8c58cf6a809840964db2e (diff) | |
download | frameworks_base-bad80e0dccdeaeea97991f7d092678ff0df1bc84.zip frameworks_base-bad80e0dccdeaeea97991f7d092678ff0df1bc84.tar.gz frameworks_base-bad80e0dccdeaeea97991f7d092678ff0df1bc84.tar.bz2 |
Add Activity Intent.ACTION_REQUEST_SHUTDOWN for requesting a system shutdown.
The Intent.EXTRA_KEY_CONFIRM extra can be set to require user confirmation before shutting down.
The ACTION_REQUEST_SHUTDOWN Intent is protected by android.permission.SHUTDOWN.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'core/java/android/content/Intent.java')
-rw-r--r-- | core/java/android/content/Intent.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 5c75e2d..f9b082f 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1409,6 +1409,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. + * + * <p class="note">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 * * <p class="note">This is a protected intent that can only be sent @@ -1893,6 +1904,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 * of restarting the application. |