summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/Camera.java8
-rw-r--r--src/com/android/camera/Storage.java2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 79ab74f..8cc5816 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -1236,9 +1236,13 @@ public class Camera extends ActivityBase implements FocusManager.Listener,
private void checkStorage() {
mPicturesRemaining = Storage.getAvailableSpace();
- if (mPicturesRemaining > 0) {
- mPicturesRemaining /= 1500000;
+ if (mPicturesRemaining > Storage.LOW_STORAGE_THRESHOLD) {
+ mPicturesRemaining = (mPicturesRemaining - Storage.LOW_STORAGE_THRESHOLD)
+ / Storage.PICTURE_SIZE;
+ } else if (mPicturesRemaining > 0) {
+ mPicturesRemaining = 0;
}
+
updateStorageHint();
}
diff --git a/src/com/android/camera/Storage.java b/src/com/android/camera/Storage.java
index a9f67c9..564c088 100644
--- a/src/com/android/camera/Storage.java
+++ b/src/com/android/camera/Storage.java
@@ -44,6 +44,8 @@ public class Storage {
public static final long UNAVAILABLE = -1L;
public static final long PREPARING = -2L;
public static final long UNKNOWN_SIZE = -3L;
+ public static final long LOW_STORAGE_THRESHOLD= 50000000;
+ public static final long PICTURE_SIZE = 1500000;
private static final int BUFSIZE = 4096;