summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2012-09-07 18:03:35 +0800
committerWu-cheng Li <wuchengli@google.com>2012-09-07 18:03:35 +0800
commit2ab0113b1ec34c96b84e8be9aac1a3f1e9d3ccb8 (patch)
treef11ed1f39a11a2c0a5cfd7d90638586b61391a7c /policy/src
parent4848f42f65082340b98da2628761e59567d19d9d (diff)
downloadframeworks_base-2ab0113b1ec34c96b84e8be9aac1a3f1e9d3ccb8.zip
frameworks_base-2ab0113b1ec34c96b84e8be9aac1a3f1e9d3ccb8.tar.gz
frameworks_base-2ab0113b1ec34c96b84e8be9aac1a3f1e9d3ccb8.tar.bz2
Pass EXCLUDE_FROM_RECENTS when starting secure camera.
Camera started from the secure lock screen does not show all the pictures in the camera roll. If users launch camera from recent apps, they may enter secure camera mode accidentally. Pass EXCLUDE_FROM_RECENTS flag to prevent this. bug:7053266 Change-Id: I0ad526d919dac02f358b25493777d7d73da6987f
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
index 28f5e8c..6e51707 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
@@ -131,7 +131,9 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
protected void launchCamera() {
if (mLockPatternUtils.isSecure()) {
// Launch the secure version of the camera
- launchActivity(new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE), true);
+ Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
+ intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ launchActivity(intent, true);
} else {
// Launch the normal camera
launchActivity(new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA), false);
@@ -230,7 +232,7 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
* See {@link WindowManager#FLAG_SHOW_WHEN_LOCKED}
*/
private void launchActivity(final Intent intent, boolean showsWhileLocked) {
- intent.setFlags(
+ intent.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TOP);