@@ -263,34 +263,34 @@ public Bitmap getBitmapFromDiskCache(String uri, BitmapDisplayConfig config) {
263
263
} catch (Throwable e ) {
264
264
}
265
265
}
266
- if (mDiskLruCache != null ) {
267
- LruDiskCache .Snapshot snapshot = null ;
268
- try {
269
- snapshot = mDiskLruCache .get (uri );
270
- if (snapshot != null ) {
271
- Bitmap bitmap = null ;
272
- if (config == null || config .isShowOriginal ()) {
273
- bitmap = BitmapDecoder .decodeFileDescriptor (
274
- snapshot .getInputStream (DISK_CACHE_INDEX ).getFD ());
275
- } else {
276
- bitmap = BitmapDecoder .decodeSampledBitmapFromDescriptor (
277
- snapshot .getInputStream (DISK_CACHE_INDEX ).getFD (),
278
- config .getBitmapMaxSize (),
279
- config .getBitmapConfig ());
280
- }
281
-
282
- bitmap = rotateBitmapIfNeeded (uri , config , bitmap );
283
- addBitmapToMemoryCache (uri , config , bitmap , mDiskLruCache .getExpiryTimestamp (uri ));
284
- return bitmap ;
266
+ }
267
+ if (mDiskLruCache != null ) {
268
+ LruDiskCache .Snapshot snapshot = null ;
269
+ try {
270
+ snapshot = mDiskLruCache .get (uri );
271
+ if (snapshot != null ) {
272
+ Bitmap bitmap = null ;
273
+ if (config == null || config .isShowOriginal ()) {
274
+ bitmap = BitmapDecoder .decodeFileDescriptor (
275
+ snapshot .getInputStream (DISK_CACHE_INDEX ).getFD ());
276
+ } else {
277
+ bitmap = BitmapDecoder .decodeSampledBitmapFromDescriptor (
278
+ snapshot .getInputStream (DISK_CACHE_INDEX ).getFD (),
279
+ config .getBitmapMaxSize (),
280
+ config .getBitmapConfig ());
285
281
}
286
- } catch ( Throwable e ) {
287
- LogUtils . e ( e . getMessage (), e );
288
- } finally {
289
- IOUtils . closeQuietly ( snapshot ) ;
282
+
283
+ bitmap = rotateBitmapIfNeeded ( uri , config , bitmap );
284
+ addBitmapToMemoryCache ( uri , config , bitmap , mDiskLruCache . getExpiryTimestamp ( uri ));
285
+ return bitmap ;
290
286
}
287
+ } catch (Throwable e ) {
288
+ LogUtils .e (e .getMessage (), e );
289
+ } finally {
290
+ IOUtils .closeQuietly (snapshot );
291
291
}
292
- return null ;
293
292
}
293
+ return null ;
294
294
}
295
295
296
296
/**
0 commit comments