Use a different task affinity for secure camera.
This makes sure non-secure camera activity is not started in
secure lock screen. Also add excludeFromRecents for secure
camera.
bug:7148152
Change-Id: I18a10ccf95f22563aad59d5d936470af47596b91
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b2c6c72..f9035fa 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -291,10 +291,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
- <action android:name="android.media.action.STILL_IMAGE_CAMERA_SECURE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <intent-filter>
<action android:name="android.media.action.VIDEO_CAMERA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
@@ -304,6 +300,21 @@
</intent-filter>
</activity>
+ <activity android:name="com.android.camera.SecureCameraActivity"
+ android:taskAffinity="com.android.camera.SecureCameraActivity"
+ android:excludeFromRecents="true"
+ android:label="@string/camera_label"
+ android:theme="@style/Theme.Camera"
+ android:icon="@mipmap/ic_launcher_camera"
+ android:configChanges="orientation|screenSize|keyboardHidden"
+ android:clearTaskOnLaunch="true"
+ android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
+ <intent-filter>
+ <action android:name="android.media.action.STILL_IMAGE_CAMERA_SECURE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<!-- Icon sourced from www.raadius.deviantart.com/art/Aeolus-HD-200984118 -->
<activity-alias android:icon="@mipmap/ic_launcher_camera"
android:label="@string/camera_label"