Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e43b598 authored by Bobby Georgescu's avatar Bobby Georgescu
Browse files

Fix potential synchronization issue in bitmap pool

Bug: 9072712

Change-Id: I7fcecd6ec63e461e06a6565519be6d86e3246155
parent aa77f39a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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<Node> mSharedNodePool = new SimplePool<Node>(128);
    private Pool<Node> mSharedNodePool = new SynchronizedPool<Node>(128);

    private GalleryBitmapPool(int capacityBytes) {
        mPools = new SparseArrayBitmapPool[3];