(MediaEntry e)
| 416 | } |
| 417 | |
| 418 | @SuppressWarnings("unused") |
| 419 | private MediaFile resolveLocalCopy(MediaEntry e) { |
| 420 | if (!e.isLocal) { |
| 421 | e = findLocalEntry(e); |
| 422 | } |
| 423 | // If this is a local entry, load the current file |
| 424 | if (e.isLocal) { |
| 425 | MediaFile f = getCurrentFile(e, true); |
| 426 | if (f != null && f.path.exists()) { |
| 427 | return f; |
| 428 | } |
| 429 | } |
| 430 | // If there is no current file, download it |
| 431 | // if (MediaLibrary.CREATE_LOCAL_ON_LOAD) { |
| 432 | // getLocalLibrary().add(e); |
| 433 | // MediaFile f = getCurrentFile(e, true); |
| 434 | // downloadImage(e, f, true); |
| 435 | // return f; |
| 436 | // } else { |
| 437 | return downloadTempCopy(e); |
| 438 | // } |
| 439 | |
| 440 | } |
| 441 | |
| 442 | public MediaEntry findLocalEntry(MediaEntry e) { |
| 443 | for (MediaEntry entry : getLocalLibrary().mediaLookup.values()) { |
nothing calls this directly
no test coverage detected