mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Fix javadoc of onLoadStarted & remove error information as fields
This commit is contained in:
parent
1cc1bf02ef
commit
33d9b78e21
@ -94,13 +94,11 @@ public final class Loader implements LoaderErrorThrower {
|
|||||||
* Called when a load has started for the first time or through a retry.
|
* Called when a load has started for the first time or through a retry.
|
||||||
*
|
*
|
||||||
* @param loadable The loadable whose load has completed.
|
* @param loadable The loadable whose load has completed.
|
||||||
* @param elapsedRealtimeMs {@link SystemClock#elapsedRealtime} when the load ended.
|
* @param elapsedRealtimeMs {@link SystemClock#elapsedRealtime} when the load attempts to start.
|
||||||
* @param loadDurationMs The duration in milliseconds of the load since {@link #startLoading}
|
* @param loadDurationMs The duration in milliseconds of the load since {@link #startLoading}
|
||||||
* was called.
|
* was called.
|
||||||
* @param error The load error of the previous load attempt if this is a retry, otherwise null
|
|
||||||
* @param errorCount The number of errors this load has encountered thus far.
|
|
||||||
*/
|
*/
|
||||||
default void onLoadStarted(T loadable, long elapsedRealtimeMs, long loadDurationMs, @Nullable IOException error, int errorCount) {}
|
default void onLoadStarted(T loadable, long elapsedRealtimeMs, long loadDurationMs) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a load has completed.
|
* Called when a load has completed.
|
||||||
@ -545,7 +543,7 @@ public final class Loader implements LoaderErrorThrower {
|
|||||||
private void execute() {
|
private void execute() {
|
||||||
long nowMs = SystemClock.elapsedRealtime();
|
long nowMs = SystemClock.elapsedRealtime();
|
||||||
long durationMs = nowMs - startTimeMs;
|
long durationMs = nowMs - startTimeMs;
|
||||||
Assertions.checkNotNull(this.callback).onLoadStarted(loadable, nowMs, durationMs, currentError, errorCount);
|
Assertions.checkNotNull(this.callback).onLoadStarted(loadable, nowMs, durationMs);
|
||||||
currentError = null;
|
currentError = null;
|
||||||
downloadExecutor.execute(Assertions.checkNotNull(currentTask));
|
downloadExecutor.execute(Assertions.checkNotNull(currentTask));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user