OSDN Git Service

am aa67eb3c: am 571bacbd: Add flags to create new task and clear top during trampoline.
authorMangesh Ghiware <mghiware@google.com>
Mon, 19 Aug 2013 21:37:08 +0000 (14:37 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Mon, 19 Aug 2013 21:37:08 +0000 (14:37 -0700)
* commit 'aa67eb3c8c6f47ba572c340cc7655af765f22770':
  Add flags to create new task and clear top during trampoline.

src/com/android/camera/CameraActivity.java

index 5d06ad1..c8dadbd 100644 (file)
@@ -18,6 +18,7 @@ package com.android.camera;
 import com.android.gallery3d.util.CameraHelper;
 
 import android.app.Activity;
+import android.content.Intent;
 import android.os.Bundle;
 
 /** Trampoline activity that launches the new Camera activity defined in CameraHelper. */
@@ -25,7 +26,9 @@ public class CameraActivity extends Activity {
     @Override
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
-        startActivity(CameraHelper.CAMERA_LAUNCHER_INTENT);
+        Intent intent = CameraHelper.CAMERA_LAUNCHER_INTENT;
+        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
+        startActivity(intent);
         finish();
     }
 }