summaryrefslogtreecommitdiffstats
path: root/src/com/android/photos
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2013-03-01 10:23:42 -0800
committerJohn Reck <jreck@google.com>2013-03-01 10:23:42 -0800
commit08c0f25091f20c4d618b5adaa381ed6eedf4695f (patch)
tree9fed2a03a0cdd9a260886180ece0bf05af6b48c6 /src/com/android/photos
parentd26f1ad5a859da0847ab181df2eebd45e155118b (diff)
downloadandroid_packages_apps_Gallery2-08c0f25091f20c4d618b5adaa381ed6eedf4695f.tar.gz
android_packages_apps_Gallery2-08c0f25091f20c4d618b5adaa381ed6eedf4695f.tar.bz2
android_packages_apps_Gallery2-08c0f25091f20c4d618b5adaa381ed6eedf4695f.zip
Fix race condition
Change-Id: I6cf9207d067d4c0c3c4271d6ce6f44b213d7296b
Diffstat (limited to 'src/com/android/photos')
-rw-r--r--src/com/android/photos/data/GalleryBitmapPool.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/photos/data/GalleryBitmapPool.java b/src/com/android/photos/data/GalleryBitmapPool.java
index cddc160fd..4c3279f73 100644
--- a/src/com/android/photos/data/GalleryBitmapPool.java
+++ b/src/com/android/photos/data/GalleryBitmapPool.java
@@ -46,11 +46,9 @@ public class GalleryBitmapPool {
mCapacityBytes = capacityBytes;
}
- private static GalleryBitmapPool sInstance;
+ private static GalleryBitmapPool sInstance = new GalleryBitmapPool(CAPACITY_BYTES);
+
public static GalleryBitmapPool getInstance() {
- if (sInstance == null) {
- sInstance = new GalleryBitmapPool(CAPACITY_BYTES);
- }
return sInstance;
}