Add HlsDownloadTest

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169064003
This commit is contained in:
eguven 2017-09-18 02:42:26 -07:00 committed by Oliver Woodman
parent 457d0ba1b9
commit 8d739067ec

View file

@ -17,6 +17,7 @@ package com.google.android.exoplayer2.playbacktests.gts;
import android.net.Uri;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
import com.google.android.exoplayer2.offline.Downloader;
import com.google.android.exoplayer2.offline.Downloader.ProgressListener;
import com.google.android.exoplayer2.offline.DownloaderConstructorHelper;
@ -178,8 +179,9 @@ public final class DashDownloadTest extends ActivityInstrumentationTestCase2<Hos
@Override
public void onDownloadProgress(Downloader downloader, float downloadPercentage,
long downloadedBytes) {
System.out.printf("onDownloadProgress downloadPercentage = [%g], downloadedData = [%d]%n",
downloadPercentage, downloadedBytes);
Log.d("DashDownloadTest",
String.format("onDownloadProgress downloadPercentage = [%g], downloadedData = [%d]%n",
downloadPercentage, downloadedBytes));
if (downloadPercentage >= stopAt) {
Thread.currentThread().interrupt();
}