From fd43e3be3d69f48a97bdd9084e9549f41e963cc2 Mon Sep 17 00:00:00 2001 From: ztenghui Date: Tue, 3 Sep 2013 11:30:11 -0700 Subject: Don't show the action bar in the capture intent. bug:10571262 Change-Id: I85ed9c632f76084db95ce24277fb303c67c3949f --- src/com/android/camera/CameraActivity.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index aadb7d75c..1a4a97c7d 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -262,7 +262,11 @@ public class CameraActivity extends Activity if (mActionBar.isShowing()) { mActionBar.hide(); } else { - mActionBar.show(); + // In the preview, don't show the action bar if that is + // a capture intent. + if (!isCaptureIntent()) { + mActionBar.show(); + } } return mActionBar.isShowing(); } @@ -573,6 +577,16 @@ public class CameraActivity extends Activity } } + private boolean isCaptureIntent() { + if (MediaStore.ACTION_VIDEO_CAPTURE.equals(getIntent().getAction()) + || MediaStore.ACTION_IMAGE_CAPTURE.equals(getIntent().getAction()) + || MediaStore.ACTION_IMAGE_CAPTURE_SECURE.equals(getIntent().getAction())) { + return true; + } else { + return false; + } + } + @Override public void onCreate(Bundle state) { super.onCreate(state); -- cgit v1.2.3