summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2010-04-20 18:07:15 +0800
committerChih-Chung Chang <chihchung@google.com>2010-04-20 18:20:09 +0800
commit523432315cea8f18d703a0d547b4614ce42b6918 (patch)
treee1233e0dbce3c785f173500cc7378cd948200833 /src/com/android
parent29fbda065e287c87b4939a541a24e4f965e0b4f3 (diff)
downloadLegacyCamera-523432315cea8f18d703a0d547b4614ce42b6918.zip
LegacyCamera-523432315cea8f18d703a0d547b4614ce42b6918.tar.gz
LegacyCamera-523432315cea8f18d703a0d547b4614ce42b6918.tar.bz2
Don't stop user from taking pictures while the media scanner is scanning.
Bug: 2603078 Change-Id: Ic2159201434083919d7f7bc6b1ea2f3438971ebd
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/Camera.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 9449249..056376e 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -515,8 +515,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
String action = intent.getAction();
if (action.equals(Intent.ACTION_MEDIA_MOUNTED)
|| action.equals(Intent.ACTION_MEDIA_UNMOUNTED)
- || action.equals(Intent.ACTION_MEDIA_CHECKING)
- || action.equals(Intent.ACTION_MEDIA_SCANNER_STARTED)) {
+ || action.equals(Intent.ACTION_MEDIA_CHECKING)) {
checkStorage();
} else if (action.equals(Intent.ACTION_MEDIA_SCANNER_FINISHED)) {
checkStorage();
@@ -1010,11 +1009,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
}
private void checkStorage() {
- if (ImageManager.isMediaScannerScanning(getContentResolver())) {
- mPicturesRemaining = MenuHelper.NO_STORAGE_ERROR;
- } else {
- calculatePicturesRemaining();
- }
+ calculatePicturesRemaining();
updateStorageHint(mPicturesRemaining);
}
@@ -1161,8 +1156,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
if (remaining == MenuHelper.NO_STORAGE_ERROR) {
String state = Environment.getExternalStorageState();
- if (state == Environment.MEDIA_CHECKING ||
- ImageManager.isMediaScannerScanning(getContentResolver())) {
+ if (state == Environment.MEDIA_CHECKING) {
noStorageText = getString(R.string.preparing_sd);
} else {
noStorageText = getString(R.string.no_storage);
@@ -1189,7 +1183,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
IntentFilter intentFilter =
new IntentFilter(Intent.ACTION_MEDIA_MOUNTED);
intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
- intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);
intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
intentFilter.addAction(Intent.ACTION_MEDIA_CHECKING);
intentFilter.addDataScheme("file");