mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Handle potentially poisoned bitmap cache caused by truncated images from the server
This commit is contained in:
parent
792846ddad
commit
af384d88f7
@ -105,7 +105,11 @@ public class CachedAppAssetLoader {
|
||||
|
||||
// If there's a task associated with this load, we should return the bitmap
|
||||
if (task != null) {
|
||||
return diskLoader.loadBitmapFromCache(tuple, (int) scalingDivider);
|
||||
// If the cached bitmap is valid, return it. Otherwise, we'll try the load again
|
||||
Bitmap bmp = diskLoader.loadBitmapFromCache(tuple, (int) scalingDivider);
|
||||
if (bmp != null) {
|
||||
return bmp;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Otherwise it's a background load and we return nothing
|
||||
|
Loading…
x
Reference in New Issue
Block a user