Extract credential storage dialogs to a new activity.

Since now SecuritySettings is a fragment, not an activity, reacting
to intents is not easier anymore. The new activity is transparent,
and it works just like a dialog. This change also refactor'ed
SecuritySettings by moving some preference construction into
security_settings_misc.xml.

Bug: 3120992
Bug: 2117436
Change-Id: I8bd3fc7faa2a31d100b8d67310f9266260cfc31d
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 0f2390c..9caecec 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -626,14 +626,6 @@
                 android:resource="@id/security_settings" />
         </activity>
 
-        <activity android:name="CredentialInstaller"
-                android:theme="@android:style/Theme.Translucent.NoTitleBar">
-            <intent-filter>
-                <action android:name="android.credentials.SYSTEM_INSTALL" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
         <activity android:name="Settings$PrivacySettingsActivity"
                 android:theme="@android:style/Theme.Holo"
                 android:label="@string/privacy_settings_title"
@@ -651,6 +643,18 @@
                 android:resource="@id/privacy_settings" />
         </activity>
 
+        <activity android:name="CredentialStorage"
+                android:theme="@style/Transparent"
+                android:configChanges="orientation|keyboardHidden">
+            <intent-filter>
+                <action android:name="com.android.credentials.UNLOCK" />
+                <action android:name="com.android.credentials.INSTALL" />
+                <action android:name="com.android.credentials.SET_PASSWORD" />
+                <action android:name="com.android.credentials.RESET" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
         <activity android:name="DeviceAdminSettings"
                 android:label="@string/device_admin_settings_title"
                 android:theme="@style/TallTitleBarTheme"