diff options
author | ztenghui <ztenghui@google.com> | 2013-09-03 11:30:11 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2013-09-03 12:13:29 -0700 |
commit | fd43e3be3d69f48a97bdd9084e9549f41e963cc2 (patch) | |
tree | 996d0cbdca872c6530d308f65f014b94cf1b392a | |
parent | 5457782daf2d03bdc1ac8f6b7143c92c62c3cfd0 (diff) | |
download | android_packages_apps_Snap-fd43e3be3d69f48a97bdd9084e9549f41e963cc2.tar.gz android_packages_apps_Snap-fd43e3be3d69f48a97bdd9084e9549f41e963cc2.tar.bz2 android_packages_apps_Snap-fd43e3be3d69f48a97bdd9084e9549f41e963cc2.zip |
Don't show the action bar in the capture intent.
bug:10571262
Change-Id: I85ed9c632f76084db95ce24277fb303c67c3949f
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 16 |
1 files changed, 15 insertions, 1 deletions
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); |