mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Revert unrelated ContentDataSource change
This commit is contained in:
parent
5a72ca6b36
commit
6a3b66987a
1 changed files with 13 additions and 11 deletions
|
|
@ -142,13 +142,22 @@ public final class ContentDataSource implements DataSource {
|
||||||
@Override
|
@Override
|
||||||
public void close() throws ContentDataSourceException {
|
public void close() throws ContentDataSourceException {
|
||||||
uri = null;
|
uri = null;
|
||||||
if (inputStream != null) {
|
try {
|
||||||
try {
|
if (inputStream != null) {
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new ContentDataSourceException(e);
|
||||||
|
} finally {
|
||||||
|
inputStream = null;
|
||||||
|
try {
|
||||||
|
if (assetFileDescriptor != null) {
|
||||||
|
assetFileDescriptor.close();
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ContentDataSourceException(e);
|
throw new ContentDataSourceException(e);
|
||||||
} finally {
|
} finally {
|
||||||
inputStream = null;
|
assetFileDescriptor = null;
|
||||||
if (opened) {
|
if (opened) {
|
||||||
opened = false;
|
opened = false;
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
|
|
@ -157,13 +166,6 @@ public final class ContentDataSource implements DataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assetFileDescriptor != null) {
|
|
||||||
try {
|
|
||||||
assetFileDescriptor.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
assetFileDescriptor = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue