(File rawData)
| 369 | } |
| 370 | |
| 371 | @Override |
| 372 | public Drawable prepare(File rawData) throws Throwable { |
| 373 | if (!validView4Callback(true)) return null; |
| 374 | |
| 375 | if (!rawData.exists()) { |
| 376 | throw new FileNotFoundException(rawData.getAbsolutePath()); |
| 377 | } |
| 378 | |
| 379 | try { |
| 380 | Drawable result = null; |
| 381 | if (prepareCallback != null) { |
| 382 | result = prepareCallback.prepare(rawData); |
| 383 | } |
| 384 | if (result == null) { |
| 385 | result = ImageDecoder.decodeFileWithLock(rawData, options, this); |
| 386 | } |
| 387 | if (result != null) { |
| 388 | if (result instanceof ReusableDrawable) { |
| 389 | ((ReusableDrawable) result).setMemCacheKey(key); |
| 390 | MEM_CACHE.put(key, result); |
| 391 | } |
| 392 | } |
| 393 | return result; |
| 394 | } catch (IOException ex) { |
| 395 | IOUtil.deleteFileOrDir(rawData); |
| 396 | throw ex; |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | private boolean hasCache = false; |
| 401 |
nothing calls this directly
no test coverage detected