Use SINGLE_TOP and CLEAR_TOP when starting camera from lock scren.

Add these flags so there is no need to press back key twice to
exit the camera if users slide to camera twice.

bug:6070281

Change-Id: Iadf6ab2798cf9381bc9dc761920f46b022fb6bb8
This commit is contained in:
Wu-cheng Li
2012-02-29 19:50:11 +08:00
parent 9f77932422
commit 75e1ce6335

View File

@@ -231,7 +231,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
if (!mCameraDisabled) {
// Start the Camera
Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity();
} catch (RemoteException e) {