Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java

Issue 2509113002: Use StreamUtil#closeQuietly to close a stream in MediaPlayerBridge (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
diff --git a/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java b/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
index 6a6ee989c5363b1bdae339f0a9c8c6e4c26284a6..8809b0a92e4276d26610829146b367ae3b96182f 100644
--- a/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
@@ -17,6 +17,7 @@ import android.util.Base64InputStream;
import android.view.Surface;
import org.chromium.base.Log;
+import org.chromium.base.StreamUtil;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
@@ -260,11 +261,7 @@ public class MediaPlayerBridge {
} catch (IOException e) {
return false;
} finally {
- try {
- if (fos != null) fos.close();
- } catch (IOException e) {
- // Can't do anything.
- }
+ StreamUtil.closeQuietly(fos);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698