Revert unrelated ContentDataSource change

This commit is contained in:
Oliver Woodman 2016-10-09 14:52:38 +01:00
parent 5a72ca6b36
commit 6a3b66987a

View File

@ -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;
}
} }
} }