Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 571bacbd authored by Mangesh Ghiware's avatar Mangesh Ghiware
Browse files

Add flags to create new task and clear top during trampoline.

Bug: 10366519
Change-Id: I549c8256d18ea37ac868035e54a56e5f68840b24
parent 55705d5a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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();
    }
}