summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CameraActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 186fa51..a9a78e7 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -252,6 +252,7 @@ public class CameraActivity extends Activity
// FilmStripView.setDataAdapter fires 2 onDataLoaded calls before any data is actually loaded
// Keep track of data request here to avoid creating useless UpdateThumbnailTask.
private boolean mDataRequested;
+ private Cursor mCursor;
private WakeLock mWakeLock;
private Context mContext;
@@ -1437,6 +1438,8 @@ public class CameraActivity extends Activity
mSecureCamera = intent.getBooleanExtra(SECURE_CAMERA_EXTRA, false);
}
+ mCursor = getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);
+
if (mSecureCamera) {
// Change the window flags so that secure camera can show when locked
Window win = getWindow();
@@ -1757,6 +1760,8 @@ public class CameraActivity extends Activity
getContentResolver().unregisterContentObserver(mLocalVideosObserver);
unregisterReceiver(mSDcardMountedReceiver);
+ mCursor.close();
+ mCursor=null;
super.onDestroy();
}