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-25 21:55:20 -0700
commitdf76934a0d48c3ef505d646f1ae7e6a208035714 (patch)
tree27f03bf28c6f2c863d8b8dc9f13d63b7a9ecdd46
parent9261b8a8c15be6849bd193d8f926344867b1898b (diff)
downloadandroid_packages_apps_Snap-df76934a0d48c3ef505d646f1ae7e6a208035714.tar.gz
android_packages_apps_Snap-df76934a0d48c3ef505d646f1ae7e6a208035714.tar.bz2
android_packages_apps_Snap-df76934a0d48c3ef505d646f1ae7e6a208035714.zip
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 c053655f5..36f787be4 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);