diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-20 22:45:10 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-20 22:45:10 +0000 |
commit | 2d12ab62d5dd0fd9e6ba8df49f3d59d5629ef583 (patch) | |
tree | 044b35775486dd2e07b60e700ee937ad32dc19ba | |
parent | 1ae66bc8f6dfc87f906902e910f72359cd2c2492 (diff) | |
parent | 8a33f7a26ad7a4932139b492d2f936be4bd70aff (diff) | |
download | base-2d12ab62d5dd0fd9e6ba8df49f3d59d5629ef583.tar.gz |
Merge cherrypicks of [2435782, 2435615, 2435577, 2435653, 2435616, 2435708, 2435617, 2435558, 2435784, 2435709, 2435631, 2435559, 2435560, 2435618, 2435801, 2435674, 2435710, 2435746, 2435579, 2435747, 2435711, 2435785, 2435786, 2435787, 2435713, 2435804, 2435822, 2435842, 2435753, 2435965, 2436024, 2435885] into nyc-mr1-security-e-releaseandroid-7.1.1_r48
Change-Id: I44e02dc2d355dc0e88870d612b9bc1284cb1e8e3
-rw-r--r-- | media/java/android/media/MediaHTTPConnection.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/media/java/android/media/MediaHTTPConnection.java b/media/java/android/media/MediaHTTPConnection.java index d6bf421ffa9f..dda5ce6fd083 100644 --- a/media/java/android/media/MediaHTTPConnection.java +++ b/media/java/android/media/MediaHTTPConnection.java @@ -135,7 +135,13 @@ public class MediaHTTPConnection extends IMediaHTTPConnection.Stub { private void teardownConnection() { if (mConnection != null) { - mInputStream = null; + if (mInputStream != null) { + try { + mInputStream.close(); + } catch (IOException e) { + } + mInputStream = null; + } mConnection.disconnect(); mConnection = null; @@ -297,8 +303,7 @@ public class MediaHTTPConnection extends IMediaHTTPConnection.Stub { mCurrentOffset = offset; } catch (IOException e) { mTotalSize = -1; - mInputStream = null; - mConnection = null; + teardownConnection(); mCurrentOffset = -1; throw e; |