mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Fix missing close of Closeables caught by StrictMode
This commit is contained in:
parent
b5ba59b413
commit
d822980d5a
Binary file not shown.
@ -10,6 +10,7 @@ import android.widget.ImageView;
|
||||
import com.limelight.nvstream.http.ComputerDetails;
|
||||
import com.limelight.nvstream.http.NvApp;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
@ -97,6 +98,11 @@ public class CachedAppAssetLoader {
|
||||
// Write the stream straight to disk
|
||||
diskLoader.populateCacheWithStream(tuple, in);
|
||||
|
||||
// Close the network input stream
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ignored) {}
|
||||
|
||||
// If there's a task associated with this load, we should return the bitmap
|
||||
if (task != null) {
|
||||
return diskLoader.loadBitmapFromCache(tuple, (int) scalingDivider);
|
||||
|
@ -61,6 +61,10 @@ public class CacheHelper {
|
||||
sb.append(buf, 0, bytesRead);
|
||||
}
|
||||
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ignored) {}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user