summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-09-03 21:33:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-03 21:33:15 +0000
commit269c824d720b2e902c4ad6c3bb23422644da1f41 (patch)
tree7a32e94fca9490cb0bf1e39600c34956d07d3948
parent2c3d9a58d8942f73bc16c71e57584e4d89410185 (diff)
parentfd43e3be3d69f48a97bdd9084e9549f41e963cc2 (diff)
downloadandroid_packages_apps_Snap-269c824d720b2e902c4ad6c3bb23422644da1f41.tar.gz
android_packages_apps_Snap-269c824d720b2e902c4ad6c3bb23422644da1f41.tar.bz2
android_packages_apps_Snap-269c824d720b2e902c4ad6c3bb23422644da1f41.zip
Merge "Don't show the action bar in the capture intent." into gb-ub-photos-carlsbad
-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 a2bfd1796..47a964f06 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -269,7 +269,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();
}
@@ -580,6 +584,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);