summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-09-03 11:30:11 -0700
committerztenghui <ztenghui@google.com>2013-09-03 12:13:29 -0700
commitfd43e3be3d69f48a97bdd9084e9549f41e963cc2 (patch)
tree996d0cbdca872c6530d308f65f014b94cf1b392a /src
parent5457782daf2d03bdc1ac8f6b7143c92c62c3cfd0 (diff)
downloadandroid_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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CameraActivity.java16
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);