From 430237d7a6f8dd74e03e6c1bae8a03f54ab7cffc Mon Sep 17 00:00:00 2001 From: Bobby Georgescu Date: Tue, 21 May 2013 13:42:09 -0700 Subject: Fix potential synchronization issue in bitmap pool Bug: 9072712 Change-Id: I7fcecd6ec63e461e06a6565519be6d86e3246155 --- src/com/android/photos/data/GalleryBitmapPool.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/com') diff --git a/src/com/android/photos/data/GalleryBitmapPool.java b/src/com/android/photos/data/GalleryBitmapPool.java index a5a17ede2..aca3e4b5c 100644 --- a/src/com/android/photos/data/GalleryBitmapPool.java +++ b/src/com/android/photos/data/GalleryBitmapPool.java @@ -19,7 +19,7 @@ package com.android.photos.data; import android.graphics.Bitmap; import android.graphics.Point; import android.util.Pools.Pool; -import android.util.Pools.SimplePool; +import android.util.Pools.SynchronizedPool; import com.android.photos.data.SparseArrayBitmapPool.Node; @@ -36,7 +36,7 @@ public class GalleryBitmapPool { private int mCapacityBytes; private SparseArrayBitmapPool [] mPools; - private Pool mSharedNodePool = new SimplePool(128); + private Pool mSharedNodePool = new SynchronizedPool(128); private GalleryBitmapPool(int capacityBytes) { mPools = new SparseArrayBitmapPool[3]; -- cgit v1.2.3