diff options
author | Cheng-Ru Lin <owenlin@google.com> | 2009-10-13 06:22:55 -0700 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2009-10-14 01:43:55 -0700 |
commit | 609d8cc0c7d05aa294aeebea8dcbb9111aefc1e1 (patch) | |
tree | 6507a2630eba844482eaa308c14b376e56fb9ccb /src/com/android/camera/CameraButtonIntentReceiver.java | |
parent | 6e9fef5e00072acad09d7138fc992aae4bd17f90 (diff) | |
download | LegacyCamera-609d8cc0c7d05aa294aeebea8dcbb9111aefc1e1.zip LegacyCamera-609d8cc0c7d05aa294aeebea8dcbb9111aefc1e1.tar.gz LegacyCamera-609d8cc0c7d05aa294aeebea8dcbb9111aefc1e1.tar.bz2 |
Clear task stack when launch camera with the hardware button.
Bug: http://b/issue?id=2109092
Change-Id: Ia9b5cb7dfd6abd5c77e34e408cb761b4145bfd3d
Diffstat (limited to 'src/com/android/camera/CameraButtonIntentReceiver.java')
-rw-r--r-- | src/com/android/camera/CameraButtonIntentReceiver.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/camera/CameraButtonIntentReceiver.java b/src/com/android/camera/CameraButtonIntentReceiver.java index 0d9c4fb..4153104 100644 --- a/src/com/android/camera/CameraButtonIntentReceiver.java +++ b/src/com/android/camera/CameraButtonIntentReceiver.java @@ -21,8 +21,6 @@ import android.content.Context; import android.content.Intent; public class CameraButtonIntentReceiver extends BroadcastReceiver { - public CameraButtonIntentReceiver() { - } @Override public void onReceive(Context context, Intent intent) { @@ -35,8 +33,9 @@ public class CameraButtonIntentReceiver extends BroadcastReceiver { holder.release(); Intent i = new Intent(Intent.ACTION_MAIN); i.setClass(context, Camera.class); - i.addCategory("android.intent.category.LAUNCHER"); - i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + i.addCategory(Intent.CATEGORY_LAUNCHER); + i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK + | Intent.FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(i); } } |