OSDN Git Service

Fix the no "SD Card is full" bug. Now, we show the error message when we find
authorOwen Lin <owenlin@google.com>
Wed, 3 Feb 2010 23:09:38 +0000 (15:09 -0800)
committerOwen Lin <owenlin@google.com>
Thu, 25 Feb 2010 02:52:08 +0000 (10:52 +0800)
out the storage may be not enough for next picture.

Bug: 2377057
Change-Id: Ie6684738a282c382cf6368276dd78f77ca848611

src/com/android/camera/Camera.java

index 0b1155e..cbb6aa1 100644 (file)
@@ -673,6 +673,10 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
             // the mean time and fill it, but that could have happened between the
             // shutter press and saving the JPEG too.
             calculatePicturesRemaining();
+
+            if (mPicturesRemaining < 1) {
+                updateStorageHint(mPicturesRemaining);
+            }
         }
     }
 
@@ -868,14 +872,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
             mCaptureStartTime = System.currentTimeMillis();
             mPostViewPictureCallbackTime = 0;
 
-            // Don't check the filesystem here, we can't afford the latency.
-            // Instead, check the cached value which was calculated when the
-            // preview was restarted.
-            if (mPicturesRemaining < 1) {
-                updateStorageHint(mPicturesRemaining);
-                return;
-            }
-
             mStatus = SNAPSHOT_IN_PROGRESS;
 
             mImageCapture.initiate();