正在查看: FileWipe Pro v3.0.0 应用的 AppLovinNativeAdImpl.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FileWipe Pro v3.0.0 应用的 AppLovinNativeAdImpl.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl.sdk.nativeAd;
import a8.i;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import com.applovin.impl.a7;
import com.applovin.impl.adview.AppLovinTouchToClickListener;
import com.applovin.impl.b7;
import com.applovin.impl.l2;
import com.applovin.impl.l4;
import com.applovin.impl.r7;
import com.applovin.impl.sdk.AppLovinAdBase;
import com.applovin.impl.sdk.array.ArrayService;
import com.applovin.impl.sdk.k;
import com.applovin.impl.sdk.network.e;
import com.applovin.impl.sdk.o;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.t7;
import com.applovin.impl.v3;
import com.applovin.impl.v4;
import com.applovin.impl.x3;
import com.applovin.impl.x6;
import com.applovin.sdk.AppLovinSdkUtils;
import com.iab.omid.library.applovin.adsession.VerificationScriptResource;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONArray;
import org.json.JSONObject;
public class AppLovinNativeAdImpl extends AppLovinAdBase implements AppLovinNativeAd, View.OnClickListener, AppLovinTouchToClickListener.OnClickListener {
private static final String AD_RESPONSE_TYPE_APPLOVIN = "applovin";
private static final String AD_RESPONSE_TYPE_ORTB = "ortb";
private static final String AD_RESPONSE_TYPE_UNDEFINED = "undefined";
private static final String DEFAULT_APPLOVIN_PRIVACY_URL = "https://www.applovin.com/privacy/";
private static final float MINIMUM_STARS_TO_RENDER = 3.0f;
private static final String TAG = "AppLovinNativeAd";
private static final int VIEWABLE_MRC100_PERCENTAGE = 100;
private static final int VIEWABLE_MRC50_PERCENTAGE = 50;
private static final int VIEWABLE_MRC_REQUIRED_SECONDS = 1;
private static final int VIEWABLE_VIDEO_MRC_REQUIRED_SECONDS = 2;
private final v3 adEventTracker;
private final String advertiser;
private final String body;
private final String callToAction;
private final Uri clickDestinationBackupUri;
private final Uri clickDestinationUri;
private final List<e> clickTrackingRequests;
private final List<String> clickTrackingUrls;
private AppLovinNativeAdEventListener eventListener;
private Uri iconUri;
private final List<e> impressionRequests;
private final AtomicBoolean impressionTracked;
private final List<String> jsTrackers;
private float mainImageAspectRatio;
private Uri mainImageUri;
private AppLovinMediaView mediaView;
private ViewGroup nativeAdView;
private final b onAttachStateChangeHandler;
private AppLovinOptionsView optionsView;
private Uri privacyDestinationUri;
private Uri privacyIconUri;
private final List<View> registeredViews;
private final Double starRating;
private final String tag;
private final String title;
private final b7 vastAd;
private View videoView;
private final c viewableMRC100Callback;
private t7 viewableMRC100Tracker;
private final c viewableMRC50Callback;
private t7 viewableMRC50Tracker;
private c viewableVideoMRC50Callback;
private t7 viewableVideoMRC50Tracker;
public static class Builder {
private final JSONObject adObject;
private String advertiser;
private String body;
private String callToAction;
private Uri clickDestinationBackupUri;
private Uri clickDestinationUri;
private List<e> clickTrackingRequests;
private List<String> clickTrackingUrls;
private final JSONObject fullResponse;
private Uri iconUri;
private List<e> impressionRequests;
private List<String> jsTrackers;
private float mainImageAspectRatio;
private Uri mainImageUri;
private Uri privacyDestinationUri;
private Uri privacyIconUri;
private final k sdk;
private Double starRating;
private String title;
private b7 vastAd;
private List<e> viewableMRC100Requests;
private List<e> viewableMRC50Requests;
private List<e> viewableVideo50Requests;
public Builder(JSONObject jSONObject, JSONObject jSONObject2, k kVar) {
this.adObject = jSONObject;
this.fullResponse = jSONObject2;
this.sdk = kVar;
}
public AppLovinNativeAdImpl build() {
return new AppLovinNativeAdImpl(this, null);
}
public Builder setAdvertiser(String str) {
this.advertiser = str;
return this;
}
public Builder setBody(String str) {
this.body = str;
return this;
}
public Builder setCallToAction(String str) {
this.callToAction = str;
return this;
}
public Builder setClickDestinationBackupUri(Uri uri) {
this.clickDestinationBackupUri = uri;
return this;
}
public Builder setClickDestinationUri(Uri uri) {
this.clickDestinationUri = uri;
return this;
}
public Builder setClickTrackingRequests(List<e> list) {
this.clickTrackingRequests = list;
return this;
}
public Builder setClickTrackingUrls(List<String> list) {
this.clickTrackingUrls = list;
return this;
}
public Builder setIconUri(Uri uri) {
this.iconUri = uri;
return this;
}
public Builder setImpressionRequests(List<e> list) {
this.impressionRequests = list;
return this;
}
public Builder setJsTrackers(List<String> list) {
this.jsTrackers = list;
return this;
}
public Builder setMainImageUri(Uri uri) {
this.mainImageUri = uri;
return this;
}
public Builder setPrivacyDestinationUri(Uri uri) {
this.privacyDestinationUri = uri;
return this;
}
public Builder setPrivacyIconUri(Uri uri) {
this.privacyIconUri = uri;
return this;
}
public Builder setStarRating(Double d4) {
this.starRating = d4;
return this;
}
public Builder setTitle(String str) {
this.title = str;
return this;
}
public Builder setVastAd(b7 b7Var) {
this.vastAd = b7Var;
return this;
}
public Builder setViewableMRC100Requests(List<e> list) {
this.viewableMRC100Requests = list;
return this;
}
public Builder setViewableMRC50Requests(List<e> list) {
this.viewableMRC50Requests = list;
return this;
}
public Builder setViewableVideo50Requests(List<e> list) {
this.viewableVideo50Requests = list;
return this;
}
}
public class a implements ArrayService.DirectDownloadListener {
final Uri f4202a;
final Uri f4203b;
final Context f4204c;
public a(Uri uri, Uri uri2, Context context) {
this.f4202a = uri;
this.f4203b = uri2;
this.f4204c = context;
}
@Override
public void onEvent(String str, Bundle bundle) {
}
@Override
public void onFailure() {
AppLovinNativeAdImpl.this.launchUri(this.f4202a, this.f4203b, this.f4204c);
}
}
public static class b implements View.OnAttachStateChangeListener {
private final AppLovinNativeAdImpl f4206a;
public b(AppLovinNativeAdImpl appLovinNativeAdImpl) {
this.f4206a = appLovinNativeAdImpl;
}
public boolean a(Object obj) {
return obj instanceof b;
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof b)) {
return false;
}
b bVar = (b) obj;
if (!bVar.a(this)) {
return false;
}
AppLovinNativeAdImpl a10 = a();
AppLovinNativeAdImpl a11 = bVar.a();
return a10 != null ? a10.equals(a11) : a11 == null;
}
public int hashCode() {
AppLovinNativeAdImpl a10 = a();
return (a10 == null ? 43 : a10.hashCode()) + 59;
}
@Override
public void onViewAttachedToWindow(View view) {
this.f4206a.maybeHandleOnAttachedToWindow(view);
}
@Override
public void onViewDetachedFromWindow(View view) {
}
public String toString() {
return "AppLovinNativeAdImpl.OnAttachStateChangeHandler(ad=" + a() + ")";
}
public AppLovinNativeAdImpl a() {
return this.f4206a;
}
}
public class c implements t7.a {
private final List f4207a;
public c(List list) {
this.f4207a = list;
}
public boolean a(Object obj) {
return obj instanceof c;
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof c)) {
return false;
}
c cVar = (c) obj;
if (!cVar.a(this)) {
return false;
}
List a10 = a();
List a11 = cVar.a();
return a10 != null ? a10.equals(a11) : a11 == null;
}
public int hashCode() {
List a10 = a();
return (a10 == null ? 43 : a10.hashCode()) + 59;
}
@Override
public void onLogVisibilityImpression() {
Iterator it = this.f4207a.iterator();
while (it.hasNext()) {
((AppLovinAdBase) AppLovinNativeAdImpl.this).sdk.f0().dispatchPostbackRequest((e) it.next(), null);
}
}
public String toString() {
return "AppLovinNativeAdImpl.VisibilityCallback(requests=" + a() + ")";
}
public List a() {
return this.f4207a;
}
}
public AppLovinNativeAdImpl(Builder builder, a aVar) {
this(builder);
}
private List<com.applovin.impl.e> getDirectClickTrackingPostbacks() {
List<com.applovin.impl.e> a10;
v4 v4Var = this.synchronizedAdObject;
if (v4Var != null) {
return (List) v4Var.a(new com.applovin.impl.sdk.nativeAd.c(0, this));
}
synchronized (this.adObjectLock) {
a10 = a7.a(getJsonObjectFromAdObject("click_tracking_urls", new JSONObject()), getClCode(), getStringFromAdObject("click_tracking_url", null), this.sdk);
}
return a10;
}
private List<String> getPrivacySandboxClickAttributionUrls() {
return getStringListFromAdObject("privacy_sandbox_click_attribution_urls", Collections.EMPTY_LIST);
}
private List<String> getPrivacySandboxImpressionAttributionUrls() {
return getStringListFromAdObject("privacy_sandbox_impression_attribution_urls", Collections.EMPTY_LIST);
}
private boolean isDspAd() {
return AD_RESPONSE_TYPE_ORTB.equalsIgnoreCase(getType());
}
public List lambda$getDirectClickTrackingPostbacks$1(v4 v4Var) {
return a7.a(v4Var.a("click_tracking_urls", new JSONObject()), getClCode(), v4Var.a("click_tracking_url", (String) null), this.sdk);
}
public static Bundle lambda$getDirectDownloadParameters$4(v4 v4Var) {
return JsonUtils.toBundle(v4Var.a("ah_parameters", (JSONObject) null));
}
public List lambda$getOpenMeasurementVerificationScriptResources$2(JSONArray jSONArray) {
if (jSONArray == null) {
return Collections.EMPTY_LIST;
}
ArrayList arrayList = new ArrayList();
for (int i10 = 0; i10 < jSONArray.length(); i10++) {
JSONObject jSONObject = JsonUtils.getJSONObject(jSONArray, i10, (JSONObject) null);
try {
URL url = new URL(JsonUtils.getString(jSONObject, "url", null));
String string = JsonUtils.getString(jSONObject, "vendor_key", null);
String string2 = JsonUtils.getString(jSONObject, "parameters", null);
if (StringUtils.isValidString(string) && StringUtils.isValidString(string2)) {
arrayList.add(VerificationScriptResource.createVerificationScriptResourceWithParameters(string, url, string2));
} else {
arrayList.add(VerificationScriptResource.createVerificationScriptResourceWithoutParameters(url));
}
} catch (Throwable th) {
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Failed to parse OMID verification script resource", th);
}
}
}
return arrayList;
}
public static List lambda$getOpenMeasurementVerificationScriptResources$3(s.a aVar, v4 v4Var) {
return (List) aVar.apply(v4Var.a("omid_verification_script_resources", (JSONArray) null));
}
public void lambda$unregisterViewsForInteraction$0() {
for (View view : this.registeredViews) {
view.setOnTouchListener(null);
view.setOnClickListener(null);
}
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Unregistered views: " + this.registeredViews);
}
this.registeredViews.clear();
t7 t7Var = this.viewableMRC50Tracker;
if (t7Var != null) {
t7Var.b();
}
t7 t7Var2 = this.viewableMRC100Tracker;
if (t7Var2 != null) {
t7Var2.b();
}
t7 t7Var3 = this.viewableVideoMRC50Tracker;
if (t7Var3 != null) {
t7Var3.b();
}
ViewGroup viewGroup = this.nativeAdView;
if (viewGroup != null) {
viewGroup.removeOnAttachStateChangeListener(this.onAttachStateChangeHandler);
this.nativeAdView = null;
}
AppLovinMediaView appLovinMediaView = this.mediaView;
if (appLovinMediaView != null) {
appLovinMediaView.destroy();
}
AppLovinOptionsView appLovinOptionsView = this.optionsView;
if (appLovinOptionsView != null) {
appLovinOptionsView.destroy();
}
}
public void launchUri(Uri uri, Uri uri2, Context context) {
if (x6.a(uri, context, this.sdk)) {
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Opening URL: " + uri);
return;
}
return;
}
if (x6.a(uri2, context, this.sdk)) {
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Opening backup URL: " + uri2);
}
}
}
public void maybeHandleOnAttachedToWindow(View view) {
if (this.impressionTracked.compareAndSet(false, true)) {
t7 t7Var = new t7(this.nativeAdView, this.sdk, this.viewableMRC50Callback);
this.viewableMRC50Tracker = t7Var;
TimeUnit timeUnit = TimeUnit.SECONDS;
t7Var.a(0, 50.0f, 50.0f, timeUnit.toMillis(1L), this.nativeAdView);
t7 t7Var2 = new t7(this.nativeAdView, this.sdk, this.viewableMRC100Callback);
this.viewableMRC100Tracker = t7Var2;
t7Var2.a(0, 100.0f, 100.0f, timeUnit.toMillis(1L), this.nativeAdView);
b7 b7Var = this.vastAd;
if (b7Var != null && b7Var.hasVideoUrl()) {
t7 t7Var3 = new t7(this.nativeAdView, this.sdk, this.viewableVideoMRC50Callback);
this.viewableVideoMRC50Tracker = t7Var3;
t7Var3.a(0, 50.0f, 50.0f, timeUnit.toMillis(2L), this.videoView);
}
List<String> list = this.jsTrackers;
if (list != null) {
Iterator<String> it = list.iterator();
while (it.hasNext()) {
this.sdk.x0().b(it.next());
}
}
Iterator<e> it2 = this.impressionRequests.iterator();
while (it2.hasNext()) {
this.sdk.f0().dispatchPostbackRequest(it2.next(), null);
}
this.adEventTracker.a(view);
this.adEventTracker.g();
if (this.sdk.g0() != null) {
this.sdk.g0().b(getPrivacySandboxImpressionAttributionUrls());
}
}
}
@Override
public void destroy() {
unregisterViewsForInteraction();
this.eventListener = null;
this.adEventTracker.f();
}
@Override
public long getAdIdNumber() {
return getLongFromAdObject("ad_id", -1L);
}
@Override
public String getAdvertiser() {
return this.advertiser;
}
@Override
public String getBody() {
return this.body;
}
public String getCachePrefix() {
return getStringFromAdObject("cache_prefix", null);
}
@Override
public String getCallToAction() {
return this.callToAction;
}
@Override
public Bundle getDirectDownloadParameters() {
v4 v4Var = this.synchronizedAdObject;
return v4Var != null ? (Bundle) v4Var.a(new i(23)) : JsonUtils.toBundle(getJsonObjectFromAdObject("ah_parameters", null));
}
@Override
public String getDirectDownloadToken() {
return getStringFromAdObject("ah_dd_token", null);
}
@Override
public Uri getIconUri() {
return this.iconUri;
}
public float getMainImageAspectRatio() {
return this.mainImageAspectRatio;
}
public Uri getMainImageUri() {
return this.mainImageUri;
}
@Override
public AppLovinMediaView getMediaView() {
return this.mediaView;
}
@Override
public String getOpenMeasurementContentUrl() {
return getStringFromAdObject("omid_content_url", null);
}
@Override
public String getOpenMeasurementCustomReferenceData() {
return getStringFromAdObject("omid_custom_ref_data", "");
}
@Override
public List<VerificationScriptResource> getOpenMeasurementVerificationScriptResources() {
List<VerificationScriptResource> lambda$getOpenMeasurementVerificationScriptResources$2;
if (this.sdk.d0().e()) {
return Collections.singletonList(VerificationScriptResource.createVerificationScriptResourceWithParameters(x3.c(), x3.b(), x3.a()));
}
com.applovin.impl.sdk.nativeAd.c cVar = new com.applovin.impl.sdk.nativeAd.c(1, this);
v4 v4Var = this.synchronizedAdObject;
if (v4Var != null) {
return (List) v4Var.a(new com.applovin.impl.sdk.nativeAd.c(2, cVar));
}
synchronized (this.adObjectLock) {
lambda$getOpenMeasurementVerificationScriptResources$2 = lambda$getOpenMeasurementVerificationScriptResources$2(getJsonArrayFromAdObject("omid_verification_script_resources", null));
}
return lambda$getOpenMeasurementVerificationScriptResources$2;
}
@Override
public AppLovinOptionsView getOptionsView() {
return this.optionsView;
}
public Uri getPrivacyDestinationUri() {
return this.privacyDestinationUri;
}
public Uri getPrivacyIconUri() {
return this.privacyIconUri;
}
@Override
public Double getStarRating() {
return this.starRating;
}
@Override
public String getTitle() {
return this.title;
}
public String getType() {
return getStringFromAdObject("type", AD_RESPONSE_TYPE_UNDEFINED);
}
public b7 getVastAd() {
return this.vastAd;
}
public void handleNativeAdClick(Uri uri, Uri uri2, MotionEvent motionEvent, Context context) {
if (this.sdk.g0() != null) {
this.sdk.g0().b(getPrivacySandboxClickAttributionUrls(), motionEvent);
}
handleNativeAdClick(uri, uri2, context);
}
@Override
public boolean isDirectDownloadEnabled() {
return StringUtils.isValidString(getDirectDownloadToken());
}
@Override
public boolean isOpenMeasurementEnabled() {
if (this.sdk.d0().e()) {
return true;
}
return getBooleanFromAdObject("omsdk_enabled", Boolean.FALSE);
}
@Override
public void onClick(View view) {
Context context;
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Handle view clicked");
}
this.sdk.k().maybeSubmitPersistentPostbacks(getDirectClickTrackingPostbacks());
if (((Boolean) this.sdk.a(l4.f3021x)).booleanValue()) {
context = r7.b(this.nativeAdView, this.sdk);
if (context == null) {
context = view.getContext();
}
} else {
context = view.getContext();
}
handleNativeAdClick(this.clickDestinationUri, this.clickDestinationBackupUri, context);
}
@Override
public void registerViewsForInteraction(List<View> list, ViewGroup viewGroup) {
this.nativeAdView = viewGroup;
if (viewGroup.isAttachedToWindow()) {
maybeHandleOnAttachedToWindow(this.nativeAdView);
} else {
this.nativeAdView.addOnAttachStateChangeListener(this.onAttachStateChangeHandler);
}
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Registered ad view for impressions: " + this.nativeAdView);
}
if (this.clickDestinationUri == null && this.clickDestinationBackupUri == null) {
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Skipping click registration - no click URLs provided");
return;
}
return;
}
for (View view : list) {
if (view.hasOnClickListeners()) {
this.sdk.O();
if (o.a()) {
this.sdk.O().k(this.tag, "View has an onClickListener already - " + view);
}
}
if (!view.isClickable()) {
this.sdk.O();
if (o.a()) {
this.sdk.O().k(this.tag, "View is not clickable - " + view);
}
}
if (!view.isEnabled()) {
this.sdk.O();
if (o.a()) {
this.sdk.O().b(this.tag, "View is not enabled - " + view);
}
}
if (view instanceof Button) {
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Registering click for button: " + view);
}
} else {
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Registering click for view: " + view);
}
}
if (((Boolean) this.sdk.a(l4.f3039z2)).booleanValue()) {
view.setOnTouchListener(new AppLovinTouchToClickListener(this.sdk, l4.k0, viewGroup.getContext(), this));
} else {
view.setOnClickListener(this);
}
this.registeredViews.add(view);
}
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Registered views: " + this.registeredViews);
}
}
public void setEventListener(AppLovinNativeAdEventListener appLovinNativeAdEventListener) {
this.eventListener = appLovinNativeAdEventListener;
}
public void setIconUri(Uri uri) {
this.iconUri = uri;
}
public void setMainImageAspectRatio(float f10) {
this.mainImageAspectRatio = f10;
}
public void setMainImageUri(Uri uri) {
this.mainImageUri = uri;
}
public void setPrivacyIconUri(Uri uri) {
this.privacyIconUri = uri;
}
public void setUpNativeAdViewComponents() {
b7 b7Var = this.vastAd;
if (b7Var == null || !b7Var.hasVideoUrl()) {
this.mediaView = new AppLovinMediaView(this, this.sdk, k.o());
} else {
try {
this.mediaView = new AppLovinVastMediaView(this, this.sdk, k.o());
} catch (Throwable th) {
this.sdk.O();
if (o.a()) {
this.sdk.O().d(this.tag, "Failed to create MediaPlayer VAST media view. Falling back to static image for media view.", th);
}
this.sdk.E().a(TAG, "createMediaPlayerVASTMediaView", th);
this.mediaView = new AppLovinMediaView(this, this.sdk, k.o());
}
}
if (this.privacyDestinationUri != null) {
this.optionsView = new AppLovinOptionsView(this, this.sdk, k.o());
return;
}
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Privacy icon will not render because no native ad privacy URL is provided.");
}
}
public void setVideoView(View view) {
this.videoView = view;
}
public String toString() {
return "AppLovinNativeAd{adIdNumber=" + getAdIdNumber() + " - " + getTitle() + "}";
}
@Override
public void unregisterViewsForInteraction() {
AppLovinSdkUtils.runOnUiThread(new d(2, this));
}
private AppLovinNativeAdImpl(Builder builder) {
super(builder.adObject, builder.fullResponse, builder.sdk);
this.impressionTracked = new AtomicBoolean();
this.registeredViews = new ArrayList();
this.onAttachStateChangeHandler = new b(this);
this.adEventTracker = new v3(this);
this.title = builder.title;
this.advertiser = builder.advertiser;
this.body = builder.body;
this.callToAction = builder.callToAction;
this.iconUri = builder.iconUri;
this.mainImageUri = builder.mainImageUri;
this.mainImageAspectRatio = builder.mainImageAspectRatio;
this.privacyIconUri = builder.privacyIconUri;
b7 b7Var = builder.vastAd;
this.vastAd = b7Var;
this.clickDestinationUri = builder.clickDestinationUri;
this.clickDestinationBackupUri = builder.clickDestinationBackupUri;
this.clickTrackingUrls = builder.clickTrackingUrls;
this.jsTrackers = builder.jsTrackers;
this.clickTrackingRequests = builder.clickTrackingRequests;
this.impressionRequests = builder.impressionRequests;
Double d4 = builder.starRating;
this.starRating = (d4 == null || d4.doubleValue() < 3.0d) ? null : d4;
if (builder.privacyDestinationUri != null) {
this.privacyDestinationUri = builder.privacyDestinationUri;
} else if (!isDspAd() || getSdk().s0().c()) {
this.privacyDestinationUri = Uri.parse(DEFAULT_APPLOVIN_PRIVACY_URL);
}
this.viewableMRC50Callback = new c(builder.viewableMRC50Requests);
this.viewableMRC100Callback = new c(builder.viewableMRC100Requests);
if (b7Var != null && b7Var.hasVideoUrl()) {
this.viewableVideoMRC50Callback = new c(builder.viewableVideo50Requests);
}
this.tag = "AppLovinNativeAd:" + getAdIdNumber();
}
@Override
public v3 getAdEventTracker() {
return this.adEventTracker;
}
private void handleNativeAdClick(Uri uri, Uri uri2, Context context) {
if (this.clickTrackingRequests.size() > 0) {
Iterator<e> it = this.clickTrackingRequests.iterator();
while (it.hasNext()) {
this.sdk.f0().dispatchPostbackRequest(it.next(), null);
}
} else {
Iterator<String> it2 = this.clickTrackingUrls.iterator();
while (it2.hasNext()) {
this.sdk.f0().dispatchPostbackAsync(it2.next(), null);
}
}
l2.b(this.eventListener, this);
if (isDirectDownloadEnabled()) {
this.sdk.p().startDirectInstallOrDownloadProcess(this, null, new a(uri, uri2, context));
} else {
launchUri(uri, uri2, context);
}
}
@Override
public void onClick(View view, MotionEvent motionEvent) {
Context context;
this.sdk.O();
if (o.a()) {
this.sdk.O().a(this.tag, "Handle view clicked");
}
this.sdk.k().maybeSubmitPersistentPostbacks(getDirectClickTrackingPostbacks());
if (((Boolean) this.sdk.a(l4.f3021x)).booleanValue()) {
context = r7.b(this.nativeAdView, this.sdk);
if (context == null) {
context = view.getContext();
}
} else {
context = view.getContext();
}
handleNativeAdClick(this.clickDestinationUri, this.clickDestinationBackupUri, motionEvent, context);
}
}