diff options
author | Angus Kong <shkong@google.com> | 2013-09-06 17:20:15 -0700 |
---|---|---|
committer | Angus Kong <shkong@google.com> | 2013-09-06 17:37:38 -0700 |
commit | a71946012df0eee8fe4859a22da3c56feba0344e (patch) | |
tree | 71e4fc92bf2a9ab34a7b0c3c1a6309ca9dbb4df6 | |
parent | 56ad83f797ab09af240d1f67d63e55dd602160c1 (diff) | |
download | android_packages_apps_Snap-a71946012df0eee8fe4859a22da3c56feba0344e.tar.gz android_packages_apps_Snap-a71946012df0eee8fe4859a22da3c56feba0344e.tar.bz2 android_packages_apps_Snap-a71946012df0eee8fe4859a22da3c56feba0344e.zip |
Disable swipe in capture intent mode.
bug:10606988
Change-Id: Iaf80cdef5b463795b9847f2ab9ab5c70f3f0083c
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 7b127fa4d..384b8bf3b 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -742,7 +742,9 @@ public class CameraActivity extends Activity if (!mSecureCamera) { mDataAdapter = mWrappedDataAdapter; mFilmStripView.setDataAdapter(mDataAdapter); - mDataAdapter.requestLoad(getContentResolver()); + if (!isCaptureIntent()) { + mDataAdapter.requestLoad(getContentResolver()); + } } else { // Put a lock placeholder as the last image by setting its date to 0. ImageView v = (ImageView) getLayoutInflater().inflate( @@ -1043,8 +1045,18 @@ public class CameraActivity extends Activity public void onShowSwitcherPopup() { } + /** + * Enable/disable swipe-to-filmstrip. + * Will always disable swipe if in capture intent. + * + * @param enable {@code true} to enable swipe. + */ public void setSwipingEnabled(boolean enable) { - mCameraPreviewData.lockPreview(!enable); + if (isCaptureIntent()) { + mCameraPreviewData.lockPreview(true); + } else { + mCameraPreviewData.lockPreview(!enable); + } } // Accessor methods for getting latency times used in performance testing |