Add start-encryption intent filter to settings
* Add intent-filter for "android.app.action.START_ENCRYPTION"
* Add pseudo-activity to host intent-filter
* Add code to settings page that exits quickly when encryption
is not available or is already started.
This can be tested using ApiDemos -> App -> Device Admin
Bug: 3346770
Change-Id: Ie97459cf9e2a7b09b690bf085e64ef905466e77a
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c7fbfa4..f822ff6 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1080,6 +1080,21 @@
</intent-filter>
</activity>
+ <!-- Pseudo-activity used to provide an intent-filter entry point to encryption settings -->
+ <activity android:name="Settings$CryptKeeperSettingsActivity"
+ android:theme="@android:style/Theme.Holo"
+ android:label="@string/crypt_keeper_encrypt_title">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.app.action.START_ENCRYPTION" />
+ <category android:name="android.intent.category.DEFAULT" /> />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.CryptKeeperSettings" />
+ <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/security_settings" />
+ </activity>
+
<receiver android:name=".widget.SettingsAppWidgetProvider"
android:label="@string/gadget_title"
android:exported="false"