mirror of
https://github.com/androidx/media.git
synced 2025-05-05 22:50:57 +08:00
Revert unrelated ContentDataSource change
This commit is contained in:
parent
5a72ca6b36
commit
6a3b66987a
@ -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…
x
Reference in New Issue
Block a user