summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-06-08 10:38:11 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-21 18:45:51 -0700
commita17322a1caa2520f96f167a3d779abcbf7e6d641 (patch)
tree57fff44260fc3014ac581725050fe6327011047e
parent2df470fb509b0f03ea6b541c7f2e144db516444a (diff)
downloadandroid_packages_apps_Snap-a17322a1caa2520f96f167a3d779abcbf7e6d641.zip
android_packages_apps_Snap-a17322a1caa2520f96f167a3d779abcbf7e6d641.tar.gz
android_packages_apps_Snap-a17322a1caa2520f96f167a3d779abcbf7e6d641.tar.bz2
SnapdragonCamera: Fix picture saved when no sdcard inserted
Fix picture being saved when save path is set to sdcard but no sdcard present. In this case, picture should not be saved Check this before taking a picture Change-Id: I7313d67f2f5c489c2db230b8ae165b89ecfbc4c6 CRs-Fixed: 1025784
-rw-r--r--src/com/android/camera/CaptureModule.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index c053655..36f787b 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1762,6 +1762,12 @@ public class CaptureModule implements CameraModule, PhotoController,
@Override
public void onShutterButtonClick() {
+ if (mActivity.getStorageSpaceBytes() <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {
+ Log.i(TAG, "Not enough space or storage not ready. remaining="
+ + mActivity.getStorageSpaceBytes());
+ return;
+ }
+
String timer = mSettingsManager.getValue(SettingsManager.KEY_TIMER);
int seconds = Integer.parseInt(timer);