Remove needsContinueLoading from ExoPlayerImplInternal

The same effect can be achieved by checking the isLoading variable of ExoPlayerImplInternal
because this variable is in almost all cases set simultaneously with loadingMediaPeriodHolder.needsContinueLoading.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158697948
This commit is contained in:
tonihei 2017-06-12 04:13:01 -07:00 committed by Oliver Woodman
parent 58280f979e
commit 629edc2b95

View file

@ -1198,7 +1198,7 @@ import java.io.IOException;
maybeUpdateLoadingPeriod(); maybeUpdateLoadingPeriod();
if (loadingPeriodHolder == null || loadingPeriodHolder.isFullyBuffered()) { if (loadingPeriodHolder == null || loadingPeriodHolder.isFullyBuffered()) {
setIsLoading(false); setIsLoading(false);
} else if (loadingPeriodHolder != null && loadingPeriodHolder.needsContinueLoading) { } else if (loadingPeriodHolder != null && !isLoading) {
maybeContinueLoading(); maybeContinueLoading();
} }
@ -1394,10 +1394,7 @@ import java.io.IOException;
boolean continueLoading = loadControl.shouldContinueLoading(bufferedDurationUs); boolean continueLoading = loadControl.shouldContinueLoading(bufferedDurationUs);
setIsLoading(continueLoading); setIsLoading(continueLoading);
if (continueLoading) { if (continueLoading) {
loadingPeriodHolder.needsContinueLoading = false;
loadingPeriodHolder.mediaPeriod.continueLoading(loadingPeriodPositionUs); loadingPeriodHolder.mediaPeriod.continueLoading(loadingPeriodPositionUs);
} else {
loadingPeriodHolder.needsContinueLoading = true;
} }
} }
} }
@ -1506,7 +1503,6 @@ import java.io.IOException;
public boolean prepared; public boolean prepared;
public boolean hasEnabledTracks; public boolean hasEnabledTracks;
public MediaPeriodHolder next; public MediaPeriodHolder next;
public boolean needsContinueLoading;
public TrackSelectorResult trackSelectorResult; public TrackSelectorResult trackSelectorResult;
private final Renderer[] renderers; private final Renderer[] renderers;