diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-12-12 09:37:58 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-12-12 09:37:58 -0800 |
commit | 79069458357461f021ea5bc2526cc970bf6ea2da (patch) | |
tree | 899f04579c5e493e3e1cfd4d758d77acb3e947bd | |
parent | 313ca2adb838fa1965fe2381b36a9d11b06c44da (diff) | |
parent | 635160088a0f38f75998e167557d1d6e494d098b (diff) | |
download | android_packages_apps_Snap-79069458357461f021ea5bc2526cc970bf6ea2da.tar.gz android_packages_apps_Snap-79069458357461f021ea5bc2526cc970bf6ea2da.tar.bz2 android_packages_apps_Snap-79069458357461f021ea5bc2526cc970bf6ea2da.zip |
Merge "Camera2: fix preview thumb could not update after delete photo"
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index b5fc0a676..3c4a93a18 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -621,8 +621,10 @@ public class CameraActivity extends Activity if (cursor == null) return null; int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); - cursor.moveToFirst(); - String s = cursor.getString(column_index); + String s = null; + if (cursor.moveToFirst()) { + s = cursor.getString(column_index); + } cursor.close(); return s; } @@ -1418,6 +1420,7 @@ public class CameraActivity extends Activity // If it's secure camera, requestLoad() should not be called // as it will load all the data. mDataAdapter.requestLoad(getContentResolver()); + setPreviewThumbnailBitmap(null); } } mLocalImagesObserver.setActivityPaused(false); |