Video Downloader for FB v3.5.1版本的 MD5 值为:1db7d4aa9fc4356831f5521f52585a52
以下内容为反编译后的 ul.java 源代码,内容仅作参考
package com.yandex.mobile.ads.impl;
import android.net.Uri;
import android.text.TextUtils;
import com.ironsource.sdk.constants.Events;
import com.yandex.mobile.ads.MobileAds;
import com.yandex.mobile.ads.impl.th;
import com.yandex.mobile.ads.video.RequestListener;
import com.yandex.mobile.ads.video.VideoAdError;
import com.yandex.mobile.ads.video.VideoAdRequest;
import com.yandex.mobile.ads.video.models.blocksinfo.BlocksInfo;
import com.yandex.mobile.ads.video.tracking.Tracker;
import java.util.Random;
public final class ul {
private static Random f4593a;
public static class c {
private static void a(Uri.Builder builder, String str, String str2) {
if (TextUtils.isEmpty(str2)) {
return;
}
builder.appendQueryParameter(str, str2);
}
public static uv a(uh uhVar, fu fuVar) {
VideoAdRequest a2 = uhVar.a();
BlocksInfo blocksInfo = a2.getBlocksInfo();
Uri.Builder buildUpon = Uri.parse(ul.a(fuVar)).buildUpon();
buildUpon.appendPath("v1").appendPath("getvideo").appendQueryParameter("page_id", blocksInfo.getPartnerId()).appendQueryParameter("imp-id", a2.getBlockId()).appendQueryParameter("target-ref", a2.getTargetRef()).appendQueryParameter("page-ref", a2.getPageRef()).appendQueryParameter("rnd", Integer.toString(ul.a().nextInt(89999999) + 10000000)).appendQueryParameter("video-session-id", a2.getBlocksInfo().getSessionId()).appendQueryParameter(Events.CHARSET, a2.getCharset().getValue());
a(buildUpon, "video-api-version", String.format("android-v%s", MobileAds.getLibraryVersion()));
a(buildUpon, "video-width", a2.getPlayerWidthPix());
a(buildUpon, "video-height", a2.getPlayerHeightPix());
a(buildUpon, "video-content-id", a2.getVideoContentId());
a(buildUpon, "video-content-name", a2.getVideoContentName());
a(buildUpon, "video-publisher-id", a2.getPublisherId());
a(buildUpon, "video-publisher-name", a2.getPublisherName());
a(buildUpon, "video-maxbitrate", a2.getMaxBitrate());
a(buildUpon, "video-genre-id", a2.getGenreId());
a(buildUpon, "video-genre-name", a2.getGenreName());
a(buildUpon, "tags-list", a2.getTagsList());
a(buildUpon, "ext-param", a2.getExtParams());
buildUpon.appendQueryParameter("uuid", fuVar.d());
return new uv(a2, buildUpon.build().toString(), new b(uhVar), new vv());
}
}
public static class b<T> implements th.a<T> {
private final RequestListener<T> f4595a;
public b(RequestListener<T> requestListener) {
this.f4595a = requestListener;
}
@Override
public final void a(T t) {
RequestListener<T> requestListener = this.f4595a;
if (requestListener != null) {
requestListener.onSuccess(t);
}
}
@Override
public final void a(sr srVar) {
VideoAdError createInternalError;
if (this.f4595a != null) {
if (srVar instanceof uc) {
createInternalError = VideoAdError.createNoAdError((uc) srVar);
} else if (srVar instanceof ud) {
createInternalError = VideoAdError.createInternalError((ud) srVar);
} else {
sd sdVar = srVar.f4537a;
if (sdVar == null) {
createInternalError = VideoAdError.createConnectionError(srVar.getMessage());
} else if (sdVar.f4531a >= 500) {
createInternalError = VideoAdError.createRetriableError("Server temporarily unavailable. Please, try again later.");
} else {
String str = "Network Error. ";
if (sdVar != null) {
str = ("Network Error. Code: " + sdVar.f4531a + ".") + " Data: \n" + new String(sdVar.b);
}
createInternalError = VideoAdError.createInternalError(str);
}
}
this.f4595a.onFailure(createInternalError);
}
}
}
public static class a implements th.a<Void> {
private final Tracker.ErrorListener f4594a;
@Override
public final void a(Object obj) {
}
public a(Tracker.ErrorListener errorListener) {
this.f4594a = errorListener;
}
@Override
public final void a(sr srVar) {
VideoAdError createInternalError;
Tracker.ErrorListener errorListener = this.f4594a;
if (errorListener != null) {
if (srVar == null) {
errorListener.onTrackingError(VideoAdError.createInternalError("Tracking error"));
return;
}
if (srVar.f4537a == null) {
createInternalError = VideoAdError.createConnectionError(srVar.getMessage());
} else {
createInternalError = VideoAdError.createInternalError("Tracking error");
}
this.f4594a.onTrackingError(createInternalError);
}
}
}
static Random a() {
Random random = f4593a;
return random == null ? new Random() : random;
}
public static String a(fu fuVar) {
String f = fuVar.f();
return TextUtils.isEmpty(f) ? "https://mobile.yandexadexchange.net" : f;
}
}