mirror of
https://github.com/androidx/media.git
synced 2025-05-14 11:09:53 +08:00
Minor cleanup.
This commit is contained in:
parent
2d97d31a9e
commit
456d53e178
@ -171,7 +171,7 @@ public class ManifestFetcher<T> implements Loader.Callback {
|
|||||||
loader = new Loader("manifestLoader");
|
loader = new Loader("manifestLoader");
|
||||||
}
|
}
|
||||||
if (!loader.isLoading()) {
|
if (!loader.isLoading()) {
|
||||||
currentLoadable = new ManifestLoadable(userAgent);
|
currentLoadable = new ManifestLoadable();
|
||||||
loader.startLoading(currentLoadable, this);
|
loader.startLoading(currentLoadable, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ public class ManifestFetcher<T> implements Loader.Callback {
|
|||||||
this.callbackLooper = callbackLooper;
|
this.callbackLooper = callbackLooper;
|
||||||
this.wrappedCallback = wrappedCallback;
|
this.wrappedCallback = wrappedCallback;
|
||||||
singleUseLoader = new Loader("manifestLoader:single");
|
singleUseLoader = new Loader("manifestLoader:single");
|
||||||
singleUseLoadable = new ManifestLoadable(userAgent);
|
singleUseLoadable = new ManifestLoadable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startLoading() {
|
public void startLoading() {
|
||||||
@ -269,15 +269,9 @@ public class ManifestFetcher<T> implements Loader.Callback {
|
|||||||
|
|
||||||
private static final int TIMEOUT_MILLIS = 10000;
|
private static final int TIMEOUT_MILLIS = 10000;
|
||||||
|
|
||||||
private final String userAgent;
|
|
||||||
|
|
||||||
/* package */ volatile T result;
|
/* package */ volatile T result;
|
||||||
private volatile boolean isCanceled;
|
private volatile boolean isCanceled;
|
||||||
|
|
||||||
public ManifestLoadable(String userAgent) {
|
|
||||||
this.userAgent = userAgent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancelLoad() {
|
public void cancelLoad() {
|
||||||
// We don't actually cancel anything, but we need to record the cancellation so that
|
// We don't actually cancel anything, but we need to record the cancellation so that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user