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>
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 1cd04f1..5f94ee5 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1130,6 +1130,16 @@
android:exported="true">
</activity>
+ <activity android:name="com.android.server.ShutdownActivity"
+ android:permission="android.permission.SHUTDOWN"
+ android:excludeFromRecents="true"
+ android:multiprocess="true">
+ <intent-filter>
+ <action android:name="android.intent.action.ACTION_REQUEST_SHUTDOWN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<service android:name="com.android.server.LoadAverageService"
android:exported="true" />