Skip to content

Commit 41bd89f

Browse files
Wu-cheng LiAndroid (Google) Code Review
authored andcommitted
Merge "Pass EXCLUDE_FROM_RECENTS when starting secure camera." into jb-mr1-dev
2 parents 01a7c79 + 2ab0113 commit 41bd89f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ public KeyguardSelectorView(Context context) {
142142
protected void launchCamera() {
143143
if (mLockPatternUtils.isSecure()) {
144144
// Launch the secure version of the camera
145-
launchActivity(new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE), true);
145+
Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
146+
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
147+
launchActivity(intent, true);
146148
} else {
147149
// Launch the normal camera
148150
launchActivity(new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA), false);
@@ -262,7 +264,7 @@ public void setLockPatternUtils(LockPatternUtils utils) {
262264
* See {@link WindowManager#FLAG_SHOW_WHEN_LOCKED}
263265
*/
264266
private void launchActivity(final Intent intent, boolean showsWhileLocked) {
265-
intent.setFlags(
267+
intent.addFlags(
266268
Intent.FLAG_ACTIVITY_NEW_TASK
267269
| Intent.FLAG_ACTIVITY_SINGLE_TOP
268270
| Intent.FLAG_ACTIVITY_CLEAR_TOP);

0 commit comments

Comments
 (0)