Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package com.unity3d.ads;
/* loaded from: classes4.dex */
public final class BuildConfig {
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String LIBRARY_PACKAGE_NAME = "com.unity3d.ads";
public static final int VERSION_CODE = 41203;
public static final String VERSION_NAME = "4.12.3";
public static final String WEBVIEW_BRANCH = "4.12.3";
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.ads;
import com.unity3d.ads.UnityAds;
/* loaded from: classes4.dex */
public interface IUnityAdsInitializationListener {
void onInitializationComplete();
void onInitializationFailed(UnityAds.UnityAdsInitializationError unityAdsInitializationError, String str);
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.ads;
import com.unity3d.ads.UnityAds;
/* loaded from: classes4.dex */
public interface IUnityAdsLoadListener {
void onUnityAdsAdLoaded(String str);
void onUnityAdsFailedToLoad(String str, UnityAds.UnityAdsLoadError unityAdsLoadError, String str2);
}

View File

@@ -0,0 +1,14 @@
package com.unity3d.ads;
import com.unity3d.ads.UnityAds;
/* loaded from: classes4.dex */
public interface IUnityAdsShowListener {
void onUnityAdsShowClick(String str);
void onUnityAdsShowComplete(String str, UnityAds.UnityAdsShowCompletionState unityAdsShowCompletionState);
void onUnityAdsShowFailure(String str, UnityAds.UnityAdsShowError unityAdsShowError, String str2);
void onUnityAdsShowStart(String str);
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads;
/* loaded from: classes4.dex */
public interface IUnityAdsTokenListener {
void onUnityAdsTokenReady(String str);
}

View File

@@ -0,0 +1,7 @@
package com.unity3d.ads;
/* loaded from: classes4.dex */
public final class R {
private R() {
}
}

View File

@@ -0,0 +1,151 @@
package com.unity3d.ads;
import android.app.Activity;
import android.content.Context;
import com.unity3d.ads.UnityAds;
import com.unity3d.services.ads.IUnityAds;
import com.unity3d.services.ads.UnityAdsImplementation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class UnityAds {
public static final UnityAds INSTANCE = new UnityAds();
public enum UnityAdsInitializationError {
INTERNAL_ERROR,
INVALID_ARGUMENT,
AD_BLOCKER_DETECTED
}
public enum UnityAdsLoadError {
INITIALIZE_FAILED,
INTERNAL_ERROR,
INVALID_ARGUMENT,
NO_FILL,
TIMEOUT
}
public enum UnityAdsShowCompletionState {
SKIPPED,
COMPLETED
}
public enum UnityAdsShowError {
NOT_INITIALIZED,
NOT_READY,
VIDEO_PLAYER_ERROR,
INVALID_ARGUMENT,
NO_CONNECTION,
ALREADY_SHOWING,
INTERNAL_ERROR,
TIMEOUT
}
public static /* synthetic */ void getDebugMode$annotations() {
}
public static /* synthetic */ void getToken$annotations() {
}
public static /* synthetic */ void getVersion$annotations() {
}
public static /* synthetic */ void isInitialized$annotations() {
}
public static /* synthetic */ void isSupported$annotations() {
}
private UnityAds() {
}
public static final void initialize(Context context, String str) {
UnityAdsImplementation.getInstance().initialize(context, str, false, null);
}
public static final void initialize(Context context, String str, IUnityAdsInitializationListener iUnityAdsInitializationListener) {
UnityAdsImplementation.getInstance().initialize(context, str, false, iUnityAdsInitializationListener);
}
public static final void initialize(Context context, String str, boolean z) {
UnityAdsImplementation.getInstance().initialize(context, str, z, null);
}
public static final void initialize(Context context, String str, boolean z, IUnityAdsInitializationListener iUnityAdsInitializationListener) {
UnityAdsImplementation.getInstance().initialize(context, str, z, iUnityAdsInitializationListener);
}
public static final boolean isInitialized() {
return UnityAdsImplementation.getInstance().isInitialized();
}
public static final boolean isSupported() {
return UnityAdsImplementation.getInstance().isSupported();
}
public static final String getVersion() {
String version = UnityAdsImplementation.getInstance().getVersion();
Intrinsics.checkNotNullExpressionValue(version, "getInstance().version");
return version;
}
public static final void show(Activity activity, String str) {
UnityAdsImplementation.getInstance().show(activity, str, new UnityAdsShowOptions(), null);
}
public static final void show(Activity activity, String str, IUnityAdsShowListener iUnityAdsShowListener) {
UnityAdsImplementation.getInstance().show(activity, str, new UnityAdsShowOptions(), iUnityAdsShowListener);
}
public static final void show(Activity activity, String str, UnityAdsShowOptions unityAdsShowOptions) {
UnityAdsImplementation.getInstance().show(activity, str, unityAdsShowOptions, null);
}
public static final void show(Activity activity, String str, UnityAdsShowOptions unityAdsShowOptions, IUnityAdsShowListener iUnityAdsShowListener) {
UnityAdsImplementation.getInstance().show(activity, str, unityAdsShowOptions, iUnityAdsShowListener);
}
public static final boolean getDebugMode() {
return UnityAdsImplementation.getInstance().getDebugMode();
}
public static final void setDebugMode(boolean z) {
UnityAdsImplementation.getInstance().setDebugMode(z);
}
public static final void load(String str) {
load(str, new IUnityAdsLoadListener() { // from class: com.unity3d.ads.UnityAds$load$1
@Override // com.unity3d.ads.IUnityAdsLoadListener
public void onUnityAdsAdLoaded(String placementId) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
}
@Override // com.unity3d.ads.IUnityAdsLoadListener
public void onUnityAdsFailedToLoad(String placementId, UnityAds.UnityAdsLoadError error, String message) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(error, "error");
Intrinsics.checkNotNullParameter(message, "message");
}
});
}
public static final void load(String str, IUnityAdsLoadListener iUnityAdsLoadListener) {
UnityAdsImplementation.getInstance().load(str, new UnityAdsLoadOptions(), iUnityAdsLoadListener);
}
public static final void load(String str, UnityAdsLoadOptions unityAdsLoadOptions, IUnityAdsLoadListener iUnityAdsLoadListener) {
IUnityAds unityAdsImplementation = UnityAdsImplementation.getInstance();
if (unityAdsLoadOptions == null) {
unityAdsLoadOptions = new UnityAdsLoadOptions();
}
unityAdsImplementation.load(str, unityAdsLoadOptions, iUnityAdsLoadListener);
}
public static final String getToken() {
return UnityAdsImplementation.getInstance().getToken();
}
public static final void getToken(IUnityAdsTokenListener iUnityAdsTokenListener) {
UnityAdsImplementation.getInstance().getToken(iUnityAdsTokenListener);
}
}

View File

@@ -0,0 +1,38 @@
package com.unity3d.ads;
import com.unity3d.services.core.log.DeviceLog;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class UnityAdsBaseOptions {
private String OBJECT_ID = "objectId";
private JSONObject _data = new JSONObject();
public JSONObject getData() {
return this._data;
}
public void set(String str, String str2) {
if (str == null || str2 == null) {
return;
}
try {
this._data.put(str, str2);
} catch (JSONException e) {
DeviceLog.exception("Failed to set Unity Ads options", e);
}
}
public void setObjectId(String str) {
set(this.OBJECT_ID, str);
}
public String getObjectId() {
try {
return this._data.getString(this.OBJECT_ID);
} catch (JSONException unused) {
return null;
}
}
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.ads;
/* loaded from: classes4.dex */
public class UnityAdsLoadOptions extends UnityAdsBaseOptions {
private String AD_MARKUP = "adMarkup";
public void setAdMarkup(String str) {
set(this.AD_MARKUP, str);
}
}

View File

@@ -0,0 +1,5 @@
package com.unity3d.ads;
/* loaded from: classes4.dex */
public class UnityAdsShowOptions extends UnityAdsBaseOptions {
}

View File

@@ -0,0 +1,80 @@
package com.unity3d.ads.adplayer;
import androidx.annotation.CallSuper;
import java.util.Map;
import kotlin.NotImplementedError;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.MutableSharedFlow;
import kotlinx.coroutines.flow.SharedFlowKt;
/* loaded from: classes4.dex */
public interface AdPlayer {
public static final Companion Companion = Companion.$$INSTANCE;
@CallSuper
Object destroy(Continuation continuation);
void dispatchShowCompleted();
Flow getOnLoadEvent();
Flow getOnShowEvent();
CoroutineScope getScope();
Flow getUpdateCampaignState();
WebViewContainer getWebViewContainer();
Object onAllowedPiiChange(byte[] bArr, Continuation continuation);
Object onBroadcastEvent(String str, Continuation continuation);
Object requestShow(Map<String, ? extends Object> map, Continuation continuation);
Object sendActivityDestroyed(Continuation continuation);
Object sendFocusChange(boolean z, Continuation continuation);
Object sendMuteChange(boolean z, Continuation continuation);
Object sendPrivacyFsmChange(byte[] bArr, Continuation continuation);
Object sendUserConsentChange(byte[] bArr, Continuation continuation);
Object sendVisibilityChange(boolean z, Continuation continuation);
Object sendVolumeChange(double d, Continuation continuation);
void show(ShowOptions showOptions);
public static final class DefaultImpls {
public static void show(AdPlayer adPlayer, ShowOptions showOptions) {
Intrinsics.checkNotNullParameter(showOptions, "showOptions");
throw new NotImplementedError(null, 1, null);
}
@CallSuper
public static Object destroy(AdPlayer adPlayer, Continuation continuation) {
CoroutineScopeKt.cancel$default(adPlayer.getScope(), null, 1, null);
return Unit.INSTANCE;
}
}
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private static final MutableSharedFlow broadcastEventChannel = SharedFlowKt.MutableSharedFlow$default(0, 0, null, 7, null);
public final MutableSharedFlow getBroadcastEventChannel() {
return broadcastEventChannel;
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,14 @@
package com.unity3d.ads.adplayer;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* loaded from: classes4.dex */
public abstract class AdPlayerError extends Exception {
public /* synthetic */ AdPlayerError(String str, DefaultConstructorMarker defaultConstructorMarker) {
this(str);
}
private AdPlayerError(String str) {
super(str);
}
}

View File

@@ -0,0 +1,24 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineDispatcher;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
/* loaded from: classes4.dex */
public final class AdPlayerScope implements CoroutineScope {
private final /* synthetic */ CoroutineScope $$delegate_0;
private final CoroutineDispatcher defaultDispatcher;
@Override // kotlinx.coroutines.CoroutineScope
public CoroutineContext getCoroutineContext() {
return this.$$delegate_0.getCoroutineContext();
}
public AdPlayerScope(CoroutineDispatcher defaultDispatcher) {
Intrinsics.checkNotNullParameter(defaultDispatcher, "defaultDispatcher");
this.defaultDispatcher = defaultDispatcher;
this.$$delegate_0 = CoroutineScopeKt.CoroutineScope(defaultDispatcher);
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer", f = "AndroidEmbeddableWebViewAdPlayer.kt", l = {57, 60, 62}, m = "destroy")
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer$destroy$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidEmbeddableWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidEmbeddableWebViewAdPlayer$destroy$1(AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer, Continuation continuation) {
super(continuation);
this.this$0 = androidEmbeddableWebViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.destroy(this);
}
}

View File

@@ -0,0 +1,52 @@
package com.unity3d.ads.adplayer;
import android.content.Context;
import android.view.ViewGroup;
import com.unity3d.services.banners.BannerView;
import com.unity3d.services.core.misc.ViewUtilities;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$show$1", f = "AndroidEmbeddableWebViewAdPlayer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer$show$1 extends SuspendLambda implements Function2 {
final /* synthetic */ BannerView $bannerView;
final /* synthetic */ Context $context;
int label;
final /* synthetic */ AndroidEmbeddableWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidEmbeddableWebViewAdPlayer$show$1(AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer, Context context, BannerView bannerView, Continuation continuation) {
super(2, continuation);
this.this$0 = androidEmbeddableWebViewAdPlayer;
this.$context = context;
this.$bannerView = bannerView;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidEmbeddableWebViewAdPlayer$show$1(this.this$0, this.$context, this.$bannerView, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidEmbeddableWebViewAdPlayer$show$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
this.this$0.getWebViewContainer().getWebView().setLayoutParams(new ViewGroup.LayoutParams((int) ViewUtilities.pxFromDp(this.$context, this.$bannerView.getSize().getWidth()), (int) ViewUtilities.pxFromDp(this.$context, this.$bannerView.getSize().getHeight())));
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,58 @@
package com.unity3d.ads.adplayer;
import java.util.Map;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$show$2$1", f = "AndroidEmbeddableWebViewAdPlayer.kt", l = {36}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer$show$2$1 extends SuspendLambda implements Function2 {
final /* synthetic */ ShowOptions $showOptions;
int label;
final /* synthetic */ AndroidEmbeddableWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidEmbeddableWebViewAdPlayer$show$2$1(AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer, ShowOptions showOptions, Continuation continuation) {
super(2, continuation);
this.this$0 = androidEmbeddableWebViewAdPlayer;
this.$showOptions = showOptions;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidEmbeddableWebViewAdPlayer$show$2$1(this.this$0, this.$showOptions, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidEmbeddableWebViewAdPlayer$show$2$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
WebViewAdPlayer webViewAdPlayer = this.this$0.webViewAdPlayer;
Map<String, Object> unityAdsShowOptions = ((AndroidShowOptions) this.$showOptions).getUnityAdsShowOptions();
this.label = 1;
if (webViewAdPlayer.requestShow(unityAdsShowOptions, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,54 @@
package com.unity3d.ads.adplayer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$show$2$2$1", f = "AndroidEmbeddableWebViewAdPlayer.kt", l = {41}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer$show$2$2$1 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ AndroidEmbeddableWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidEmbeddableWebViewAdPlayer$show$2$2$1(AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer, Continuation continuation) {
super(2, continuation);
this.this$0 = androidEmbeddableWebViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidEmbeddableWebViewAdPlayer$show$2$2$1(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidEmbeddableWebViewAdPlayer$show$2$2$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer = this.this$0;
this.label = 1;
if (androidEmbeddableWebViewAdPlayer.destroy(this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,47 @@
package com.unity3d.ads.adplayer;
import com.unity3d.services.banners.BannerView;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$show$3", f = "AndroidEmbeddableWebViewAdPlayer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer$show$3 extends SuspendLambda implements Function2 {
final /* synthetic */ BannerView $bannerView;
int label;
final /* synthetic */ AndroidEmbeddableWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidEmbeddableWebViewAdPlayer$show$3(BannerView bannerView, AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer, Continuation continuation) {
super(2, continuation);
this.$bannerView = bannerView;
this.this$0 = androidEmbeddableWebViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidEmbeddableWebViewAdPlayer$show$3(this.$bannerView, this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidEmbeddableWebViewAdPlayer$show$3) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
this.$bannerView.addView(this.this$0.getWebViewContainer().getWebView());
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,30 @@
package com.unity3d.ads.adplayer;
import android.view.View;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
@SourceDebugExtension({"SMAP\nView.kt\nKotlin\n*S Kotlin\n*F\n+ 1 View.kt\nandroidx/core/view/ViewKt$doOnDetach$1\n+ 2 AndroidEmbeddableWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidEmbeddableWebViewAdPlayer\n*L\n1#1,432:1\n40#2,4:433\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer$show$lambda$2$$inlined$doOnDetach$1 implements View.OnAttachStateChangeListener {
final /* synthetic */ View $this_doOnDetach;
final /* synthetic */ AndroidEmbeddableWebViewAdPlayer this$0;
@Override // android.view.View.OnAttachStateChangeListener
public void onViewAttachedToWindow(View view) {
Intrinsics.checkNotNullParameter(view, "view");
}
public AndroidEmbeddableWebViewAdPlayer$show$lambda$2$$inlined$doOnDetach$1(View view, AndroidEmbeddableWebViewAdPlayer androidEmbeddableWebViewAdPlayer) {
this.$this_doOnDetach = view;
this.this$0 = androidEmbeddableWebViewAdPlayer;
}
@Override // android.view.View.OnAttachStateChangeListener
public void onViewDetachedFromWindow(View view) {
Intrinsics.checkNotNullParameter(view, "view");
this.$this_doOnDetach.removeOnAttachStateChangeListener(this);
BuildersKt__Builders_commonKt.launch$default(this.this$0.webViewAdPlayer.getScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$2$2$1(this.this$0, null), 3, null);
}
}

View File

@@ -0,0 +1,254 @@
package com.unity3d.ads.adplayer;
import android.content.Context;
import android.view.View;
import android.webkit.WebView;
import androidx.core.view.ViewCompat;
import com.unity3d.ads.core.data.repository.OpenMeasurementRepository;
import com.unity3d.ads.core.extensions.ProtobufExtensionsKt;
import com.unity3d.services.banners.BannerView;
import com.unity3d.services.banners.BannerViewCache;
import java.util.Map;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.flow.Flow;
@SourceDebugExtension({"SMAP\nAndroidEmbeddableWebViewAdPlayer.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidEmbeddableWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidEmbeddableWebViewAdPlayer\n+ 2 View.kt\nandroidx/core/view/ViewKt\n*L\n1#1,64:1\n96#2,2:65\n120#2,13:67\n99#2,10:80\n*S KotlinDebug\n*F\n+ 1 AndroidEmbeddableWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidEmbeddableWebViewAdPlayer\n*L\n34#1:65,2\n39#1:67,13\n34#1:80,10\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidEmbeddableWebViewAdPlayer implements AdPlayer, EmbeddableAdPlayer {
private final OpenMeasurementRepository openMeasurementRepository;
private final String opportunityId;
private final WebViewAdPlayer webViewAdPlayer;
private final AndroidWebViewContainer webViewContainer;
@Override // com.unity3d.ads.adplayer.AdPlayer
public void dispatchShowCompleted() {
this.webViewAdPlayer.dispatchShowCompleted();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Flow getOnLoadEvent() {
return this.webViewAdPlayer.getOnLoadEvent();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Flow getOnShowEvent() {
return this.webViewAdPlayer.getOnShowEvent();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public CoroutineScope getScope() {
return this.webViewAdPlayer.getScope();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Flow getUpdateCampaignState() {
return this.webViewAdPlayer.getUpdateCampaignState();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public AndroidWebViewContainer getWebViewContainer() {
return this.webViewContainer;
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object onAllowedPiiChange(byte[] bArr, Continuation continuation) {
return this.webViewAdPlayer.onAllowedPiiChange(bArr, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object onBroadcastEvent(String str, Continuation continuation) {
return this.webViewAdPlayer.onBroadcastEvent(str, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object requestShow(Map<String, ? extends Object> map, Continuation continuation) {
return this.webViewAdPlayer.requestShow(map, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendActivityDestroyed(Continuation continuation) {
return this.webViewAdPlayer.sendActivityDestroyed(continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendFocusChange(boolean z, Continuation continuation) {
return this.webViewAdPlayer.sendFocusChange(z, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendMuteChange(boolean z, Continuation continuation) {
return this.webViewAdPlayer.sendMuteChange(z, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendPrivacyFsmChange(byte[] bArr, Continuation continuation) {
return this.webViewAdPlayer.sendPrivacyFsmChange(bArr, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendUserConsentChange(byte[] bArr, Continuation continuation) {
return this.webViewAdPlayer.sendUserConsentChange(bArr, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendVisibilityChange(boolean z, Continuation continuation) {
return this.webViewAdPlayer.sendVisibilityChange(z, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendVolumeChange(double d, Continuation continuation) {
return this.webViewAdPlayer.sendVolumeChange(d, continuation);
}
public AndroidEmbeddableWebViewAdPlayer(WebViewAdPlayer webViewAdPlayer, String opportunityId, AndroidWebViewContainer webViewContainer, OpenMeasurementRepository openMeasurementRepository) {
Intrinsics.checkNotNullParameter(webViewAdPlayer, "webViewAdPlayer");
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(webViewContainer, "webViewContainer");
Intrinsics.checkNotNullParameter(openMeasurementRepository, "openMeasurementRepository");
this.webViewAdPlayer = webViewAdPlayer;
this.opportunityId = opportunityId;
this.webViewContainer = webViewContainer;
this.openMeasurementRepository = openMeasurementRepository;
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public void show(final ShowOptions showOptions) {
Intrinsics.checkNotNullParameter(showOptions, "showOptions");
if (!(showOptions instanceof AndroidShowOptions)) {
throw new IllegalArgumentException("Failed requirement.".toString());
}
Context context = ((AndroidShowOptions) showOptions).getContext();
BannerView bannerView = BannerViewCache.getInstance().getBannerView(ProtobufExtensionsKt.toUUID(ProtobufExtensionsKt.toISO8859ByteString(this.opportunityId)).toString());
if (bannerView != null) {
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.MainScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$1(this, context, bannerView, null), 3, null);
final WebView webView = getWebViewContainer().getWebView();
if (ViewCompat.isAttachedToWindow(webView)) {
BuildersKt__Builders_commonKt.launch$default(this.webViewAdPlayer.getScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$2$1(this, showOptions, null), 3, null);
if (!ViewCompat.isAttachedToWindow(webView)) {
BuildersKt__Builders_commonKt.launch$default(this.webViewAdPlayer.getScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$2$2$1(this, null), 3, null);
} else {
webView.addOnAttachStateChangeListener(new AndroidEmbeddableWebViewAdPlayer$show$lambda$2$$inlined$doOnDetach$1(webView, this));
}
} else {
webView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { // from class: com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$show$$inlined$doOnAttach$1
@Override // android.view.View.OnAttachStateChangeListener
public void onViewDetachedFromWindow(View view) {
Intrinsics.checkNotNullParameter(view, "view");
}
@Override // android.view.View.OnAttachStateChangeListener
public void onViewAttachedToWindow(View view) {
Intrinsics.checkNotNullParameter(view, "view");
webView.removeOnAttachStateChangeListener(this);
BuildersKt__Builders_commonKt.launch$default(this.webViewAdPlayer.getScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$2$1(this, showOptions, null), 3, null);
if (!ViewCompat.isAttachedToWindow(view)) {
BuildersKt__Builders_commonKt.launch$default(this.webViewAdPlayer.getScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$2$2$1(this, null), 3, null);
} else {
view.addOnAttachStateChangeListener(new AndroidEmbeddableWebViewAdPlayer$show$lambda$2$$inlined$doOnDetach$1(view, this));
}
}
});
}
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.MainScope(), null, null, new AndroidEmbeddableWebViewAdPlayer$show$3(bannerView, this, null), 3, null);
return;
}
throw new IllegalStateException(("BannerView not found for opportunityId: " + this.opportunityId).toString());
}
/* JADX WARN: Removed duplicated region for block: B:20:0x0085 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:24:0x0079 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:25:0x0047 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0025 */
@Override // com.unity3d.ads.adplayer.AdPlayer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object destroy(kotlin.coroutines.Continuation r8) {
/*
r7 = this;
boolean r0 = r8 instanceof com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$destroy$1
if (r0 == 0) goto L13
r0 = r8
com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$destroy$1 r0 = (com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$destroy$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$destroy$1 r0 = new com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer$destroy$1
r0.<init>(r7, r8)
L18:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 3
r4 = 2
r5 = 1
if (r2 == 0) goto L47
if (r2 == r5) goto L3f
if (r2 == r4) goto L37
if (r2 != r3) goto L2f
kotlin.ResultKt.throwOnFailure(r8)
goto L86
L2f:
java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
r8.<init>(r0)
throw r8
L37:
java.lang.Object r2 = r0.L$0
com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer r2 = (com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer) r2
kotlin.ResultKt.throwOnFailure(r8)
goto L7a
L3f:
java.lang.Object r2 = r0.L$0
com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer r2 = (com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer) r2
kotlin.ResultKt.throwOnFailure(r8)
goto L6b
L47:
kotlin.ResultKt.throwOnFailure(r8)
com.unity3d.ads.adplayer.WebViewAdPlayer r8 = r7.webViewAdPlayer
r8.dispatchShowCompleted()
com.unity3d.ads.core.data.repository.OpenMeasurementRepository r8 = r7.openMeasurementRepository
java.lang.String r2 = r7.opportunityId
com.google.protobuf.ByteString r2 = com.unity3d.ads.core.extensions.ProtobufExtensionsKt.toISO8859ByteString(r2)
boolean r8 = r8.hasSessionFinished(r2)
if (r8 == 0) goto L6a
r0.L$0 = r7
r0.label = r5
r5 = 1000(0x3e8, double:4.94E-321)
java.lang.Object r8 = kotlinx.coroutines.DelayKt.delay(r5, r0)
if (r8 != r1) goto L6a
return r1
L6a:
r2 = r7
L6b:
com.unity3d.ads.adplayer.AndroidWebViewContainer r8 = r2.getWebViewContainer()
r0.L$0 = r2
r0.label = r4
java.lang.Object r8 = r8.destroy(r0)
if (r8 != r1) goto L7a
return r1
L7a:
r8 = 0
r0.L$0 = r8
r0.label = r3
java.lang.Object r8 = com.unity3d.ads.adplayer.AdPlayer.DefaultImpls.destroy(r2, r0)
if (r8 != r1) goto L86
return r1
L86:
kotlin.Unit r8 = kotlin.Unit.INSTANCE
return r8
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidEmbeddableWebViewAdPlayer.destroy(kotlin.coroutines.Continuation):java.lang.Object");
}
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.adplayer;
import com.vungle.ads.internal.signals.SignalKey;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer", f = "AndroidFullscreenWebViewAdPlayer.kt", l = {98, 103, SignalKey.EVENT_ID, 109}, m = "destroy")
/* loaded from: classes4.dex */
public final class AndroidFullscreenWebViewAdPlayer$destroy$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidFullscreenWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidFullscreenWebViewAdPlayer$destroy$1(AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer, Continuation continuation) {
super(continuation);
this.this$0 = androidFullscreenWebViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.destroy(this);
}
}

View File

@@ -0,0 +1,106 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.DisplayMessage;
import java.util.Map;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$displayEventsRouter$1", f = "AndroidFullscreenWebViewAdPlayer.kt", l = {114, 115, 116, 117, 118, 120}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidFullscreenWebViewAdPlayer$displayEventsRouter$1 extends SuspendLambda implements Function2 {
final /* synthetic */ DisplayMessage $displayMessage;
int label;
final /* synthetic */ AndroidFullscreenWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidFullscreenWebViewAdPlayer$displayEventsRouter$1(DisplayMessage displayMessage, AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer, Continuation continuation) {
super(2, continuation);
this.$displayMessage = displayMessage;
this.this$0 = androidFullscreenWebViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidFullscreenWebViewAdPlayer$displayEventsRouter$1(this.$displayMessage, this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidFullscreenWebViewAdPlayer$displayEventsRouter$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
WebViewAdPlayer webViewAdPlayer;
WebViewAdPlayer webViewAdPlayer2;
WebViewAdPlayer webViewAdPlayer3;
WebViewAdPlayer webViewAdPlayer4;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
switch (this.label) {
case 0:
ResultKt.throwOnFailure(obj);
DisplayMessage displayMessage = this.$displayMessage;
if (displayMessage instanceof DisplayMessage.DisplayReady) {
webViewAdPlayer4 = this.this$0.webViewAdPlayer;
Map<String, Object> showOptions = ((DisplayMessage.DisplayReady) this.$displayMessage).getShowOptions();
this.label = 1;
if (webViewAdPlayer4.requestShow(showOptions, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else if (displayMessage instanceof DisplayMessage.WebViewInstanceRequest) {
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
DisplayMessage.WebViewInstanceResponse webViewInstanceResponse = new DisplayMessage.WebViewInstanceResponse(this.$displayMessage.getOpportunityId(), this.this$0.getWebViewContainer().getWebView());
this.label = 2;
if (displayMessages.emit(webViewInstanceResponse, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else if (displayMessage instanceof DisplayMessage.VisibilityChanged) {
webViewAdPlayer3 = this.this$0.webViewAdPlayer;
boolean isVisible = ((DisplayMessage.VisibilityChanged) this.$displayMessage).isVisible();
this.label = 3;
if (webViewAdPlayer3.sendVisibilityChange(isVisible, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else if (displayMessage instanceof DisplayMessage.FocusChanged) {
webViewAdPlayer2 = this.this$0.webViewAdPlayer;
boolean isFocused = ((DisplayMessage.FocusChanged) this.$displayMessage).isFocused();
this.label = 4;
if (webViewAdPlayer2.sendFocusChange(isFocused, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else if (displayMessage instanceof DisplayMessage.DisplayDestroyed) {
webViewAdPlayer = this.this$0.webViewAdPlayer;
this.label = 5;
if (webViewAdPlayer.sendActivityDestroyed(this) == coroutine_suspended) {
return coroutine_suspended;
}
} else if (displayMessage instanceof DisplayMessage.DisplayError) {
AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer = this.this$0;
this.label = 6;
if (androidFullscreenWebViewAdPlayer.destroy(this) == coroutine_suspended) {
return coroutine_suspended;
}
}
break;
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
ResultKt.throwOnFailure(obj);
break;
default:
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,19 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.AdaptedFunctionReference;
/* loaded from: classes4.dex */
public /* synthetic */ class AndroidFullscreenWebViewAdPlayer$show$2 extends AdaptedFunctionReference implements Function2 {
public AndroidFullscreenWebViewAdPlayer$show$2(Object obj) {
super(2, obj, AndroidFullscreenWebViewAdPlayer.class, "displayEventsRouter", "displayEventsRouter(Lcom/unity3d/ads/adplayer/DisplayMessage;)Lkotlinx/coroutines/Job;", 12);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(DisplayMessage displayMessage, Continuation continuation) {
Object show$displayEventsRouter;
show$displayEventsRouter = AndroidFullscreenWebViewAdPlayer.show$displayEventsRouter((AndroidFullscreenWebViewAdPlayer) this.receiver, displayMessage, continuation);
return show$displayEventsRouter;
}
}

View File

@@ -0,0 +1,20 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.core.data.datasource.VolumeSettingsChange;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.FunctionReferenceImpl;
/* loaded from: classes4.dex */
public /* synthetic */ class AndroidFullscreenWebViewAdPlayer$show$3 extends FunctionReferenceImpl implements Function2 {
public AndroidFullscreenWebViewAdPlayer$show$3(Object obj) {
super(2, obj, AndroidFullscreenWebViewAdPlayer.class, "handleVolumeSettingsChange", "handleVolumeSettingsChange(Lcom/unity3d/ads/core/data/datasource/VolumeSettingsChange;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", 0);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(VolumeSettingsChange volumeSettingsChange, Continuation continuation) {
Object handleVolumeSettingsChange;
handleVolumeSettingsChange = ((AndroidFullscreenWebViewAdPlayer) this.receiver).handleVolumeSettingsChange(volumeSettingsChange, continuation);
return handleVolumeSettingsChange;
}
}

View File

@@ -0,0 +1,54 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.core.data.model.ShowEvent;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$5", f = "AndroidFullscreenWebViewAdPlayer.kt", l = {72}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidFullscreenWebViewAdPlayer$show$5 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ AndroidFullscreenWebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidFullscreenWebViewAdPlayer$show$5(AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer, Continuation continuation) {
super(2, continuation);
this.this$0 = androidFullscreenWebViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidFullscreenWebViewAdPlayer$show$5(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(ShowEvent showEvent, Continuation continuation) {
return ((AndroidFullscreenWebViewAdPlayer$show$5) create(showEvent, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer = this.this$0;
this.label = 1;
if (androidFullscreenWebViewAdPlayer.destroy(this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,20 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.core.data.model.SessionChange;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.FunctionReferenceImpl;
/* loaded from: classes4.dex */
public /* synthetic */ class AndroidFullscreenWebViewAdPlayer$show$6 extends FunctionReferenceImpl implements Function2 {
public AndroidFullscreenWebViewAdPlayer$show$6(Object obj) {
super(2, obj, AndroidFullscreenWebViewAdPlayer.class, "handleSessionChange", "handleSessionChange(Lcom/unity3d/ads/core/data/model/SessionChange;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", 0);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SessionChange sessionChange, Continuation continuation) {
Object handleSessionChange;
handleSessionChange = ((AndroidFullscreenWebViewAdPlayer) this.receiver).handleSessionChange(sessionChange, continuation);
return handleSessionChange;
}
}

View File

@@ -0,0 +1,534 @@
package com.unity3d.ads.adplayer;
import android.content.Context;
import android.content.Intent;
import com.unity3d.ads.core.data.datasource.VolumeSettingsChange;
import com.unity3d.ads.core.data.model.SessionChange;
import com.unity3d.ads.core.data.repository.DeviceInfoRepository;
import com.unity3d.ads.core.data.repository.OpenMeasurementRepository;
import com.unity3d.ads.core.data.repository.SessionRepository;
import com.vungle.ads.internal.protos.Sdk;
import java.util.Map;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.Job;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowCollector;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableSharedFlow;
import kotlinx.coroutines.flow.SharedFlowKt;
import org.json.JSONObject;
@SourceDebugExtension({"SMAP\nAndroidFullscreenWebViewAdPlayer.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidFullscreenWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidFullscreenWebViewAdPlayer\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt\n+ 4 SafeCollector.common.kt\nkotlinx/coroutines/flow/internal/SafeCollector_commonKt\n*L\n1#1,131:1\n20#2:132\n22#2:136\n20#2:137\n22#2:141\n50#3:133\n55#3:135\n50#3:138\n55#3:140\n106#4:134\n106#4:139\n*S KotlinDebug\n*F\n+ 1 AndroidFullscreenWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidFullscreenWebViewAdPlayer\n*L\n62#1:132\n62#1:136\n71#1:137\n71#1:141\n62#1:133\n62#1:135\n71#1:138\n71#1:140\n62#1:134\n71#1:139\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidFullscreenWebViewAdPlayer implements AdPlayer, FullscreenAdPlayer {
public static final Companion Companion = new Companion(null);
private static final MutableSharedFlow displayMessages = SharedFlowKt.MutableSharedFlow$default(0, 0, null, 7, null);
private final DeviceInfoRepository deviceInfoRepository;
private final OpenMeasurementRepository openMeasurementRepository;
private final String opportunityId;
private final SessionRepository sessionRepository;
private final WebViewAdPlayer webViewAdPlayer;
private final AndroidWebViewContainer webViewContainer;
@Override // com.unity3d.ads.adplayer.AdPlayer
public void dispatchShowCompleted() {
this.webViewAdPlayer.dispatchShowCompleted();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Flow getOnLoadEvent() {
return this.webViewAdPlayer.getOnLoadEvent();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Flow getOnShowEvent() {
return this.webViewAdPlayer.getOnShowEvent();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public CoroutineScope getScope() {
return this.webViewAdPlayer.getScope();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Flow getUpdateCampaignState() {
return this.webViewAdPlayer.getUpdateCampaignState();
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public AndroidWebViewContainer getWebViewContainer() {
return this.webViewContainer;
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object onAllowedPiiChange(byte[] bArr, Continuation continuation) {
return this.webViewAdPlayer.onAllowedPiiChange(bArr, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object onBroadcastEvent(String str, Continuation continuation) {
return this.webViewAdPlayer.onBroadcastEvent(str, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object requestShow(Map<String, ? extends Object> map, Continuation continuation) {
return this.webViewAdPlayer.requestShow(map, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendActivityDestroyed(Continuation continuation) {
return this.webViewAdPlayer.sendActivityDestroyed(continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendFocusChange(boolean z, Continuation continuation) {
return this.webViewAdPlayer.sendFocusChange(z, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendMuteChange(boolean z, Continuation continuation) {
return this.webViewAdPlayer.sendMuteChange(z, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendPrivacyFsmChange(byte[] bArr, Continuation continuation) {
return this.webViewAdPlayer.sendPrivacyFsmChange(bArr, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendUserConsentChange(byte[] bArr, Continuation continuation) {
return this.webViewAdPlayer.sendUserConsentChange(bArr, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendVisibilityChange(boolean z, Continuation continuation) {
return this.webViewAdPlayer.sendVisibilityChange(z, continuation);
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public Object sendVolumeChange(double d, Continuation continuation) {
return this.webViewAdPlayer.sendVolumeChange(d, continuation);
}
public AndroidFullscreenWebViewAdPlayer(WebViewAdPlayer webViewAdPlayer, String opportunityId, AndroidWebViewContainer webViewContainer, DeviceInfoRepository deviceInfoRepository, SessionRepository sessionRepository, OpenMeasurementRepository openMeasurementRepository) {
Intrinsics.checkNotNullParameter(webViewAdPlayer, "webViewAdPlayer");
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(webViewContainer, "webViewContainer");
Intrinsics.checkNotNullParameter(deviceInfoRepository, "deviceInfoRepository");
Intrinsics.checkNotNullParameter(sessionRepository, "sessionRepository");
Intrinsics.checkNotNullParameter(openMeasurementRepository, "openMeasurementRepository");
this.webViewAdPlayer = webViewAdPlayer;
this.opportunityId = opportunityId;
this.webViewContainer = webViewContainer;
this.deviceInfoRepository = deviceInfoRepository;
this.sessionRepository = sessionRepository;
this.openMeasurementRepository = openMeasurementRepository;
}
@Override // com.unity3d.ads.adplayer.AdPlayer
public void show(ShowOptions showOptions) {
Intrinsics.checkNotNullParameter(showOptions, "showOptions");
if (!(showOptions instanceof AndroidShowOptions)) {
throw new IllegalArgumentException("Failed requirement.".toString());
}
AndroidShowOptions androidShowOptions = (AndroidShowOptions) showOptions;
Context context = androidShowOptions.getContext();
Intent intent = new Intent(context, (Class<?>) FullScreenWebViewDisplay.class);
intent.putExtra("opportunityId", this.opportunityId);
Map<String, Object> unityAdsShowOptions = androidShowOptions.getUnityAdsShowOptions();
if (unityAdsShowOptions != null) {
intent.putExtra("showOptions", new JSONObject(unityAdsShowOptions).toString());
}
intent.addFlags(268500992);
intent.putExtra("orientation", context.getResources().getConfiguration().orientation);
final MutableSharedFlow mutableSharedFlow = displayMessages;
FlowKt.launchIn(FlowKt.onEach(new Flow() { // from class: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 AndroidFullscreenWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidFullscreenWebViewAdPlayer\n*L\n1#1,222:1\n21#2:223\n22#2:225\n62#3:224\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1$2, reason: invalid class name */
public static final class AnonymousClass2<T> implements FlowCollector {
final /* synthetic */ FlowCollector $this_unsafeFlow;
final /* synthetic */ AndroidFullscreenWebViewAdPlayer this$0;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1$2", f = "AndroidFullscreenWebViewAdPlayer.kt", l = {Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE}, m = "emit")
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1$emit$1\n*L\n1#1,222:1\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1$2$1, reason: invalid class name */
public static final class AnonymousClass1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
public AnonymousClass1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return AnonymousClass2.this.emit(null, this);
}
}
public AnonymousClass2(FlowCollector flowCollector, AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer) {
this.$this_unsafeFlow = flowCollector;
this.this$0 = androidFullscreenWebViewAdPlayer;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // kotlinx.coroutines.flow.FlowCollector
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object emit(java.lang.Object r6, kotlin.coroutines.Continuation r7) {
/*
r5 = this;
boolean r0 = r7 instanceof com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1.AnonymousClass2.AnonymousClass1
if (r0 == 0) goto L13
r0 = r7
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1$2$1 r0 = (com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1.AnonymousClass2.AnonymousClass1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1$2$1 r0 = new com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1$2$1
r0.<init>(r7)
L18:
java.lang.Object r7 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r7)
goto L52
L29:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r7)
throw r6
L31:
kotlin.ResultKt.throwOnFailure(r7)
kotlinx.coroutines.flow.FlowCollector r7 = r5.$this_unsafeFlow
r2 = r6
com.unity3d.ads.adplayer.DisplayMessage r2 = (com.unity3d.ads.adplayer.DisplayMessage) r2
java.lang.String r2 = r2.getOpportunityId()
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer r4 = r5.this$0
java.lang.String r4 = com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer.access$getOpportunityId$p(r4)
boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual(r2, r4)
if (r2 == 0) goto L52
r0.label = r3
java.lang.Object r6 = r7.emit(r6, r0)
if (r6 != r1) goto L52
return r1
L52:
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
@Override // kotlinx.coroutines.flow.Flow
public Object collect(FlowCollector flowCollector, Continuation continuation) {
Object coroutine_suspended;
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector, this), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return collect == coroutine_suspended ? collect : Unit.INSTANCE;
}
}, new AndroidFullscreenWebViewAdPlayer$show$2(this)), getScope());
FlowKt.launchIn(FlowKt.onEach(this.deviceInfoRepository.getVolumeSettingsChange(), new AndroidFullscreenWebViewAdPlayer$show$3(this)), getScope());
final Flow onShowEvent = this.webViewAdPlayer.getOnShowEvent();
FlowKt.launchIn(FlowKt.onEach(new Flow() { // from class: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 AndroidFullscreenWebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/AndroidFullscreenWebViewAdPlayer\n*L\n1#1,222:1\n21#2:223\n22#2:225\n71#3:224\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2$2, reason: invalid class name */
public static final class AnonymousClass2<T> implements FlowCollector {
final /* synthetic */ FlowCollector $this_unsafeFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2$2", f = "AndroidFullscreenWebViewAdPlayer.kt", l = {Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE}, m = "emit")
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1$emit$1\n*L\n1#1,222:1\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2$2$1, reason: invalid class name */
public static final class AnonymousClass1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
public AnonymousClass1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return AnonymousClass2.this.emit(null, this);
}
}
public AnonymousClass2(FlowCollector flowCollector) {
this.$this_unsafeFlow = flowCollector;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // kotlinx.coroutines.flow.FlowCollector
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object emit(java.lang.Object r6, kotlin.coroutines.Continuation r7) {
/*
r5 = this;
boolean r0 = r7 instanceof com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2.AnonymousClass2.AnonymousClass1
if (r0 == 0) goto L13
r0 = r7
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2$2$1 r0 = (com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2.AnonymousClass2.AnonymousClass1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2$2$1 r0 = new com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2$2$1
r0.<init>(r7)
L18:
java.lang.Object r7 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r7)
goto L4a
L29:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r7)
throw r6
L31:
kotlin.ResultKt.throwOnFailure(r7)
kotlinx.coroutines.flow.FlowCollector r7 = r5.$this_unsafeFlow
r2 = r6
com.unity3d.ads.core.data.model.ShowEvent r2 = (com.unity3d.ads.core.data.model.ShowEvent) r2
boolean r4 = r2 instanceof com.unity3d.ads.core.data.model.ShowEvent.Completed
if (r4 != 0) goto L41
boolean r2 = r2 instanceof com.unity3d.ads.core.data.model.ShowEvent.Error
if (r2 == 0) goto L4a
L41:
r0.label = r3
java.lang.Object r6 = r7.emit(r6, r0)
if (r6 != r1) goto L4a
return r1
L4a:
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$show$$inlined$filter$2.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
@Override // kotlinx.coroutines.flow.Flow
public Object collect(FlowCollector flowCollector, Continuation continuation) {
Object coroutine_suspended;
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return collect == coroutine_suspended ? collect : Unit.INSTANCE;
}
}, new AndroidFullscreenWebViewAdPlayer$show$5(this, null)), getScope());
FlowKt.launchIn(FlowKt.onEach(this.sessionRepository.getOnChange(), new AndroidFullscreenWebViewAdPlayer$show$6(this)), getScope());
context.startActivity(intent);
}
/* JADX INFO: Access modifiers changed from: private */
public static final /* synthetic */ Object show$displayEventsRouter(AndroidFullscreenWebViewAdPlayer androidFullscreenWebViewAdPlayer, DisplayMessage displayMessage, Continuation continuation) {
androidFullscreenWebViewAdPlayer.displayEventsRouter(displayMessage);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public final Object handleVolumeSettingsChange(VolumeSettingsChange volumeSettingsChange, Continuation continuation) {
Object coroutine_suspended;
Object coroutine_suspended2;
if (volumeSettingsChange instanceof VolumeSettingsChange.MuteChange) {
Object sendMuteChange = this.webViewAdPlayer.sendMuteChange(((VolumeSettingsChange.MuteChange) volumeSettingsChange).isMuted(), continuation);
coroutine_suspended2 = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return sendMuteChange == coroutine_suspended2 ? sendMuteChange : Unit.INSTANCE;
}
if (!(volumeSettingsChange instanceof VolumeSettingsChange.VolumeChange)) {
return Unit.INSTANCE;
}
Object sendVolumeChange = this.webViewAdPlayer.sendVolumeChange(((VolumeSettingsChange.VolumeChange) volumeSettingsChange).getVolume(), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return sendVolumeChange == coroutine_suspended ? sendVolumeChange : Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public final Object handleSessionChange(SessionChange sessionChange, Continuation continuation) {
Object coroutine_suspended;
Object coroutine_suspended2;
if (sessionChange instanceof SessionChange.UserConsentChange) {
WebViewAdPlayer webViewAdPlayer = this.webViewAdPlayer;
byte[] byteArray = ((SessionChange.UserConsentChange) sessionChange).getValue().toByteArray();
Intrinsics.checkNotNullExpressionValue(byteArray, "change.value.toByteArray()");
Object sendUserConsentChange = webViewAdPlayer.sendUserConsentChange(byteArray, continuation);
coroutine_suspended2 = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return sendUserConsentChange == coroutine_suspended2 ? sendUserConsentChange : Unit.INSTANCE;
}
if (!(sessionChange instanceof SessionChange.PrivacyFsmChange)) {
return Unit.INSTANCE;
}
WebViewAdPlayer webViewAdPlayer2 = this.webViewAdPlayer;
byte[] byteArray2 = ((SessionChange.PrivacyFsmChange) sessionChange).getValue().toByteArray();
Intrinsics.checkNotNullExpressionValue(byteArray2, "change.value.toByteArray()");
Object sendPrivacyFsmChange = webViewAdPlayer2.sendPrivacyFsmChange(byteArray2, continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return sendPrivacyFsmChange == coroutine_suspended ? sendPrivacyFsmChange : Unit.INSTANCE;
}
/* JADX WARN: Removed duplicated region for block: B:21:0x009f A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:25:0x0093 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:29:0x0078 */
/* JADX WARN: Removed duplicated region for block: B:32:0x0052 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0026 */
@Override // com.unity3d.ads.adplayer.AdPlayer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object destroy(kotlin.coroutines.Continuation r9) {
/*
r8 = this;
boolean r0 = r9 instanceof com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$destroy$1
if (r0 == 0) goto L13
r0 = r9
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$destroy$1 r0 = (com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$destroy$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$destroy$1 r0 = new com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer$destroy$1
r0.<init>(r8, r9)
L18:
java.lang.Object r9 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 4
r4 = 3
r5 = 2
r6 = 1
if (r2 == 0) goto L52
if (r2 == r6) goto L4a
if (r2 == r5) goto L42
if (r2 == r4) goto L3a
if (r2 != r3) goto L32
kotlin.ResultKt.throwOnFailure(r9)
goto La0
L32:
java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
r9.<init>(r0)
throw r9
L3a:
java.lang.Object r2 = r0.L$0
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer r2 = (com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer) r2
kotlin.ResultKt.throwOnFailure(r9)
goto L94
L42:
java.lang.Object r2 = r0.L$0
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer r2 = (com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer) r2
kotlin.ResultKt.throwOnFailure(r9)
goto L85
L4a:
java.lang.Object r2 = r0.L$0
com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer r2 = (com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer) r2
kotlin.ResultKt.throwOnFailure(r9)
goto L6a
L52:
kotlin.ResultKt.throwOnFailure(r9)
kotlinx.coroutines.flow.MutableSharedFlow r9 = com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer.displayMessages
com.unity3d.ads.adplayer.DisplayMessage$DisplayFinishRequest r2 = new com.unity3d.ads.adplayer.DisplayMessage$DisplayFinishRequest
java.lang.String r7 = r8.opportunityId
r2.<init>(r7)
r0.L$0 = r8
r0.label = r6
java.lang.Object r9 = r9.emit(r2, r0)
if (r9 != r1) goto L69
return r1
L69:
r2 = r8
L6a:
com.unity3d.ads.core.data.repository.OpenMeasurementRepository r9 = r2.openMeasurementRepository
java.lang.String r6 = r2.opportunityId
com.google.protobuf.ByteString r6 = com.unity3d.ads.core.extensions.ProtobufExtensionsKt.toISO8859ByteString(r6)
boolean r9 = r9.hasSessionFinished(r6)
if (r9 == 0) goto L85
r0.L$0 = r2
r0.label = r5
r5 = 1000(0x3e8, double:4.94E-321)
java.lang.Object r9 = kotlinx.coroutines.DelayKt.delay(r5, r0)
if (r9 != r1) goto L85
return r1
L85:
com.unity3d.ads.adplayer.AndroidWebViewContainer r9 = r2.getWebViewContainer()
r0.L$0 = r2
r0.label = r4
java.lang.Object r9 = r9.destroy(r0)
if (r9 != r1) goto L94
return r1
L94:
r9 = 0
r0.L$0 = r9
r0.label = r3
java.lang.Object r9 = com.unity3d.ads.adplayer.AdPlayer.DefaultImpls.destroy(r2, r0)
if (r9 != r1) goto La0
return r1
La0:
kotlin.Unit r9 = kotlin.Unit.INSTANCE
return r9
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidFullscreenWebViewAdPlayer.destroy(kotlin.coroutines.Continuation):java.lang.Object");
}
private final Job displayEventsRouter(DisplayMessage displayMessage) {
Job launch$default;
launch$default = BuildersKt__Builders_commonKt.launch$default(getScope(), null, null, new AndroidFullscreenWebViewAdPlayer$displayEventsRouter$1(displayMessage, this, null), 3, null);
return launch$default;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final MutableSharedFlow getDisplayMessages() {
return AndroidFullscreenWebViewAdPlayer.displayMessages;
}
}
}

View File

@@ -0,0 +1,70 @@
package com.unity3d.ads.adplayer;
import android.content.Context;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AndroidShowOptions implements ShowOptions {
private final Context context;
private final Map<String, Object> unityAdsShowOptions;
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ AndroidShowOptions copy$default(AndroidShowOptions androidShowOptions, Context context, Map map, int i, Object obj) {
if ((i & 1) != 0) {
context = androidShowOptions.context;
}
if ((i & 2) != 0) {
map = androidShowOptions.unityAdsShowOptions;
}
return androidShowOptions.copy(context, map);
}
public final Context component1() {
return this.context;
}
public final Map<String, Object> component2() {
return this.unityAdsShowOptions;
}
public final AndroidShowOptions copy(Context context, Map<String, ? extends Object> map) {
Intrinsics.checkNotNullParameter(context, "context");
return new AndroidShowOptions(context, map);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof AndroidShowOptions)) {
return false;
}
AndroidShowOptions androidShowOptions = (AndroidShowOptions) obj;
return Intrinsics.areEqual(this.context, androidShowOptions.context) && Intrinsics.areEqual(this.unityAdsShowOptions, androidShowOptions.unityAdsShowOptions);
}
public final Context getContext() {
return this.context;
}
public final Map<String, Object> getUnityAdsShowOptions() {
return this.unityAdsShowOptions;
}
public int hashCode() {
int hashCode = this.context.hashCode() * 31;
Map<String, Object> map = this.unityAdsShowOptions;
return hashCode + (map == null ? 0 : map.hashCode());
}
public String toString() {
return "AndroidShowOptions(context=" + this.context + ", unityAdsShowOptions=" + this.unityAdsShowOptions + ')';
}
public AndroidShowOptions(Context context, Map<String, ? extends Object> map) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
this.unityAdsShowOptions = map;
}
}

View File

@@ -0,0 +1,186 @@
package com.unity3d.ads.adplayer;
import android.net.Uri;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import androidx.annotation.RequiresApi;
import androidx.webkit.WebResourceErrorCompat;
import androidx.webkit.WebViewAssetLoader;
import androidx.webkit.WebViewClientCompat;
import androidx.webkit.WebViewFeature;
import com.unity3d.ads.adplayer.model.ErrorReason;
import com.unity3d.ads.adplayer.model.WebViewClientError;
import com.unity3d.ads.core.domain.GetCachedAsset;
import com.unity3d.ads.core.extensions.IntExtensionKt;
import com.unity3d.ads.core.extensions.ViewExtensionsKt;
import com.unity3d.services.UnityAdsConstants;
import java.util.List;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CompletableDeferred;
import kotlinx.coroutines.CompletableDeferredKt;
import kotlinx.coroutines.Deferred;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
@SourceDebugExtension({"SMAP\nAndroidWebViewClient.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidWebViewClient.kt\ncom/unity3d/ads/adplayer/AndroidWebViewClient\n+ 2 StateFlow.kt\nkotlinx/coroutines/flow/StateFlowKt\n*L\n1#1,137:1\n230#2,5:138\n230#2,5:143\n230#2,5:148\n230#2,5:153\n*S KotlinDebug\n*F\n+ 1 AndroidWebViewClient.kt\ncom/unity3d/ads/adplayer/AndroidWebViewClient\n*L\n42#1:138,5\n63#1:143,5\n83#1:148,5\n119#1:153,5\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidWebViewClient extends WebViewClientCompat {
public static final String BLANK_PAGE = "about:blank";
public static final Companion Companion = new Companion(null);
private final MutableStateFlow _isRenderProcessGone;
private final CompletableDeferred _onLoadFinished;
private final WebViewAssetLoader adAssetLoader;
private final GetCachedAsset getCachedAsset;
private final StateFlow isRenderProcessGone;
private final MutableStateFlow loadErrors;
private final Deferred onLoadFinished;
private final WebViewAssetLoader webViewAssetLoader;
public final Deferred getOnLoadFinished() {
return this.onLoadFinished;
}
public final StateFlow isRenderProcessGone() {
return this.isRenderProcessGone;
}
public AndroidWebViewClient(GetWebViewCacheAssetLoader getWebViewAssetLoader, GetAdAssetLoader getAdAssetLoader, GetCachedAsset getCachedAsset) {
Intrinsics.checkNotNullParameter(getWebViewAssetLoader, "getWebViewAssetLoader");
Intrinsics.checkNotNullParameter(getAdAssetLoader, "getAdAssetLoader");
Intrinsics.checkNotNullParameter(getCachedAsset, "getCachedAsset");
this.getCachedAsset = getCachedAsset;
this.webViewAssetLoader = (WebViewAssetLoader) getWebViewAssetLoader.invoke();
this.adAssetLoader = (WebViewAssetLoader) getAdAssetLoader.invoke();
this.loadErrors = StateFlowKt.MutableStateFlow(CollectionsKt__CollectionsKt.emptyList());
CompletableDeferred CompletableDeferred$default = CompletableDeferredKt.CompletableDeferred$default(null, 1, null);
this._onLoadFinished = CompletableDeferred$default;
this.onLoadFinished = CompletableDeferred$default;
MutableStateFlow MutableStateFlow = StateFlowKt.MutableStateFlow(Boolean.FALSE);
this._isRenderProcessGone = MutableStateFlow;
this.isRenderProcessGone = FlowKt.asStateFlow(MutableStateFlow);
}
@Override // android.webkit.WebViewClient
public void onPageFinished(WebView view, String url) {
Object value;
List plus;
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(url, "url");
if (Intrinsics.areEqual(url, BLANK_PAGE)) {
MutableStateFlow mutableStateFlow = this.loadErrors;
do {
value = mutableStateFlow.getValue();
plus = CollectionsKt___CollectionsKt.plus((List) value, new WebViewClientError(url, ErrorReason.REASON_WEB_BLANK, null, 4, null));
} while (!mutableStateFlow.compareAndSet(value, plus));
}
super.onPageFinished(view, url);
this._onLoadFinished.complete(this.loadErrors.getValue());
}
@Override // androidx.webkit.WebViewClientCompat
@RequiresApi(21)
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceErrorCompat error) {
ErrorReason errorReason;
Object value;
List plus;
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(request, "request");
Intrinsics.checkNotNullParameter(error, "error");
super.onReceivedError(view, request, error);
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_RESOURCE_ERROR_GET_CODE)) {
errorReason = IntExtensionKt.webResourceToErrorReason(error.getErrorCode());
} else {
errorReason = ErrorReason.REASON_UNKNOWN;
}
MutableStateFlow mutableStateFlow = this.loadErrors;
do {
value = mutableStateFlow.getValue();
plus = CollectionsKt___CollectionsKt.plus((List) value, new WebViewClientError(request.getUrl().toString(), errorReason, null, 4, null));
} while (!mutableStateFlow.compareAndSet(value, plus));
}
@Override // androidx.webkit.WebViewClientCompat, android.webkit.WebViewClient, org.chromium.support_lib_boundary.WebViewClientBoundaryInterface
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
Object value;
List plus;
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(request, "request");
Intrinsics.checkNotNullParameter(errorResponse, "errorResponse");
super.onReceivedHttpError(view, request, errorResponse);
WebViewClientError webViewClientError = new WebViewClientError(request.getUrl().toString(), ErrorReason.REASON_WEB_ERROR_RECEIVED_HTTP, Integer.valueOf(errorResponse.getStatusCode()));
MutableStateFlow mutableStateFlow = this.loadErrors;
do {
value = mutableStateFlow.getValue();
plus = CollectionsKt___CollectionsKt.plus((List) value, webViewClientError);
} while (!mutableStateFlow.compareAndSet(value, plus));
}
@Override // android.webkit.WebViewClient
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(request, "request");
Uri url = request.getUrl();
if (url == null) {
return super.shouldInterceptRequest(view, request);
}
if (Intrinsics.areEqual(url.getLastPathSegment(), "favicon.ico")) {
return new WebResourceResponse("image/png", null, null);
}
if (Intrinsics.areEqual(url.getScheme(), UnityAdsConstants.Cache.CACHE_SCHEME)) {
GetCachedAsset getCachedAsset = this.getCachedAsset;
Uri url2 = request.getUrl();
Intrinsics.checkNotNullExpressionValue(url2, "request.url");
return getCachedAsset.invoke(url2);
}
String host = url.getHost();
if (host != null) {
int hashCode = host.hashCode();
if (hashCode != -598289184) {
if (hashCode == 380656434 && host.equals(UnityAdsConstants.DefaultUrls.WEBVIEW_DOMAIN)) {
return this.webViewAssetLoader.shouldInterceptRequest(url);
}
} else if (host.equals("cdn-creatives-cf-prd.acquire.unity3dusercontent.com")) {
return this.adAssetLoader.shouldInterceptRequest(url);
}
}
return super.shouldInterceptRequest(view, request);
}
@Override // android.webkit.WebViewClient
public boolean onRenderProcessGone(WebView view, RenderProcessGoneDetail detail) {
Object value;
List plus;
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(detail, "detail");
ViewExtensionsKt.removeViewFromParent(view);
view.destroy();
if (this._onLoadFinished.isCompleted()) {
this._isRenderProcessGone.setValue(Boolean.TRUE);
return true;
}
MutableStateFlow mutableStateFlow = this.loadErrors;
do {
value = mutableStateFlow.getValue();
plus = CollectionsKt___CollectionsKt.plus((List) value, new WebViewClientError(String.valueOf(view.getUrl()), ErrorReason.REASON_WEBVIEW_RENDER_PROCESS_GONE, null, 4, null));
} while (!mutableStateFlow.compareAndSet(value, plus));
this._onLoadFinished.complete(this.loadErrors.getValue());
return true;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,26 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer", f = "AndroidWebViewContainer.kt", l = {91}, m = "addJavascriptInterface")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$addJavascriptInterface$1 extends ContinuationImpl {
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$addJavascriptInterface$1(AndroidWebViewContainer androidWebViewContainer, Continuation continuation) {
super(continuation);
this.this$0 = androidWebViewContainer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.addJavascriptInterface(null, null, this);
}
}

View File

@@ -0,0 +1,68 @@
package com.unity3d.ads.adplayer;
import android.webkit.JavascriptInterface;
import com.unity3d.ads.adplayer.model.WebViewBridgeInterface;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$2", f = "AndroidWebViewContainer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$addJavascriptInterface$2 extends SuspendLambda implements Function2 {
final /* synthetic */ String $name;
final /* synthetic */ WebViewBridge $webViewBridgeInterface;
int label;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$addJavascriptInterface$2(AndroidWebViewContainer androidWebViewContainer, String str, WebViewBridge webViewBridge, Continuation continuation) {
super(2, continuation);
this.this$0 = androidWebViewContainer;
this.$name = str;
this.$webViewBridgeInterface = webViewBridge;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidWebViewContainer$addJavascriptInterface$2(this.this$0, this.$name, this.$webViewBridgeInterface, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidWebViewContainer$addJavascriptInterface$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
final WebViewBridge webViewBridge = this.$webViewBridgeInterface;
this.this$0.getWebView().addJavascriptInterface(new WebViewBridgeInterface() { // from class: com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$2$wrapper$1
@Override // com.unity3d.ads.adplayer.model.WebViewBridgeInterface
@JavascriptInterface
public void handleInvocation(String message) {
Intrinsics.checkNotNullParameter(message, "message");
WebViewBridge.this.handleInvocation(message);
}
@Override // com.unity3d.ads.adplayer.model.WebViewBridgeInterface
@JavascriptInterface
public void handleCallback(String callbackId, String callbackStatus, String rawParameters) {
Intrinsics.checkNotNullParameter(callbackId, "callbackId");
Intrinsics.checkNotNullParameter(callbackStatus, "callbackStatus");
Intrinsics.checkNotNullParameter(rawParameters, "rawParameters");
WebViewBridge.this.handleCallback(callbackId, callbackStatus, rawParameters);
}
}, this.$name);
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer", f = "AndroidWebViewContainer.kt", l = {109}, m = "destroy")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$destroy$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$destroy$1(AndroidWebViewContainer androidWebViewContainer, Continuation continuation) {
super(continuation);
this.this$0 = androidWebViewContainer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.destroy(this);
}
}

View File

@@ -0,0 +1,51 @@
package com.unity3d.ads.adplayer;
import android.view.ViewGroup;
import android.view.ViewParent;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$2", f = "AndroidWebViewContainer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$destroy$2 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$destroy$2(AndroidWebViewContainer androidWebViewContainer, Continuation continuation) {
super(2, continuation);
this.this$0 = androidWebViewContainer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidWebViewContainer$destroy$2(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidWebViewContainer$destroy$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
ViewParent parent = this.this$0.getWebView().getParent();
ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
if (viewGroup != null) {
viewGroup.removeView(this.this$0.getWebView());
}
this.this$0.getWebView().destroy();
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer", f = "AndroidWebViewContainer.kt", l = {IronSourceConstants.TROUBLESHOOTING_AD_QUALITY_SDK_INITIALIZED_SUCCESSFULLY_EVENT}, m = "evaluateJavascript")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$evaluateJavascript$1 extends ContinuationImpl {
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$evaluateJavascript$1(AndroidWebViewContainer androidWebViewContainer, Continuation continuation) {
super(continuation);
this.this$0 = androidWebViewContainer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.evaluateJavascript(null, this);
}
}

View File

@@ -0,0 +1,46 @@
package com.unity3d.ads.adplayer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$2", f = "AndroidWebViewContainer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$evaluateJavascript$2 extends SuspendLambda implements Function2 {
final /* synthetic */ String $script;
int label;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$evaluateJavascript$2(AndroidWebViewContainer androidWebViewContainer, String str, Continuation continuation) {
super(2, continuation);
this.this$0 = androidWebViewContainer;
this.$script = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidWebViewContainer$evaluateJavascript$2(this.this$0, this.$script, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidWebViewContainer$evaluateJavascript$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
this.this$0.getWebView().evaluateJavascript("javascript:" + this.$script, null);
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,30 @@
package com.unity3d.ads.adplayer;
import com.fyber.inneractive.sdk.bidder.TokenParametersOuterClass$TokenParameters;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer", f = "AndroidWebViewContainer.kt", l = {TokenParametersOuterClass$TokenParameters.IGNITEVERSION_FIELD_NUMBER, 71, IronSourceConstants.TEST_SUITE_WEB_CONTROLLER_OPEN_SUCCESSFULLY}, m = "loadUrl")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$loadUrl$1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$loadUrl$1(AndroidWebViewContainer androidWebViewContainer, Continuation continuation) {
super(continuation);
this.this$0 = androidWebViewContainer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.loadUrl(null, this);
}
}

View File

@@ -0,0 +1,46 @@
package com.unity3d.ads.adplayer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$2", f = "AndroidWebViewContainer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$loadUrl$2 extends SuspendLambda implements Function2 {
final /* synthetic */ String $url;
int label;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$loadUrl$2(AndroidWebViewContainer androidWebViewContainer, String str, Continuation continuation) {
super(2, continuation);
this.this$0 = androidWebViewContainer;
this.$url = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidWebViewContainer$loadUrl$2(this.this$0, this.$url, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidWebViewContainer$loadUrl$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
this.this$0.getWebView().loadUrl(this.$url);
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer", f = "AndroidWebViewContainer.kt", l = {55}, m = "onRenderProcessGone")
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer$onRenderProcessGone$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidWebViewContainer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidWebViewContainer$onRenderProcessGone$1(AndroidWebViewContainer androidWebViewContainer, Continuation continuation) {
super(continuation);
this.this$0 = androidWebViewContainer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.onRenderProcessGone(this);
}
}

View File

@@ -0,0 +1,592 @@
package com.unity3d.ads.adplayer;
import android.annotation.SuppressLint;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.WebView;
import com.unity3d.ads.core.domain.SendWebViewClientErrorDiagnostics;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CoroutineDispatcher;
import kotlinx.coroutines.CoroutineName;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowCollector;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
@SuppressLint({"ClickableViewAccessibility"})
@SourceDebugExtension({"SMAP\nAndroidWebViewContainer.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidWebViewContainer.kt\ncom/unity3d/ads/adplayer/AndroidWebViewContainer\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt\n+ 4 SafeCollector.common.kt\nkotlinx/coroutines/flow/internal/SafeCollector_commonKt\n*L\n1#1,116:1\n20#2:117\n22#2:121\n50#3:118\n55#3:120\n106#4:119\n*S KotlinDebug\n*F\n+ 1 AndroidWebViewContainer.kt\ncom/unity3d/ads/adplayer/AndroidWebViewContainer\n*L\n36#1:117\n36#1:121\n36#1:118\n36#1:120\n36#1:119\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidWebViewContainer implements WebViewContainer {
private final MutableStateFlow _lastInputEvent;
private final StateFlow lastInputEvent;
private final CoroutineScope scope;
private final SendWebViewClientErrorDiagnostics sendWebViewClientErrorDiagnostics;
private final WebView webView;
private final AndroidWebViewClient webViewClient;
@Override // com.unity3d.ads.adplayer.WebViewContainer
public StateFlow getLastInputEvent() {
return this.lastInputEvent;
}
public final CoroutineScope getScope() {
return this.scope;
}
public final WebView getWebView() {
return this.webView;
}
public final MutableStateFlow get_lastInputEvent() {
return this._lastInputEvent;
}
public AndroidWebViewContainer(WebView webView, AndroidWebViewClient webViewClient, SendWebViewClientErrorDiagnostics sendWebViewClientErrorDiagnostics, CoroutineDispatcher mainDispatcher, CoroutineDispatcher defaultDispatcher, CoroutineScope adPlayerScope) {
Intrinsics.checkNotNullParameter(webView, "webView");
Intrinsics.checkNotNullParameter(webViewClient, "webViewClient");
Intrinsics.checkNotNullParameter(sendWebViewClientErrorDiagnostics, "sendWebViewClientErrorDiagnostics");
Intrinsics.checkNotNullParameter(mainDispatcher, "mainDispatcher");
Intrinsics.checkNotNullParameter(defaultDispatcher, "defaultDispatcher");
Intrinsics.checkNotNullParameter(adPlayerScope, "adPlayerScope");
this.webView = webView;
this.webViewClient = webViewClient;
this.sendWebViewClientErrorDiagnostics = sendWebViewClientErrorDiagnostics;
CoroutineScope plus = CoroutineScopeKt.plus(CoroutineScopeKt.plus(adPlayerScope, mainDispatcher), new CoroutineName("AndroidWebViewContainer"));
this.scope = plus;
MutableStateFlow MutableStateFlow = StateFlowKt.MutableStateFlow(null);
this._lastInputEvent = MutableStateFlow;
this.lastInputEvent = FlowKt.asStateFlow(MutableStateFlow);
final StateFlow isRenderProcessGone = webViewClient.isRenderProcessGone();
FlowKt.launchIn(FlowKt.onEach(new Flow() { // from class: com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 AndroidWebViewContainer.kt\ncom/unity3d/ads/adplayer/AndroidWebViewContainer\n*L\n1#1,222:1\n21#2:223\n22#2:225\n36#3:224\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1$2, reason: invalid class name */
public static final class AnonymousClass2<T> implements FlowCollector {
final /* synthetic */ FlowCollector $this_unsafeFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1$2", f = "AndroidWebViewContainer.kt", l = {Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE}, m = "emit")
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1$emit$1\n*L\n1#1,222:1\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1$2$1, reason: invalid class name */
public static final class AnonymousClass1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
public AnonymousClass1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return AnonymousClass2.this.emit(null, this);
}
}
public AnonymousClass2(FlowCollector flowCollector) {
this.$this_unsafeFlow = flowCollector;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // kotlinx.coroutines.flow.FlowCollector
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object emit(java.lang.Object r5, kotlin.coroutines.Continuation r6) {
/*
r4 = this;
boolean r0 = r6 instanceof com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1.AnonymousClass2.AnonymousClass1
if (r0 == 0) goto L13
r0 = r6
com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1$2$1 r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1.AnonymousClass2.AnonymousClass1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1$2$1 r0 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1$2$1
r0.<init>(r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r6)
goto L48
L29:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L31:
kotlin.ResultKt.throwOnFailure(r6)
kotlinx.coroutines.flow.FlowCollector r6 = r4.$this_unsafeFlow
r2 = r5
java.lang.Boolean r2 = (java.lang.Boolean) r2
boolean r2 = r2.booleanValue()
if (r2 == 0) goto L48
r0.label = r3
java.lang.Object r5 = r6.emit(r5, r0)
if (r5 != r1) goto L48
return r1
L48:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidWebViewContainer$special$$inlined$filter$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
@Override // kotlinx.coroutines.flow.Flow
public Object collect(FlowCollector flowCollector, Continuation continuation) {
Object coroutine_suspended;
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return collect == coroutine_suspended ? collect : Unit.INSTANCE;
}
}, new AnonymousClass2(null)), CoroutineScopeKt.plus(plus, defaultDispatcher));
webView.setOnTouchListener(new View.OnTouchListener() { // from class: com.unity3d.ads.adplayer.AndroidWebViewContainer$$ExternalSyntheticLambda0
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean _init_$lambda$1;
_init_$lambda$1 = AndroidWebViewContainer._init_$lambda$1(AndroidWebViewContainer.this, view, motionEvent);
return _init_$lambda$1;
}
});
}
@DebugMetadata(c = "com.unity3d.ads.adplayer.AndroidWebViewContainer$2", f = "AndroidWebViewContainer.kt", l = {37}, m = "invokeSuspend")
/* renamed from: com.unity3d.ads.adplayer.AndroidWebViewContainer$2, reason: invalid class name */
public static final class AnonymousClass2 extends SuspendLambda implements Function2 {
int label;
public AnonymousClass2(Continuation continuation) {
super(2, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return AndroidWebViewContainer.this.new AnonymousClass2(continuation);
}
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
return invoke(((Boolean) obj).booleanValue(), (Continuation) obj2);
}
public final Object invoke(boolean z, Continuation continuation) {
return ((AnonymousClass2) create(Boolean.valueOf(z), continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
AndroidWebViewContainer androidWebViewContainer = AndroidWebViewContainer.this;
this.label = 1;
if (androidWebViewContainer.onRenderProcessGone(this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}
/* JADX INFO: Access modifiers changed from: private */
public static final boolean _init_$lambda$1(AndroidWebViewContainer this$0, View view, MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
int actionMasked = motionEvent.getActionMasked();
if (actionMasked != 0 && actionMasked != 1 && actionMasked != 5 && actionMasked != 6) {
return false;
}
this$0._lastInputEvent.setValue(motionEvent);
return false;
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Removed duplicated region for block: B:15:0x0035 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object onRenderProcessGone(kotlin.coroutines.Continuation r8) {
/*
r7 = this;
boolean r0 = r8 instanceof com.unity3d.ads.adplayer.AndroidWebViewContainer$onRenderProcessGone$1
if (r0 == 0) goto L13
r0 = r8
com.unity3d.ads.adplayer.AndroidWebViewContainer$onRenderProcessGone$1 r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer$onRenderProcessGone$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidWebViewContainer$onRenderProcessGone$1 r0 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$onRenderProcessGone$1
r0.<init>(r7, r8)
L18:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L35
if (r2 != r3) goto L2d
java.lang.Object r0 = r0.L$0
com.unity3d.ads.adplayer.AndroidWebViewContainer r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer) r0
kotlin.ResultKt.throwOnFailure(r8)
goto L44
L2d:
java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
r8.<init>(r0)
throw r8
L35:
kotlin.ResultKt.throwOnFailure(r8)
r0.L$0 = r7
r0.label = r3
java.lang.Object r8 = r7.destroy(r0)
if (r8 != r1) goto L43
return r1
L43:
r0 = r7
L44:
com.unity3d.ads.core.domain.SendWebViewClientErrorDiagnostics r8 = r0.sendWebViewClientErrorDiagnostics
com.unity3d.ads.adplayer.model.WebViewClientError r6 = new com.unity3d.ads.adplayer.model.WebViewClientError
java.lang.String r1 = "Render process gone"
com.unity3d.ads.adplayer.model.ErrorReason r2 = com.unity3d.ads.adplayer.model.ErrorReason.REASON_WEBVIEW_RENDER_PROCESS_GONE
r3 = 0
r4 = 4
r5 = 0
r0 = r6
r0.<init>(r1, r2, r3, r4, r5)
java.util.List r0 = kotlin.collections.CollectionsKt.listOf(r6)
r8.invoke(r0)
kotlin.Unit r8 = kotlin.Unit.INSTANCE
return r8
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidWebViewContainer.onRenderProcessGone(kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX WARN: Removed duplicated region for block: B:20:0x0087 */
/* JADX WARN: Removed duplicated region for block: B:24:0x00a1 */
/* JADX WARN: Removed duplicated region for block: B:29:0x007a A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:30:0x004f */
/* JADX WARN: Removed duplicated region for block: B:8:0x0025 */
@Override // com.unity3d.ads.adplayer.WebViewContainer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object loadUrl(java.lang.String r8, kotlin.coroutines.Continuation r9) {
/*
r7 = this;
boolean r0 = r9 instanceof com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$1
if (r0 == 0) goto L13
r0 = r9
com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$1 r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$1 r0 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$1
r0.<init>(r7, r9)
L18:
java.lang.Object r9 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 3
r4 = 2
r5 = 1
if (r2 == 0) goto L4f
if (r2 == r5) goto L47
if (r2 == r4) goto L3f
if (r2 == r3) goto L33
java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
java.lang.String r9 = "call to 'resume' before 'invoke' with coroutine"
r8.<init>(r9)
throw r8
L33:
java.lang.Object r8 = r0.L$1
java.util.List r8 = (java.util.List) r8
java.lang.Object r0 = r0.L$0
com.unity3d.ads.adplayer.AndroidWebViewContainer r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer) r0
kotlin.ResultKt.throwOnFailure(r9)
goto L96
L3f:
java.lang.Object r8 = r0.L$0
com.unity3d.ads.adplayer.AndroidWebViewContainer r8 = (com.unity3d.ads.adplayer.AndroidWebViewContainer) r8
kotlin.ResultKt.throwOnFailure(r9)
goto L7b
L47:
java.lang.Object r8 = r0.L$0
com.unity3d.ads.adplayer.AndroidWebViewContainer r8 = (com.unity3d.ads.adplayer.AndroidWebViewContainer) r8
kotlin.ResultKt.throwOnFailure(r9)
goto L6a
L4f:
kotlin.ResultKt.throwOnFailure(r9)
kotlinx.coroutines.CoroutineScope r9 = r7.scope
kotlin.coroutines.CoroutineContext r9 = r9.getCoroutineContext()
com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$2 r2 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$loadUrl$2
r6 = 0
r2.<init>(r7, r8, r6)
r0.L$0 = r7
r0.label = r5
java.lang.Object r8 = kotlinx.coroutines.BuildersKt.withContext(r9, r2, r0)
if (r8 != r1) goto L69
return r1
L69:
r8 = r7
L6a:
com.unity3d.ads.adplayer.AndroidWebViewClient r9 = r8.webViewClient
kotlinx.coroutines.Deferred r9 = r9.getOnLoadFinished()
r0.L$0 = r8
r0.label = r4
java.lang.Object r9 = r9.await(r0)
if (r9 != r1) goto L7b
return r1
L7b:
java.util.List r9 = (java.util.List) r9
r2 = r9
java.util.Collection r2 = (java.util.Collection) r2
boolean r2 = r2.isEmpty()
r2 = r2 ^ r5
if (r2 == 0) goto La1
r0.L$0 = r8
r0.L$1 = r9
r0.label = r3
java.lang.Object r0 = r8.destroy(r0)
if (r0 != r1) goto L94
return r1
L94:
r0 = r8
r8 = r9
L96:
com.unity3d.ads.core.domain.SendWebViewClientErrorDiagnostics r9 = r0.sendWebViewClientErrorDiagnostics
r9.invoke(r8)
com.unity3d.ads.adplayer.LoadWebViewError r9 = new com.unity3d.ads.adplayer.LoadWebViewError
r9.<init>(r8)
throw r9
La1:
kotlin.Unit r8 = kotlin.Unit.INSTANCE
return r8
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidWebViewContainer.loadUrl(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX WARN: Can't wrap try/catch for region: R(10:0|1|(2:3|(7:5|6|7|(1:(1:10)(2:16|17))(3:18|19|(1:21))|11|12|13))|23|6|7|(0)(0)|11|12|13) */
/* JADX WARN: Removed duplicated region for block: B:18:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:9:0x0023 */
@Override // com.unity3d.ads.adplayer.WebViewContainer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object evaluateJavascript(java.lang.String r6, kotlin.coroutines.Continuation r7) {
/*
r5 = this;
boolean r0 = r7 instanceof com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$1
if (r0 == 0) goto L13
r0 = r7
com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$1 r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$1 r0 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$1
r0.<init>(r5, r7)
L18:
java.lang.Object r7 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r7) // Catch: java.util.concurrent.CancellationException -> L49
goto L49
L29:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r7)
throw r6
L31:
kotlin.ResultKt.throwOnFailure(r7)
kotlinx.coroutines.CoroutineScope r7 = r5.scope // Catch: java.util.concurrent.CancellationException -> L49
kotlin.coroutines.CoroutineContext r7 = r7.getCoroutineContext() // Catch: java.util.concurrent.CancellationException -> L49
com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$2 r2 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$evaluateJavascript$2 // Catch: java.util.concurrent.CancellationException -> L49
r4 = 0
r2.<init>(r5, r6, r4) // Catch: java.util.concurrent.CancellationException -> L49
r0.label = r3 // Catch: java.util.concurrent.CancellationException -> L49
java.lang.Object r6 = kotlinx.coroutines.BuildersKt.withContext(r7, r2, r0) // Catch: java.util.concurrent.CancellationException -> L49
if (r6 != r1) goto L49
return r1
L49:
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidWebViewContainer.evaluateJavascript(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX WARN: Can't wrap try/catch for region: R(10:0|1|(2:3|(7:5|6|7|(1:(1:10)(2:16|17))(3:18|19|(1:21))|11|12|13))|23|6|7|(0)(0)|11|12|13) */
/* JADX WARN: Removed duplicated region for block: B:18:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:9:0x0023 */
@Override // com.unity3d.ads.adplayer.WebViewContainer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object addJavascriptInterface(com.unity3d.ads.adplayer.WebViewBridge r6, java.lang.String r7, kotlin.coroutines.Continuation r8) {
/*
r5 = this;
boolean r0 = r8 instanceof com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$1
if (r0 == 0) goto L13
r0 = r8
com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$1 r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$1 r0 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$1
r0.<init>(r5, r8)
L18:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r8) // Catch: java.util.concurrent.CancellationException -> L49
goto L49
L29:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r7)
throw r6
L31:
kotlin.ResultKt.throwOnFailure(r8)
kotlinx.coroutines.CoroutineScope r8 = r5.scope // Catch: java.util.concurrent.CancellationException -> L49
kotlin.coroutines.CoroutineContext r8 = r8.getCoroutineContext() // Catch: java.util.concurrent.CancellationException -> L49
com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$2 r2 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$addJavascriptInterface$2 // Catch: java.util.concurrent.CancellationException -> L49
r4 = 0
r2.<init>(r5, r7, r6, r4) // Catch: java.util.concurrent.CancellationException -> L49
r0.label = r3 // Catch: java.util.concurrent.CancellationException -> L49
java.lang.Object r6 = kotlinx.coroutines.BuildersKt.withContext(r8, r2, r0) // Catch: java.util.concurrent.CancellationException -> L49
if (r6 != r1) goto L49
return r1
L49:
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidWebViewContainer.addJavascriptInterface(com.unity3d.ads.adplayer.WebViewBridge, java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0036 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
@Override // com.unity3d.ads.adplayer.WebViewContainer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object destroy(kotlin.coroutines.Continuation r6) {
/*
r5 = this;
boolean r0 = r6 instanceof com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$1
if (r0 == 0) goto L13
r0 = r6
com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$1 r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$1 r0 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$1
r0.<init>(r5, r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 0
r4 = 1
if (r2 == 0) goto L36
if (r2 != r4) goto L2e
java.lang.Object r0 = r0.L$0
com.unity3d.ads.adplayer.AndroidWebViewContainer r0 = (com.unity3d.ads.adplayer.AndroidWebViewContainer) r0
kotlin.ResultKt.throwOnFailure(r6)
goto L56
L2e:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r0)
throw r6
L36:
kotlin.ResultKt.throwOnFailure(r6)
kotlinx.coroutines.CoroutineScope r6 = r5.scope
kotlin.coroutines.CoroutineContext r6 = r6.getCoroutineContext()
kotlinx.coroutines.NonCancellable r2 = kotlinx.coroutines.NonCancellable.INSTANCE
kotlin.coroutines.CoroutineContext r6 = r6.plus(r2)
com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$2 r2 = new com.unity3d.ads.adplayer.AndroidWebViewContainer$destroy$2
r2.<init>(r5, r3)
r0.L$0 = r5
r0.label = r4
java.lang.Object r6 = kotlinx.coroutines.BuildersKt.withContext(r6, r2, r0)
if (r6 != r1) goto L55
return r1
L55:
r0 = r5
L56:
kotlinx.coroutines.CoroutineScope r6 = r0.scope
kotlinx.coroutines.CoroutineScopeKt.cancel$default(r6, r3, r4, r3)
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.AndroidWebViewContainer.destroy(kotlin.coroutines.Continuation):java.lang.Object");
}
}

View File

@@ -0,0 +1,107 @@
package com.unity3d.ads.adplayer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.Deferred;
import org.json.JSONArray;
@DebugMetadata(c = "com.unity3d.ads.adplayer.CommonWebViewBridge$handleInvocation$1", f = "CommonWebViewBridge.kt", l = {103, 105, 106, 106, 112}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class CommonWebViewBridge$handleInvocation$1 extends SuspendLambda implements Function2 {
final /* synthetic */ String $callback;
final /* synthetic */ String $location;
final /* synthetic */ JSONArray $parameters;
int I$0;
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
int label;
final /* synthetic */ CommonWebViewBridge this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CommonWebViewBridge$handleInvocation$1(String str, JSONArray jSONArray, CommonWebViewBridge commonWebViewBridge, String str2, Continuation continuation) {
super(2, continuation);
this.$location = str;
this.$parameters = jSONArray;
this.this$0 = commonWebViewBridge;
this.$callback = str2;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new CommonWebViewBridge$handleInvocation$1(this.$location, this.$parameters, this.this$0, this.$callback, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((CommonWebViewBridge$handleInvocation$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:20:0x00c2 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:25:0x00a8 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:26:0x00a9 */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r11) {
/*
Method dump skipped, instructions count: 264
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.CommonWebViewBridge$handleInvocation$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
@DebugMetadata(c = "com.unity3d.ads.adplayer.CommonWebViewBridge$handleInvocation$1$1", f = "CommonWebViewBridge.kt", l = {105}, m = "invokeSuspend")
/* renamed from: com.unity3d.ads.adplayer.CommonWebViewBridge$handleInvocation$1$1, reason: invalid class name */
public static final class AnonymousClass1 extends SuspendLambda implements Function2 {
final /* synthetic */ Invocation $invocation;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnonymousClass1(Invocation invocation, Continuation continuation) {
super(2, continuation);
this.$invocation = invocation;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AnonymousClass1(this.$invocation, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
Deferred isHandled = this.$invocation.isHandled();
this.label = 1;
if (isHandled.await(this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.adplayer;
import com.fyber.inneractive.sdk.bidder.TokenParametersOuterClass$TokenParameters;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.CommonWebViewBridge", f = "CommonWebViewBridge.kt", l = {TokenParametersOuterClass$TokenParameters.PRIORCLICKTYPES_FIELD_NUMBER, 63}, m = "request")
/* loaded from: classes4.dex */
public final class CommonWebViewBridge$request$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ CommonWebViewBridge this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CommonWebViewBridge$request$1(CommonWebViewBridge commonWebViewBridge, Continuation continuation) {
super(continuation);
this.this$0 = commonWebViewBridge;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.request(null, null, null, this);
}
}

View File

@@ -0,0 +1,321 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.model.WebViewEvent;
import com.unity3d.ads.core.extensions.JSONArrayExtensionsKt;
import com.unity3d.services.core.log.DeviceLog;
import java.util.Iterator;
import java.util.Set;
import kotlin.Pair;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.SetsKt__SetsKt;
import kotlin.collections.SetsKt___SetsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CompletableDeferred;
import kotlinx.coroutines.CoroutineDispatcher;
import kotlinx.coroutines.CoroutineName;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableSharedFlow;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.SharedFlow;
import kotlinx.coroutines.flow.SharedFlowKt;
import kotlinx.coroutines.flow.StateFlowKt;
import org.json.JSONArray;
@SourceDebugExtension({"SMAP\nCommonWebViewBridge.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CommonWebViewBridge.kt\ncom/unity3d/ads/adplayer/CommonWebViewBridge\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 3 StateFlow.kt\nkotlinx/coroutines/flow/StateFlowKt\n+ 4 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,130:1\n13579#2,2:131\n13579#2,2:138\n230#3,5:133\n230#3,5:141\n1#4:140\n*S KotlinDebug\n*F\n+ 1 CommonWebViewBridge.kt\ncom/unity3d/ads/adplayer/CommonWebViewBridge\n*L\n40#1:131,2\n58#1:138,2\n52#1:133,5\n81#1:141,5\n*E\n"})
/* loaded from: classes4.dex */
public final class CommonWebViewBridge implements WebViewBridge {
private final MutableSharedFlow _onInvocation;
private final MutableStateFlow callbacks;
private final SharedFlow onInvocation;
private final CoroutineScope scope;
private final WebViewContainer webViewContainer;
@Override // com.unity3d.ads.adplayer.WebViewBridge
public SharedFlow getOnInvocation() {
return this.onInvocation;
}
public final CoroutineScope getScope() {
return this.scope;
}
public CommonWebViewBridge(CoroutineDispatcher dispatcher, WebViewContainer webViewContainer, CoroutineScope adPlayerScope) {
Set emptySet;
Intrinsics.checkNotNullParameter(dispatcher, "dispatcher");
Intrinsics.checkNotNullParameter(webViewContainer, "webViewContainer");
Intrinsics.checkNotNullParameter(adPlayerScope, "adPlayerScope");
this.webViewContainer = webViewContainer;
CoroutineScope plus = CoroutineScopeKt.plus(CoroutineScopeKt.plus(adPlayerScope, dispatcher), new CoroutineName("CommonWebViewBridge"));
this.scope = plus;
emptySet = SetsKt__SetsKt.emptySet();
this.callbacks = StateFlowKt.MutableStateFlow(emptySet);
MutableSharedFlow MutableSharedFlow$default = SharedFlowKt.MutableSharedFlow$default(0, 0, null, 7, null);
this._onInvocation = MutableSharedFlow$default;
this.onInvocation = FlowKt.asSharedFlow(MutableSharedFlow$default);
BuildersKt__Builders_commonKt.launch$default(plus, null, null, new AnonymousClass1(null), 3, null);
}
@DebugMetadata(c = "com.unity3d.ads.adplayer.CommonWebViewBridge$1", f = "CommonWebViewBridge.kt", l = {28}, m = "invokeSuspend")
/* renamed from: com.unity3d.ads.adplayer.CommonWebViewBridge$1, reason: invalid class name */
public static final class AnonymousClass1 extends SuspendLambda implements Function2 {
int label;
public AnonymousClass1(Continuation continuation) {
super(2, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return CommonWebViewBridge.this.new AnonymousClass1(continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
WebViewContainer webViewContainer = CommonWebViewBridge.this.webViewContainer;
CommonWebViewBridge commonWebViewBridge = CommonWebViewBridge.this;
this.label = 1;
if (webViewContainer.addJavascriptInterface(commonWebViewBridge, "webviewbridge", this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}
/* JADX INFO: Access modifiers changed from: private */
public final Object execute(HandlerType handlerType, String str, Continuation continuation) {
Object coroutine_suspended;
Object evaluateJavascript = this.webViewContainer.evaluateJavascript("window.nativebridge." + handlerType.getJsPath() + '(' + str + ");", continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return evaluateJavascript == coroutine_suspended ? evaluateJavascript : Unit.INSTANCE;
}
@Override // com.unity3d.ads.adplayer.WebViewBridge
public Object sendEvent(WebViewEvent webViewEvent, Continuation continuation) {
Object coroutine_suspended;
JSONArray jSONArray = new JSONArray();
jSONArray.put(webViewEvent.getCategory());
jSONArray.put(webViewEvent.getName());
for (Object obj : webViewEvent.getParameters()) {
jSONArray.put(obj);
}
HandlerType handlerType = HandlerType.EVENT;
String jSONArray2 = jSONArray.toString();
Intrinsics.checkNotNullExpressionValue(jSONArray2, "arguments.toString()");
Object execute = execute(handlerType, jSONArray2, continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return execute == coroutine_suspended ? execute : Unit.INSTANCE;
}
/* JADX WARN: Removed duplicated region for block: B:11:0x009f A[PHI: r14
0x009f: PHI (r14v4 java.lang.Object) = (r14v3 java.lang.Object), (r14v1 java.lang.Object) binds: [B:17:0x009c, B:10:0x0029] A[DONT_GENERATE, DONT_INLINE], RETURN] */
/* JADX WARN: Removed duplicated region for block: B:18:0x009e A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:19:0x003d */
/* JADX WARN: Removed duplicated region for block: B:8:0x0025 */
@Override // com.unity3d.ads.adplayer.WebViewBridge
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object request(java.lang.String r11, java.lang.String r12, java.lang.Object[] r13, kotlin.coroutines.Continuation r14) {
/*
r10 = this;
boolean r0 = r14 instanceof com.unity3d.ads.adplayer.CommonWebViewBridge$request$1
if (r0 == 0) goto L13
r0 = r14
com.unity3d.ads.adplayer.CommonWebViewBridge$request$1 r0 = (com.unity3d.ads.adplayer.CommonWebViewBridge$request$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.CommonWebViewBridge$request$1 r0 = new com.unity3d.ads.adplayer.CommonWebViewBridge$request$1
r0.<init>(r10, r14)
L18:
java.lang.Object r14 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 2
r4 = 0
r5 = 1
if (r2 == 0) goto L3d
if (r2 == r5) goto L35
if (r2 != r3) goto L2d
kotlin.ResultKt.throwOnFailure(r14)
goto L9f
L2d:
java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
java.lang.String r12 = "call to 'resume' before 'invoke' with coroutine"
r11.<init>(r12)
throw r11
L35:
java.lang.Object r11 = r0.L$0
kotlinx.coroutines.CompletableDeferred r11 = (kotlinx.coroutines.CompletableDeferred) r11
kotlin.ResultKt.throwOnFailure(r14)
goto L94
L3d:
kotlin.ResultKt.throwOnFailure(r14)
kotlinx.coroutines.CompletableDeferred r14 = kotlinx.coroutines.CompletableDeferredKt.CompletableDeferred$default(r4, r5, r4)
int r2 = r14.hashCode()
java.lang.String r2 = java.lang.String.valueOf(r2)
kotlinx.coroutines.flow.MutableStateFlow r6 = r10.callbacks
L4e:
java.lang.Object r7 = r6.getValue()
r8 = r7
java.util.Set r8 = (java.util.Set) r8
kotlin.Pair r9 = kotlin.TuplesKt.to(r2, r14)
java.util.Set r8 = kotlin.collections.SetsKt.plus(r8, r9)
boolean r7 = r6.compareAndSet(r7, r8)
if (r7 == 0) goto L4e
org.json.JSONArray r6 = new org.json.JSONArray
r6.<init>()
r6.put(r11)
r6.put(r12)
r6.put(r2)
int r11 = r13.length
r12 = 0
L73:
if (r12 >= r11) goto L7d
r2 = r13[r12]
r6.put(r2)
int r12 = r12 + 1
goto L73
L7d:
com.unity3d.ads.adplayer.HandlerType r11 = com.unity3d.ads.adplayer.HandlerType.INVOCATION
java.lang.String r12 = r6.toString()
java.lang.String r13 = "arguments.toString()"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r12, r13)
r0.L$0 = r14
r0.label = r5
java.lang.Object r11 = r10.execute(r11, r12, r0)
if (r11 != r1) goto L93
return r1
L93:
r11 = r14
L94:
r0.L$0 = r4
r0.label = r3
java.lang.Object r14 = r11.await(r0)
if (r14 != r1) goto L9f
return r1
L9f:
return r14
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.CommonWebViewBridge.request(java.lang.String, java.lang.String, java.lang.Object[], kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // com.unity3d.ads.adplayer.WebViewBridge
public void handleCallback(String callbackId, String callbackStatus, String rawParameters) {
Object obj;
Object value;
Set minus;
Intrinsics.checkNotNullParameter(callbackId, "callbackId");
Intrinsics.checkNotNullParameter(callbackStatus, "callbackStatus");
Intrinsics.checkNotNullParameter(rawParameters, "rawParameters");
Object[] typedArray = JSONArrayExtensionsKt.toTypedArray(new JSONArray(rawParameters));
Iterator it = ((Iterable) this.callbacks.getValue()).iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
} else {
obj = it.next();
if (Intrinsics.areEqual((String) ((Pair) obj).component1(), callbackId)) {
break;
}
}
}
Pair pair = (Pair) obj;
if (pair == null) {
return;
}
CompletableDeferred completableDeferred = (CompletableDeferred) pair.component2();
if (Intrinsics.areEqual(callbackStatus, "success")) {
completableDeferred.complete(typedArray);
} else if (Intrinsics.areEqual(callbackStatus, "error")) {
Object obj2 = typedArray[0];
Intrinsics.checkNotNull(obj2, "null cannot be cast to non-null type kotlin.String");
completableDeferred.completeExceptionally(new Exception((String) obj2));
}
MutableStateFlow mutableStateFlow = this.callbacks;
do {
value = mutableStateFlow.getValue();
minus = SetsKt___SetsKt.minus((Set) value, pair);
} while (!mutableStateFlow.compareAndSet(value, minus));
}
@Override // com.unity3d.ads.adplayer.WebViewBridge
public void handleInvocation(String message) {
Intrinsics.checkNotNullParameter(message, "message");
JSONArray jSONArray = new JSONArray(message);
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
Object obj = jSONArray.get(i);
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type org.json.JSONArray");
JSONArray jSONArray2 = (JSONArray) obj;
Object obj2 = jSONArray2.get(0);
Intrinsics.checkNotNull(obj2, "null cannot be cast to non-null type kotlin.String");
String str = (String) obj2;
Object obj3 = jSONArray2.get(1);
Intrinsics.checkNotNull(obj3, "null cannot be cast to non-null type kotlin.String");
String str2 = (String) obj3;
Object obj4 = jSONArray2.get(2);
Intrinsics.checkNotNull(obj4, "null cannot be cast to non-null type org.json.JSONArray");
JSONArray jSONArray3 = (JSONArray) obj4;
Object obj5 = jSONArray2.get(3);
Intrinsics.checkNotNull(obj5, "null cannot be cast to non-null type kotlin.String");
String str3 = (String) obj5;
DeviceLog.debug("Unity Ads WebView calling for: " + str + '.' + str2 + '(' + jSONArray3 + ')');
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append('.');
sb.append(str2);
BuildersKt__Builders_commonKt.launch$default(this.scope, null, null, new CommonWebViewBridge$handleInvocation$1(sb.toString(), jSONArray3, this, str3, null), 3, null);
}
}
/* JADX INFO: Access modifiers changed from: private */
public final Object respond(String str, String str2, Object[] objArr, Continuation continuation) {
Object coroutine_suspended;
JSONArray jSONArray = new JSONArray();
jSONArray.put(str);
jSONArray.put(str2);
jSONArray.put(new JSONArray(objArr));
HandlerType handlerType = HandlerType.CALLBACK;
StringBuilder sb = new StringBuilder();
sb.append('[');
sb.append(jSONArray);
sb.append(']');
Object execute = execute(handlerType, sb.toString(), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return execute == coroutine_suspended ? execute : Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,128 @@
package com.unity3d.ads.adplayer;
import android.webkit.WebView;
import java.util.Map;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class DisplayMessage {
private final String opportunityId;
public /* synthetic */ DisplayMessage(String str, DefaultConstructorMarker defaultConstructorMarker) {
this(str);
}
public final String getOpportunityId() {
return this.opportunityId;
}
private DisplayMessage(String str) {
this.opportunityId = str;
}
public static final class DisplayReady extends DisplayMessage {
private final Map<String, Object> showOptions;
public final Map<String, Object> getShowOptions() {
return this.showOptions;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DisplayReady(String opportunityId, Map<String, ? extends Object> map) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
this.showOptions = map;
}
public /* synthetic */ DisplayReady(String str, Map map, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : map);
}
}
public static final class WebViewInstanceRequest extends DisplayMessage {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public WebViewInstanceRequest(String opportunityId) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
}
}
public static final class VisibilityChanged extends DisplayMessage {
private final boolean isVisible;
public final boolean isVisible() {
return this.isVisible;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public VisibilityChanged(String opportunityId, boolean z) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
this.isVisible = z;
}
}
public static final class FocusChanged extends DisplayMessage {
private final boolean isFocused;
public final boolean isFocused() {
return this.isFocused;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FocusChanged(String opportunityId, boolean z) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
this.isFocused = z;
}
}
public static final class DisplayDestroyed extends DisplayMessage {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DisplayDestroyed(String opportunityId) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
}
}
public static final class DisplayError extends DisplayMessage {
private final String reason;
public final String getReason() {
return this.reason;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DisplayError(String opportunityId, String reason) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(reason, "reason");
this.reason = reason;
}
}
public static final class WebViewInstanceResponse extends DisplayMessage {
private final WebView webView;
public final WebView getWebView() {
return this.webView;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public WebViewInstanceResponse(String opportunityId, WebView webView) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(webView, "webView");
this.webView = webView;
}
}
public static final class DisplayFinishRequest extends DisplayMessage {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DisplayFinishRequest(String opportunityId) {
super(opportunityId, null);
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
}
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer;
import androidx.annotation.CallSuper;
import com.unity3d.ads.adplayer.AdPlayer;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public interface EmbeddableAdPlayer extends AdPlayer {
public static final class DefaultImpls {
@CallSuper
public static Object destroy(EmbeddableAdPlayer embeddableAdPlayer, Continuation continuation) {
Object coroutine_suspended;
Object destroy = AdPlayer.DefaultImpls.destroy(embeddableAdPlayer, continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return destroy == coroutine_suspended ? destroy : Unit.INSTANCE;
}
public static void show(EmbeddableAdPlayer embeddableAdPlayer, ShowOptions showOptions) {
Intrinsics.checkNotNullParameter(showOptions, "showOptions");
AdPlayer.DefaultImpls.show(embeddableAdPlayer, showOptions);
}
}
}

View File

@@ -0,0 +1,9 @@
package com.unity3d.ads.adplayer;
import kotlin.jvm.functions.Function2;
/* loaded from: classes4.dex */
public interface ExposedFunction extends Function2 {
@Override // kotlin.jvm.functions.Function2
/* synthetic */ Object invoke(Object obj, Object obj2);
}

View File

@@ -0,0 +1,59 @@
package com.unity3d.ads.adplayer;
/* loaded from: classes4.dex */
public final class ExposedFunctionLocation {
public static final String ATTRIBUTION_REGISTER_CLICK = "com.unity3d.services.ads.api.AdViewer.attributionRegisterClick";
public static final String ATTRIBUTION_REGISTER_VIEW = "com.unity3d.services.ads.api.AdViewer.attributionRegisterView";
public static final String BROADCAST_EVENT = "com.unity3d.services.ads.api.AdViewer.broadcastEvent";
public static final String CANCEL_SHOW_TIMEOUT = "com.unity3d.services.ads.api.AdViewer.cancelShowTimeout";
public static final String CLICKED = "com.unity3d.services.ads.api.AdViewer.clicked";
public static final String COMPLETED = "com.unity3d.services.ads.api.AdViewer.completed";
public static final String DOWNLOAD = "com.unity3d.services.ads.api.AdViewer.download";
public static final String FAILED = "com.unity3d.services.ads.api.AdViewer.failed";
public static final String GET_AD_CONTEXT = "com.unity3d.services.ads.api.AdViewer.getAdContext";
public static final String GET_ALLOWED_PII = "com.unity3d.services.ads.api.AdViewer.getPrivacyAllowedPii";
public static final String GET_CONNECTION_TYPE = "com.unity3d.services.core.api.DeviceInfo.getConnectionType";
public static final String GET_DEVICE_MAX_VOLUME = "com.unity3d.services.core.api.DeviceInfo.getDeviceMaxVolume";
public static final String GET_DEVICE_VOLUME = "com.unity3d.services.core.api.DeviceInfo.getDeviceVolume";
public static final String GET_PRIVACY = "com.unity3d.services.ads.api.AdViewer.getPrivacyPayload";
public static final String GET_PRIVACY_FSM = "com.unity3d.services.ads.api.AdViewer.getPrivacyFsm";
public static final String GET_SCREEN_HEIGHT = "com.unity3d.services.core.api.DeviceInfo.getScreenHeight";
public static final String GET_SCREEN_WIDTH = "com.unity3d.services.core.api.DeviceInfo.getScreenWidth";
public static final String GET_SESSION_TOKEN = "com.unity3d.services.ads.api.AdViewer.getSessionToken";
public static final String INCREMENT_BANNER_IMPRESSION_COUNT = "com.unity3d.services.ads.api.AdViewer.incrementBannerImpressionCount";
public static final ExposedFunctionLocation INSTANCE = new ExposedFunctionLocation();
public static final String IS_ATTRIBUTION_AVAILABLE = "com.unity3d.services.ads.api.AdViewer.isAttributionAvailable";
public static final String IS_FILE_CACHED = "com.unity3d.services.ads.api.AdViewer.isFileCached";
public static final String LEFT_APPLICATION = "com.unity3d.services.ads.api.AdViewer.leftApplication";
public static final String LOAD_COMPLETE = "com.unity3d.services.ads.api.AdViewer.loadComplete";
public static final String LOAD_ERROR = "com.unity3d.services.ads.api.AdViewer.loadError";
public static final String MARK_CAMPAIGN_STATE_SHOWN = "com.unity3d.services.ads.api.AdViewer.markCampaignStateAsShown";
public static final String OM_FINISH_SESSION = "com.unity3d.services.ads.api.AdViewer.omidFinishSession";
public static final String OM_GET_DATA = "com.unity3d.services.ads.api.AdViewer.omidGetData";
public static final String OM_IMPRESSION = "com.unity3d.services.ads.api.AdViewer.omidImpression";
public static final String OM_START_SESSION = "com.unity3d.services.ads.api.AdViewer.omidStartSession";
public static final String OPEN_URL = "com.unity3d.services.ads.api.AdViewer.openUrl";
public static final String REFRESH_AD_DATA = "com.unity3d.services.ads.api.AdViewer.refreshAdData";
public static final String REQUEST_GET = "com.unity3d.services.core.api.Request.get";
public static final String REQUEST_HEAD = "com.unity3d.services.core.api.Request.head";
public static final String REQUEST_POST = "com.unity3d.services.core.api.Request.post";
public static final String SEND_DIAGNOSTIC_EVENT = "com.unity3d.services.ads.api.AdViewer.sendDiagnosticEvent";
public static final String SEND_OPERATIVE_EVENT = "com.unity3d.services.ads.api.AdViewer.sendOperativeEvent";
public static final String SEND_PRIVACY_UPDATE_REQUEST = "com.unity3d.services.ads.api.AdViewer.sendPrivacyUpdateRequest";
public static final String SET_ALLOWED_PII = "com.unity3d.services.ads.api.AdViewer.setPrivacyAllowedPii";
public static final String SET_PRIVACY = "com.unity3d.services.ads.api.AdViewer.setPrivacyPayload";
public static final String SET_PRIVACY_FSM = "com.unity3d.services.ads.api.AdViewer.setPrivacyFsm";
public static final String STARTED = "com.unity3d.services.ads.api.AdViewer.started";
public static final String STORAGE_CLEAR = "com.unity3d.services.core.api.Storage.clear";
public static final String STORAGE_DELETE = "com.unity3d.services.core.api.Storage.delete";
public static final String STORAGE_GET = "com.unity3d.services.core.api.Storage.get";
public static final String STORAGE_GET_KEYS = "com.unity3d.services.core.api.Storage.getKeys";
public static final String STORAGE_READ = "com.unity3d.services.core.api.Storage.read";
public static final String STORAGE_SET = "com.unity3d.services.core.api.Storage.set";
public static final String STORAGE_WRITE = "com.unity3d.services.core.api.Storage.write";
public static final String UPDATE_CAMPAIGN_STATE = "com.unity3d.services.ads.api.AdViewer.updateCampaignState";
public static final String UPDATE_TRACKING_TOKEN = "com.unity3d.services.ads.api.AdViewer.updateTrackingToken";
private ExposedFunctionLocation() {
}
}

View File

@@ -0,0 +1,52 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$2", f = "FullScreenWebViewDisplay.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$listenToAdPlayerEvents$2 extends SuspendLambda implements Function2 {
/* synthetic */ Object L$0;
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$listenToAdPlayerEvents$2(FullScreenWebViewDisplay fullScreenWebViewDisplay, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
FullScreenWebViewDisplay$listenToAdPlayerEvents$2 fullScreenWebViewDisplay$listenToAdPlayerEvents$2 = new FullScreenWebViewDisplay$listenToAdPlayerEvents$2(this.this$0, continuation);
fullScreenWebViewDisplay$listenToAdPlayerEvents$2.L$0 = obj;
return fullScreenWebViewDisplay$listenToAdPlayerEvents$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(DisplayMessage displayMessage, Continuation continuation) {
return ((FullScreenWebViewDisplay$listenToAdPlayerEvents$2) create(displayMessage, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
DisplayMessage displayMessage = (DisplayMessage) this.L$0;
if (displayMessage instanceof DisplayMessage.DisplayFinishRequest) {
this.this$0.finish();
} else if (displayMessage instanceof DisplayMessage.WebViewInstanceResponse) {
this.this$0.loadWebView(((DisplayMessage.WebViewInstanceResponse) displayMessage).getWebView());
}
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,66 @@
package com.unity3d.ads.adplayer;
import android.webkit.WebView;
import com.unity3d.ads.adplayer.DisplayMessage;
import java.util.Map;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$loadWebView$1", f = "FullScreenWebViewDisplay.kt", l = {62}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$loadWebView$1 extends SuspendLambda implements Function2 {
final /* synthetic */ WebView $webView;
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$loadWebView$1(FullScreenWebViewDisplay fullScreenWebViewDisplay, WebView webView, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
this.$webView = webView;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$loadWebView$1(this.this$0, this.$webView, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$loadWebView$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
Map map;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
this.this$0.setContentView(this.$webView);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.this$0.opportunityId;
map = this.this$0.showOptions;
DisplayMessage.DisplayReady displayReady = new DisplayMessage.DisplayReady(str, map);
this.label = 1;
if (displayMessages.emit(displayReady, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,59 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$onCreate$1$1", f = "FullScreenWebViewDisplay.kt", l = {31}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$onCreate$1$1 extends SuspendLambda implements Function2 {
final /* synthetic */ FullScreenWebViewDisplay $this_run;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$onCreate$1$1(FullScreenWebViewDisplay fullScreenWebViewDisplay, Continuation continuation) {
super(2, continuation);
this.$this_run = fullScreenWebViewDisplay;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$onCreate$1$1(this.$this_run, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$onCreate$1$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.$this_run.opportunityId;
DisplayMessage.DisplayError displayError = new DisplayMessage.DisplayError(str, "Opportunity ID not found");
this.label = 1;
if (displayMessages.emit(displayError, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,59 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$onCreate$5", f = "FullScreenWebViewDisplay.kt", l = {42}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$onCreate$5 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$onCreate$5(FullScreenWebViewDisplay fullScreenWebViewDisplay, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$onCreate$5(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$onCreate$5) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.this$0.opportunityId;
DisplayMessage.WebViewInstanceRequest webViewInstanceRequest = new DisplayMessage.WebViewInstanceRequest(str);
this.label = 1;
if (displayMessages.emit(webViewInstanceRequest, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,59 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$onDestroy$1", f = "FullScreenWebViewDisplay.kt", l = {90}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$onDestroy$1 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$onDestroy$1(FullScreenWebViewDisplay fullScreenWebViewDisplay, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$onDestroy$1(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$onDestroy$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.this$0.opportunityId;
DisplayMessage.DisplayDestroyed displayDestroyed = new DisplayMessage.DisplayDestroyed(str);
this.label = 1;
if (displayMessages.emit(displayDestroyed, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,60 @@
package com.unity3d.ads.adplayer;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$onPause$1", f = "FullScreenWebViewDisplay.kt", l = {IronSourceConstants.TROUBLESHOOTING_AD_QUALITY_SDK_WAS_ALREADY_INITIALIZED_EVENT}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$onPause$1 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$onPause$1(FullScreenWebViewDisplay fullScreenWebViewDisplay, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$onPause$1(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$onPause$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.this$0.opportunityId;
DisplayMessage.VisibilityChanged visibilityChanged = new DisplayMessage.VisibilityChanged(str, false);
this.label = 1;
if (displayMessages.emit(visibilityChanged, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,60 @@
package com.unity3d.ads.adplayer;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$onResume$1", f = "FullScreenWebViewDisplay.kt", l = {IronSourceConstants.TEST_SUITE_WEB_CONTROLLER_FAILED_TO_LOAD}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$onResume$1 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$onResume$1(FullScreenWebViewDisplay fullScreenWebViewDisplay, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$onResume$1(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$onResume$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.this$0.opportunityId;
DisplayMessage.VisibilityChanged visibilityChanged = new DisplayMessage.VisibilityChanged(str, true);
this.label = 1;
if (displayMessages.emit(visibilityChanged, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,61 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.DisplayMessage;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableSharedFlow;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$onWindowFocusChanged$1", f = "FullScreenWebViewDisplay.kt", l = {98}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay$onWindowFocusChanged$1 extends SuspendLambda implements Function2 {
final /* synthetic */ boolean $hasFocus;
int label;
final /* synthetic */ FullScreenWebViewDisplay this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullScreenWebViewDisplay$onWindowFocusChanged$1(FullScreenWebViewDisplay fullScreenWebViewDisplay, boolean z, Continuation continuation) {
super(2, continuation);
this.this$0 = fullScreenWebViewDisplay;
this.$hasFocus = z;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new FullScreenWebViewDisplay$onWindowFocusChanged$1(this.this$0, this.$hasFocus, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((FullScreenWebViewDisplay$onWindowFocusChanged$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
String str;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
str = this.this$0.opportunityId;
DisplayMessage.FocusChanged focusChanged = new DisplayMessage.FocusChanged(str, this.$hasFocus);
this.label = 1;
if (displayMessages.emit(focusChanged, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,195 @@
package com.unity3d.ads.adplayer;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.LifecycleOwnerKt;
import com.unity3d.ads.core.extensions.JSONObjectExtensionsKt;
import com.vungle.ads.internal.protos.Sdk;
import java.util.Map;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.Dispatchers;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowCollector;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableSharedFlow;
import org.json.JSONObject;
@SourceDebugExtension({"SMAP\nFullScreenWebViewDisplay.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FullScreenWebViewDisplay.kt\ncom/unity3d/ads/adplayer/FullScreenWebViewDisplay\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 4 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt\n+ 5 SafeCollector.common.kt\nkotlinx/coroutines/flow/internal/SafeCollector_commonKt\n*L\n1#1,101:1\n1#2:102\n20#3:103\n22#3:107\n50#4:104\n55#4:106\n106#5:105\n*S KotlinDebug\n*F\n+ 1 FullScreenWebViewDisplay.kt\ncom/unity3d/ads/adplayer/FullScreenWebViewDisplay\n*L\n48#1:103\n48#1:107\n48#1:104\n48#1:106\n48#1:105\n*E\n"})
/* loaded from: classes4.dex */
public final class FullScreenWebViewDisplay extends ComponentActivity {
private String opportunityId = "";
private Map<String, ? extends Object> showOptions;
@Override // android.app.Activity, android.view.KeyEvent.Callback
public boolean onKeyDown(int i, KeyEvent keyEvent) {
return i == 4;
}
@Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
String stringExtra = getIntent().getStringExtra("opportunityId");
if (stringExtra == null) {
setResult(0);
finish();
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new FullScreenWebViewDisplay$onCreate$1$1(this, null), 3, null);
return;
}
this.opportunityId = stringExtra;
Integer valueOf = Integer.valueOf(getIntent().getIntExtra("orientation", -1));
if (valueOf.intValue() == 1) {
valueOf = null;
}
if (valueOf != null) {
setRequestedOrientation(valueOf.intValue());
}
String stringExtra2 = getIntent().getStringExtra("showOptions");
this.showOptions = stringExtra2 != null ? JSONObjectExtensionsKt.toBuiltInMap(new JSONObject(stringExtra2)) : null;
listenToAdPlayerEvents();
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new FullScreenWebViewDisplay$onCreate$5(this, null), 3, null);
}
private final void listenToAdPlayerEvents() {
final MutableSharedFlow displayMessages = AndroidFullscreenWebViewAdPlayer.Companion.getDisplayMessages();
FlowKt.launchIn(FlowKt.onEach(new Flow() { // from class: com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 FullScreenWebViewDisplay.kt\ncom/unity3d/ads/adplayer/FullScreenWebViewDisplay\n*L\n1#1,222:1\n21#2:223\n22#2:225\n48#3:224\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1$2, reason: invalid class name */
public static final class AnonymousClass2<T> implements FlowCollector {
final /* synthetic */ FlowCollector $this_unsafeFlow;
final /* synthetic */ FullScreenWebViewDisplay this$0;
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1$2", f = "FullScreenWebViewDisplay.kt", l = {Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE}, m = "emit")
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1$emit$1\n*L\n1#1,222:1\n*E\n"})
/* renamed from: com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1$2$1, reason: invalid class name */
public static final class AnonymousClass1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
public AnonymousClass1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return AnonymousClass2.this.emit(null, this);
}
}
public AnonymousClass2(FlowCollector flowCollector, FullScreenWebViewDisplay fullScreenWebViewDisplay) {
this.$this_unsafeFlow = flowCollector;
this.this$0 = fullScreenWebViewDisplay;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // kotlinx.coroutines.flow.FlowCollector
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object emit(java.lang.Object r6, kotlin.coroutines.Continuation r7) {
/*
r5 = this;
boolean r0 = r7 instanceof com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1.AnonymousClass2.AnonymousClass1
if (r0 == 0) goto L13
r0 = r7
com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1$2$1 r0 = (com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1.AnonymousClass2.AnonymousClass1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1$2$1 r0 = new com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1$2$1
r0.<init>(r7)
L18:
java.lang.Object r7 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r7)
goto L52
L29:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r7)
throw r6
L31:
kotlin.ResultKt.throwOnFailure(r7)
kotlinx.coroutines.flow.FlowCollector r7 = r5.$this_unsafeFlow
r2 = r6
com.unity3d.ads.adplayer.DisplayMessage r2 = (com.unity3d.ads.adplayer.DisplayMessage) r2
java.lang.String r2 = r2.getOpportunityId()
com.unity3d.ads.adplayer.FullScreenWebViewDisplay r4 = r5.this$0
java.lang.String r4 = com.unity3d.ads.adplayer.FullScreenWebViewDisplay.access$getOpportunityId$p(r4)
boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual(r2, r4)
if (r2 == 0) goto L52
r0.label = r3
java.lang.Object r6 = r7.emit(r6, r0)
if (r6 != r1) goto L52
return r1
L52:
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$$inlined$filter$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
@Override // kotlinx.coroutines.flow.Flow
public Object collect(FlowCollector flowCollector, Continuation continuation) {
Object coroutine_suspended;
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector, this), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return collect == coroutine_suspended ? collect : Unit.INSTANCE;
}
}, new FullScreenWebViewDisplay$listenToAdPlayerEvents$2(this, null)), LifecycleOwnerKt.getLifecycleScope(this));
}
/* JADX INFO: Access modifiers changed from: private */
public final void loadWebView(WebView webView) {
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new FullScreenWebViewDisplay$loadWebView$1(this, webView, null), 3, null);
}
@Override // android.app.Activity
public void onResume() {
super.onResume();
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new FullScreenWebViewDisplay$onResume$1(this, null), 3, null);
}
@Override // android.app.Activity
public void onPause() {
super.onPause();
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new FullScreenWebViewDisplay$onPause$1(this, null), 3, null);
}
@Override // android.app.Activity
public void onDestroy() {
super.onDestroy();
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(Dispatchers.getMain()), null, null, new FullScreenWebViewDisplay$onDestroy$1(this, null), 3, null);
}
@Override // android.app.Activity, android.view.Window.Callback
public void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), null, null, new FullScreenWebViewDisplay$onWindowFocusChanged$1(this, z, null), 3, null);
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer;
import androidx.annotation.CallSuper;
import com.unity3d.ads.adplayer.AdPlayer;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public interface FullscreenAdPlayer extends AdPlayer {
public static final class DefaultImpls {
@CallSuper
public static Object destroy(FullscreenAdPlayer fullscreenAdPlayer, Continuation continuation) {
Object coroutine_suspended;
Object destroy = AdPlayer.DefaultImpls.destroy(fullscreenAdPlayer, continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return destroy == coroutine_suspended ? destroy : Unit.INSTANCE;
}
public static void show(FullscreenAdPlayer fullscreenAdPlayer, ShowOptions showOptions) {
Intrinsics.checkNotNullParameter(showOptions, "showOptions");
AdPlayer.DefaultImpls.show(fullscreenAdPlayer, showOptions);
}
}
}

View File

@@ -0,0 +1,9 @@
package com.unity3d.ads.adplayer;
import kotlin.jvm.functions.Function0;
/* loaded from: classes4.dex */
public interface GetAdAssetLoader extends Function0 {
@Override // kotlin.jvm.functions.Function0
/* synthetic */ Object invoke();
}

View File

@@ -0,0 +1,51 @@
package com.unity3d.ads.adplayer;
import android.content.Context;
import android.webkit.WebResourceResponse;
import androidx.webkit.WebViewAssetLoader;
import com.unity3d.services.core.log.DeviceLog;
import java.io.File;
import java.io.FileInputStream;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class GetAdAssetLoaderKt {
public static final GetAdAssetLoader provideGetAdCacheAssetLoader(final Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new GetAdAssetLoader() { // from class: com.unity3d.ads.adplayer.GetAdAssetLoaderKt$$ExternalSyntheticLambda1
@Override // com.unity3d.ads.adplayer.GetAdAssetLoader, kotlin.jvm.functions.Function0
public final Object invoke() {
WebViewAssetLoader provideGetAdCacheAssetLoader$lambda$1;
provideGetAdCacheAssetLoader$lambda$1 = GetAdAssetLoaderKt.provideGetAdCacheAssetLoader$lambda$1(context);
return provideGetAdCacheAssetLoader$lambda$1;
}
};
}
/* JADX INFO: Access modifiers changed from: private */
public static final WebViewAssetLoader provideGetAdCacheAssetLoader$lambda$1(final Context context) {
Intrinsics.checkNotNullParameter(context, "$context");
WebViewAssetLoader build = new WebViewAssetLoader.Builder().addPathHandler("/", new WebViewAssetLoader.PathHandler() { // from class: com.unity3d.ads.adplayer.GetAdAssetLoaderKt$$ExternalSyntheticLambda0
@Override // androidx.webkit.WebViewAssetLoader.PathHandler
public final WebResourceResponse handle(String str) {
WebResourceResponse provideGetAdCacheAssetLoader$lambda$1$lambda$0;
provideGetAdCacheAssetLoader$lambda$1$lambda$0 = GetAdAssetLoaderKt.provideGetAdCacheAssetLoader$lambda$1$lambda$0(context, str);
return provideGetAdCacheAssetLoader$lambda$1$lambda$0;
}
}).setDomain("cdn-creatives-cf-prd.acquire.unity3dusercontent.com").build();
Intrinsics.checkNotNullExpressionValue(build, "Builder()\n .addPa…_DOMAIN)\n .build()");
return build;
}
/* JADX INFO: Access modifiers changed from: private */
public static final WebResourceResponse provideGetAdCacheAssetLoader$lambda$1$lambda$0(Context context, String path) {
Intrinsics.checkNotNullParameter(context, "$context");
Intrinsics.checkNotNullParameter(path, "path");
try {
return new WebResourceResponse(GetWebViewAssetLoaderKt.guessMimeType(path), null, new FileInputStream(new File(context.getFilesDir(), "unityads/" + path)));
} catch (Exception unused) {
DeviceLog.debug("Ad Asset not found: %s", path);
return null;
}
}
}

View File

@@ -0,0 +1,61 @@
package com.unity3d.ads.adplayer;
import android.content.Context;
import android.webkit.WebResourceResponse;
import androidx.webkit.WebViewAssetLoader;
import com.unity3d.services.UnityAdsConstants;
import com.unity3d.services.core.log.DeviceLog;
import java.io.InputStream;
import java.net.URLConnection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class GetWebViewAssetLoaderKt {
public static final GetWebViewCacheAssetLoader provideGetWebViewCacheAssetLoader(final Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new GetWebViewCacheAssetLoader() { // from class: com.unity3d.ads.adplayer.GetWebViewAssetLoaderKt$$ExternalSyntheticLambda0
@Override // com.unity3d.ads.adplayer.GetWebViewCacheAssetLoader, kotlin.jvm.functions.Function0
public final Object invoke() {
WebViewAssetLoader provideGetWebViewCacheAssetLoader$lambda$1;
provideGetWebViewCacheAssetLoader$lambda$1 = GetWebViewAssetLoaderKt.provideGetWebViewCacheAssetLoader$lambda$1(context);
return provideGetWebViewCacheAssetLoader$lambda$1;
}
};
}
/* JADX INFO: Access modifiers changed from: private */
public static final WebViewAssetLoader provideGetWebViewCacheAssetLoader$lambda$1(final Context context) {
Intrinsics.checkNotNullParameter(context, "$context");
WebViewAssetLoader build = new WebViewAssetLoader.Builder().addPathHandler(UnityAdsConstants.DefaultUrls.WEBVIEW_ASSET_PATH, new WebViewAssetLoader.PathHandler() { // from class: com.unity3d.ads.adplayer.GetWebViewAssetLoaderKt$$ExternalSyntheticLambda1
@Override // androidx.webkit.WebViewAssetLoader.PathHandler
public final WebResourceResponse handle(String str) {
WebResourceResponse provideGetWebViewCacheAssetLoader$lambda$1$lambda$0;
provideGetWebViewCacheAssetLoader$lambda$1$lambda$0 = GetWebViewAssetLoaderKt.provideGetWebViewCacheAssetLoader$lambda$1$lambda$0(context, str);
return provideGetWebViewCacheAssetLoader$lambda$1$lambda$0;
}
}).setDomain(UnityAdsConstants.DefaultUrls.WEBVIEW_DOMAIN).build();
Intrinsics.checkNotNullExpressionValue(build, "Builder()\n .addPa…_DOMAIN)\n .build()");
return build;
}
/* JADX INFO: Access modifiers changed from: private */
public static final WebResourceResponse provideGetWebViewCacheAssetLoader$lambda$1$lambda$0(Context context, String path) {
Intrinsics.checkNotNullParameter(context, "$context");
Intrinsics.checkNotNullParameter(path, "path");
try {
InputStream open = context.getAssets().open(path);
Intrinsics.checkNotNullExpressionValue(open, "context.assets.open(path)");
return new WebResourceResponse(guessMimeType(path), null, open);
} catch (Exception unused) {
DeviceLog.debug("Webview Asset not found: %s", path);
return null;
}
}
public static final String guessMimeType(String filePath) {
Intrinsics.checkNotNullParameter(filePath, "filePath");
String guessContentTypeFromName = URLConnection.guessContentTypeFromName(filePath);
Intrinsics.checkNotNullExpressionValue(guessContentTypeFromName, "guessContentTypeFromName(filePath)");
return guessContentTypeFromName;
}
}

View File

@@ -0,0 +1,9 @@
package com.unity3d.ads.adplayer;
import kotlin.jvm.functions.Function0;
/* loaded from: classes4.dex */
public interface GetWebViewCacheAssetLoader extends Function0 {
@Override // kotlin.jvm.functions.Function0
/* synthetic */ Object invoke();
}

View File

@@ -0,0 +1,18 @@
package com.unity3d.ads.adplayer;
/* loaded from: classes4.dex */
public enum HandlerType {
CALLBACK("handleCallback"),
INVOCATION("handleInvocation"),
EVENT("handleEvent");
private final String jsPath;
public final String getJsPath() {
return this.jsPath;
}
HandlerType(String str) {
this.jsPath = str;
}
}

View File

@@ -0,0 +1,39 @@
package com.unity3d.ads.adplayer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function1;
@DebugMetadata(c = "com.unity3d.ads.adplayer.Invocation$handle$2", f = "Invocation.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class Invocation$handle$2 extends SuspendLambda implements Function1 {
int label;
public Invocation$handle$2(Continuation continuation) {
super(1, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Continuation continuation) {
return new Invocation$handle$2(continuation);
}
@Override // kotlin.jvm.functions.Function1
public final Object invoke(Continuation continuation) {
return ((Invocation$handle$2) create(continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,68 @@
package com.unity3d.ads.adplayer;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CompletableDeferred;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.adplayer.Invocation$handle$3", f = "Invocation.kt", l = {23}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class Invocation$handle$3 extends SuspendLambda implements Function2 {
final /* synthetic */ Function1 $handler;
int label;
final /* synthetic */ Invocation this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Invocation$handle$3(Function1 function1, Invocation invocation, Continuation continuation) {
super(2, continuation);
this.$handler = function1;
this.this$0 = invocation;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new Invocation$handle$3(this.$handler, this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((Invocation$handle$3) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
CompletableDeferred completableDeferred;
CompletableDeferred completableDeferred2;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
try {
if (i == 0) {
ResultKt.throwOnFailure(obj);
Function1 function1 = this.$handler;
this.label = 1;
obj = function1.invoke(this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
completableDeferred2 = this.this$0.completableDeferred;
completableDeferred2.complete(obj);
} catch (Throwable th) {
completableDeferred = this.this$0.completableDeferred;
completableDeferred.completeExceptionally(th);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,59 @@
package com.unity3d.ads.adplayer;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CompletableDeferred;
import kotlinx.coroutines.CompletableDeferredKt;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.Deferred;
/* loaded from: classes4.dex */
public final class Invocation {
private final CompletableDeferred _isHandled;
private final CompletableDeferred completableDeferred;
private final String location;
private final Object[] parameters;
public final String getLocation() {
return this.location;
}
public final Object[] getParameters() {
return this.parameters;
}
public final Deferred isHandled() {
return this._isHandled;
}
public Invocation(String location, Object[] parameters) {
Intrinsics.checkNotNullParameter(location, "location");
Intrinsics.checkNotNullParameter(parameters, "parameters");
this.location = location;
this.parameters = parameters;
this._isHandled = CompletableDeferredKt.CompletableDeferred$default(null, 1, null);
this.completableDeferred = CompletableDeferredKt.CompletableDeferred$default(null, 1, null);
}
public static /* synthetic */ Object handle$default(Invocation invocation, Function1 function1, Continuation continuation, int i, Object obj) {
if ((i & 1) != 0) {
function1 = new Invocation$handle$2(null);
}
return invocation.handle(function1, continuation);
}
public final Object handle(Function1 function1, Continuation continuation) {
CompletableDeferred completableDeferred = this._isHandled;
Unit unit = Unit.INSTANCE;
completableDeferred.complete(unit);
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(continuation.getContext()), null, null, new Invocation$handle$3(function1, this, null), 3, null);
return unit;
}
public final Object getResult(Continuation continuation) {
return this.completableDeferred.await(continuation);
}
}

View File

@@ -0,0 +1,21 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.model.WebViewClientError;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class LoadWebViewError extends AdPlayerError {
private final List<WebViewClientError> errors;
public final List<WebViewClientError> getErrors() {
return this.errors;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LoadWebViewError(List<WebViewClientError> errors) {
super("AdPlayer was not able to load the webview.", null);
Intrinsics.checkNotNullParameter(errors, "errors");
this.errors = errors;
}
}

View File

@@ -0,0 +1,5 @@
package com.unity3d.ads.adplayer;
/* loaded from: classes4.dex */
public interface ShowOptions {
}

View File

@@ -0,0 +1,45 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.model.ShowStatus;
import com.unity3d.ads.core.data.model.ShowEvent;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
@DebugMetadata(c = "com.unity3d.ads.adplayer.WebViewAdPlayer$onShowEvent$3", f = "WebViewAdPlayer.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class WebViewAdPlayer$onShowEvent$3 extends SuspendLambda implements Function3 {
/* synthetic */ Object L$0;
/* synthetic */ boolean Z$0;
int label;
public WebViewAdPlayer$onShowEvent$3(Continuation continuation) {
super(3, continuation);
}
public final Object invoke(ShowEvent showEvent, boolean z, Continuation continuation) {
WebViewAdPlayer$onShowEvent$3 webViewAdPlayer$onShowEvent$3 = new WebViewAdPlayer$onShowEvent$3(continuation);
webViewAdPlayer$onShowEvent$3.L$0 = showEvent;
webViewAdPlayer$onShowEvent$3.Z$0 = z;
return webViewAdPlayer$onShowEvent$3.invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.jvm.functions.Function3
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
return invoke((ShowEvent) obj, ((Boolean) obj2).booleanValue(), (Continuation) obj3);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
return this.Z$0 ? new ShowEvent.Completed(ShowStatus.COMPLETED) : (ShowEvent) this.L$0;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,32 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.WebViewAdPlayer", f = "WebViewAdPlayer.kt", l = {213, 214, 229}, m = "requestShow")
/* loaded from: classes4.dex */
public final class WebViewAdPlayer$requestShow$1 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
int label;
/* synthetic */ Object result;
final /* synthetic */ WebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public WebViewAdPlayer$requestShow$1(WebViewAdPlayer webViewAdPlayer, Continuation continuation) {
super(continuation);
this.this$0 = webViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.requestShow(null, this);
}
}

View File

@@ -0,0 +1,30 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.adplayer.WebViewAdPlayer", f = "WebViewAdPlayer.kt", l = {241, 255}, m = "sendEvent")
/* loaded from: classes4.dex */
public final class WebViewAdPlayer$sendEvent$1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
final /* synthetic */ WebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public WebViewAdPlayer$sendEvent$1(WebViewAdPlayer webViewAdPlayer, Continuation continuation) {
super(continuation);
this.this$0 = webViewAdPlayer;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object sendEvent;
this.result = obj;
this.label |= Integer.MIN_VALUE;
sendEvent = this.this$0.sendEvent(null, this);
return sendEvent;
}
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.adplayer;
import com.unity3d.services.core.device.Storage;
import kotlin.coroutines.AbstractCoroutineContextElement;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CoroutineExceptionHandler;
@SourceDebugExtension({"SMAP\nCoroutineExceptionHandler.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CoroutineExceptionHandler.kt\nkotlinx/coroutines/CoroutineExceptionHandlerKt$CoroutineExceptionHandler$1\n+ 2 WebViewAdPlayer.kt\ncom/unity3d/ads/adplayer/WebViewAdPlayer\n*L\n1#1,110:1\n81#2,2:111\n*E\n"})
/* loaded from: classes4.dex */
public final class WebViewAdPlayer$special$$inlined$CoroutineExceptionHandler$1 extends AbstractCoroutineContextElement implements CoroutineExceptionHandler {
final /* synthetic */ WebViewAdPlayer this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public WebViewAdPlayer$special$$inlined$CoroutineExceptionHandler$1(CoroutineExceptionHandler.Key key, WebViewAdPlayer webViewAdPlayer) {
super(key);
this.this$0 = webViewAdPlayer;
}
@Override // kotlinx.coroutines.CoroutineExceptionHandler
public void handleException(CoroutineContext coroutineContext, Throwable th) {
Function1 function1;
Storage.Companion companion = Storage.Companion;
function1 = this.this$0.storageEventCallback;
companion.removeStorageEventCallback(function1);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.adplayer;
/* loaded from: classes4.dex */
public final class WebViewAdPlayerKt {
private static final String[] SHOW_EVENTS = {ExposedFunctionLocation.STARTED, ExposedFunctionLocation.CLICKED, ExposedFunctionLocation.COMPLETED, ExposedFunctionLocation.FAILED, ExposedFunctionLocation.CANCEL_SHOW_TIMEOUT, ExposedFunctionLocation.LEFT_APPLICATION};
private static final String[] LOAD_EVENTS = {ExposedFunctionLocation.LOAD_COMPLETE, ExposedFunctionLocation.LOAD_ERROR};
private static final String[] REQUEST_EVENTS = {ExposedFunctionLocation.REQUEST_GET, ExposedFunctionLocation.REQUEST_POST, ExposedFunctionLocation.REQUEST_HEAD};
}

View File

@@ -0,0 +1,18 @@
package com.unity3d.ads.adplayer;
import com.unity3d.ads.adplayer.model.WebViewEvent;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.SharedFlow;
/* loaded from: classes4.dex */
public interface WebViewBridge {
SharedFlow getOnInvocation();
void handleCallback(String str, String str2, String str3);
void handleInvocation(String str);
Object request(String str, String str2, Object[] objArr, Continuation continuation);
Object sendEvent(WebViewEvent webViewEvent, Continuation continuation);
}

View File

@@ -0,0 +1,17 @@
package com.unity3d.ads.adplayer;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.StateFlow;
/* loaded from: classes4.dex */
public interface WebViewContainer {
Object addJavascriptInterface(WebViewBridge webViewBridge, String str, Continuation continuation);
Object destroy(Continuation continuation);
Object evaluateJavascript(String str, Continuation continuation);
StateFlow getLastInputEvent();
Object loadUrl(String str, Continuation continuation);
}

View File

@@ -0,0 +1,35 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public enum ErrorReason {
REASON_UNKNOWN(0),
REASON_WEB_BLANK(1),
REASON_WEB_ERROR_UNKNOWN(2),
REASON_WEB_ERROR_HOST_LOOKUP(3),
REASON_WEB_ERROR_UNSUPPORTED_AUTH_SCHEME(4),
REASON_WEB_ERROR_AUTHENTICATION(5),
REASON_WEB_ERROR_PROXY_AUTHENTICATION(6),
REASON_WEB_ERROR_CONNECT(7),
REASON_WEB_ERROR_IO(8),
REASON_WEB_ERROR_TIMEOUT(9),
REASON_WEB_ERROR_REDIRECT_LOOP(10),
REASON_WEB_ERROR_UNSUPPORTED_SCHEME(11),
REASON_WEB_ERROR_FAILED_SSL_HANDSHAKE(12),
REASON_WEB_ERROR_BAD_URL(13),
REASON_WEB_ERROR_FILE(14),
REASON_WEB_ERROR_FILE_NOT_FOUND(15),
REASON_WEB_ERROR_TOO_MANY_REQUESTS(16),
REASON_WEB_ERROR_UNSAFE_RESOURCE(17),
REASON_WEB_ERROR_RECEIVED_HTTP(18),
REASON_WEBVIEW_RENDER_PROCESS_GONE(19);
private final int code;
public final int getCode() {
return this.code;
}
ErrorReason(int i) {
this.code = i;
}
}

View File

@@ -0,0 +1,85 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class LoadEvent {
public /* synthetic */ LoadEvent(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class Completed extends LoadEvent {
public static final Completed INSTANCE = new Completed();
private Completed() {
super(null);
}
}
private LoadEvent() {
}
public static final class Error extends LoadEvent {
private final int errorCode;
private final String message;
public static /* synthetic */ Error copy$default(Error error, String str, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
str = error.message;
}
if ((i2 & 2) != 0) {
i = error.errorCode;
}
return error.copy(str, i);
}
public final String component1() {
return this.message;
}
public final int component2() {
return this.errorCode;
}
public final Error copy(String message, int i) {
Intrinsics.checkNotNullParameter(message, "message");
return new Error(message, i);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Error)) {
return false;
}
Error error = (Error) obj;
return Intrinsics.areEqual(this.message, error.message) && this.errorCode == error.errorCode;
}
public final int getErrorCode() {
return this.errorCode;
}
public final String getMessage() {
return this.message;
}
public int hashCode() {
return (this.message.hashCode() * 31) + Integer.hashCode(this.errorCode);
}
public String toString() {
return "Error(message=" + this.message + ", errorCode=" + this.errorCode + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Error(String message, int i) {
super(null);
Intrinsics.checkNotNullParameter(message, "message");
this.message = message;
this.errorCode = i;
}
}
}

View File

@@ -0,0 +1,26 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nWebViewEvent.kt\nKotlin\n*S Kotlin\n*F\n+ 1 WebViewEvent.kt\ncom/unity3d/ads/adplayer/model/OnActivityDestroyedEvent\n+ 2 ArrayIntrinsics.kt\nkotlin/ArrayIntrinsicsKt\n*L\n1#1,103:1\n26#2:104\n*S KotlinDebug\n*F\n+ 1 WebViewEvent.kt\ncom/unity3d/ads/adplayer/model/OnActivityDestroyedEvent\n*L\n27#1:104\n*E\n"})
/* loaded from: classes4.dex */
public final class OnActivityDestroyedEvent implements WebViewEvent {
private final String category = "ADVIEWER";
private final String name = "ON_ACTIVITY_DESTROY";
private final Object[] parameters = new Object[0];
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
}

View File

@@ -0,0 +1,32 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OnAllowedPiiChangeEvent implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnAllowedPiiChangeEvent(String value) {
Intrinsics.checkNotNullParameter(value, "value");
this.category = "ADVIEWER";
this.name = "ON_ALLOWED_PII_CHANGE";
this.parameters = new Object[]{value};
}
}

View File

@@ -0,0 +1,32 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OnBroadcastEvent implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnBroadcastEvent(String name, String str) {
Intrinsics.checkNotNullParameter(name, "name");
this.name = name;
this.category = "ADVIEWER";
this.parameters = new Object[]{str};
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public final class OnFocusChangeEvent implements WebViewEvent {
private final String category = "ADVIEWER";
private final String name = "ON_FOCUS_CHANGE";
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnFocusChangeEvent(boolean z) {
this.parameters = new Object[]{Boolean.valueOf(z)};
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public final class OnMuteChangeEvent implements WebViewEvent {
private final String category = "ADVIEWER";
private final String name = "ON_MUTE_CHANGE";
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnMuteChangeEvent(boolean z) {
this.parameters = new Object[]{Boolean.valueOf(z)};
}
}

View File

@@ -0,0 +1,32 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OnPrivacyFsmChangeEvent implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnPrivacyFsmChangeEvent(String value) {
Intrinsics.checkNotNullParameter(value, "value");
this.category = "ADVIEWER";
this.name = "ON_PRIVACY_FSM_CHANGE";
this.parameters = new Object[]{value};
}
}

View File

@@ -0,0 +1,35 @@
package com.unity3d.ads.adplayer.model;
import com.unity3d.services.core.device.StorageEvent;
import com.unity3d.services.core.device.StorageManager;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OnStorageEvent implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnStorageEvent(StorageEvent eventType, StorageManager.StorageType storageType, Object obj) {
Intrinsics.checkNotNullParameter(eventType, "eventType");
Intrinsics.checkNotNullParameter(storageType, "storageType");
this.category = "STORAGE";
this.name = eventType.name();
this.parameters = new Object[]{storageType.name(), obj};
}
}

View File

@@ -0,0 +1,32 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OnUserConsentChangeEvent implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnUserConsentChangeEvent(String value) {
Intrinsics.checkNotNullParameter(value, "value");
this.category = "ADVIEWER";
this.name = "ON_USER_CONSENT_CHANGE";
this.parameters = new Object[]{value};
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public final class OnVisibilityChangeEvent implements WebViewEvent {
private final String category = "ADVIEWER";
private final String name = "ON_VISIBILITY_CHANGE";
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnVisibilityChangeEvent(boolean z) {
this.parameters = new Object[]{Boolean.valueOf(z)};
}
}

View File

@@ -0,0 +1,27 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public final class OnVolumeChangeEvent implements WebViewEvent {
private final String category = "ADVIEWER";
private final String name = "ON_VOLUME_CHANGE";
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnVolumeChangeEvent(double d) {
this.parameters = new Object[]{Double.valueOf(d)};
}
}

View File

@@ -0,0 +1,35 @@
package com.unity3d.ads.adplayer.model;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nWebViewEvent.kt\nKotlin\n*S Kotlin\n*F\n+ 1 WebViewEvent.kt\ncom/unity3d/ads/adplayer/model/OnWebRequestComplete\n+ 2 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,103:1\n37#2,2:104\n*S KotlinDebug\n*F\n+ 1 WebViewEvent.kt\ncom/unity3d/ads/adplayer/model/OnWebRequestComplete\n*L\n93#1:104,2\n*E\n"})
/* loaded from: classes4.dex */
public final class OnWebRequestComplete implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnWebRequestComplete(List<? extends Object> value) {
Intrinsics.checkNotNullParameter(value, "value");
this.category = "REQUEST";
this.name = "COMPLETE";
this.parameters = value.toArray(new Object[0]);
}
}

View File

@@ -0,0 +1,35 @@
package com.unity3d.ads.adplayer.model;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nWebViewEvent.kt\nKotlin\n*S Kotlin\n*F\n+ 1 WebViewEvent.kt\ncom/unity3d/ads/adplayer/model/OnWebRequestFailed\n+ 2 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,103:1\n37#2,2:104\n*S KotlinDebug\n*F\n+ 1 WebViewEvent.kt\ncom/unity3d/ads/adplayer/model/OnWebRequestFailed\n*L\n101#1:104,2\n*E\n"})
/* loaded from: classes4.dex */
public final class OnWebRequestFailed implements WebViewEvent {
private final String category;
private final String name;
private final Object[] parameters;
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getCategory() {
return this.category;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public String getName() {
return this.name;
}
@Override // com.unity3d.ads.adplayer.model.WebViewEvent
public Object[] getParameters() {
return this.parameters;
}
public OnWebRequestFailed(List<? extends Object> value) {
Intrinsics.checkNotNullParameter(value, "value");
this.category = "REQUEST";
this.name = "FAILED";
this.parameters = value.toArray(new Object[0]);
}
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public enum ShowStatus {
COMPLETED,
SKIPPED,
ERROR
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public interface WebViewBridgeInterface {
void handleCallback(String str, String str2, String str3);
void handleInvocation(String str);
}

View File

@@ -0,0 +1,86 @@
package com.unity3d.ads.adplayer.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class WebViewClientError {
private final ErrorReason reason;
private final Integer statusCode;
private final String url;
public static /* synthetic */ WebViewClientError copy$default(WebViewClientError webViewClientError, String str, ErrorReason errorReason, Integer num, int i, Object obj) {
if ((i & 1) != 0) {
str = webViewClientError.url;
}
if ((i & 2) != 0) {
errorReason = webViewClientError.reason;
}
if ((i & 4) != 0) {
num = webViewClientError.statusCode;
}
return webViewClientError.copy(str, errorReason, num);
}
public final String component1() {
return this.url;
}
public final ErrorReason component2() {
return this.reason;
}
public final Integer component3() {
return this.statusCode;
}
public final WebViewClientError copy(String str, ErrorReason reason, Integer num) {
Intrinsics.checkNotNullParameter(reason, "reason");
return new WebViewClientError(str, reason, num);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof WebViewClientError)) {
return false;
}
WebViewClientError webViewClientError = (WebViewClientError) obj;
return Intrinsics.areEqual(this.url, webViewClientError.url) && this.reason == webViewClientError.reason && Intrinsics.areEqual(this.statusCode, webViewClientError.statusCode);
}
public final ErrorReason getReason() {
return this.reason;
}
public final Integer getStatusCode() {
return this.statusCode;
}
public final String getUrl() {
return this.url;
}
public int hashCode() {
String str = this.url;
int hashCode = (((str == null ? 0 : str.hashCode()) * 31) + this.reason.hashCode()) * 31;
Integer num = this.statusCode;
return hashCode + (num != null ? num.hashCode() : 0);
}
public String toString() {
return "WebViewClientError(url=" + this.url + ", reason=" + this.reason + ", statusCode=" + this.statusCode + ')';
}
public WebViewClientError(String str, ErrorReason reason, Integer num) {
Intrinsics.checkNotNullParameter(reason, "reason");
this.url = str;
this.reason = reason;
this.statusCode = num;
}
public /* synthetic */ WebViewClientError(String str, ErrorReason errorReason, Integer num, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str, errorReason, (i & 4) != 0 ? null : num);
}
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.ads.adplayer.model;
/* loaded from: classes4.dex */
public interface WebViewEvent {
String getCategory();
String getName();
Object[] getParameters();
}

View File

@@ -0,0 +1,33 @@
package com.unity3d.ads.core.configuration;
import com.unity3d.ads.core.data.repository.SessionRepository;
import com.unity3d.services.core.configuration.ConfigurationReader;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
/* loaded from: classes4.dex */
public final class AlternativeFlowReader {
private final ConfigurationReader configurationReader;
private final MutableStateFlow isAlternativeFlowEnabled;
private final MutableStateFlow isAlternativeFlowRead;
private final SessionRepository sessionRepository;
public AlternativeFlowReader(ConfigurationReader configurationReader, SessionRepository sessionRepository) {
Intrinsics.checkNotNullParameter(configurationReader, "configurationReader");
Intrinsics.checkNotNullParameter(sessionRepository, "sessionRepository");
this.configurationReader = configurationReader;
this.sessionRepository = sessionRepository;
Boolean bool = Boolean.FALSE;
this.isAlternativeFlowRead = StateFlowKt.MutableStateFlow(bool);
this.isAlternativeFlowEnabled = StateFlowKt.MutableStateFlow(bool);
}
public final boolean invoke() {
if (!((Boolean) this.isAlternativeFlowRead.getValue()).booleanValue()) {
this.isAlternativeFlowEnabled.setValue(Boolean.valueOf(this.configurationReader.getCurrentConfiguration().getExperiments().isBoldSdkNextSessionEnabled() || this.sessionRepository.getNativeConfiguration().getFeatureFlags().getBoldSdkNextSessionEnabled()));
this.isAlternativeFlowRead.setValue(Boolean.TRUE);
}
return ((Boolean) this.isAlternativeFlowEnabled.getValue()).booleanValue();
}
}

View File

@@ -0,0 +1,26 @@
package com.unity3d.ads.core.configuration;
import com.unity3d.services.core.misc.JsonStorage;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class GameServerIdReader extends MetadataReader<String> {
public static final Companion Companion = new Companion(null);
public static final String PLAYER_SERVER_ID_KEY = "player.server_id.value";
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public GameServerIdReader(JsonStorage jsonStorage) {
super(jsonStorage, PLAYER_SERVER_ID_KEY);
Intrinsics.checkNotNullParameter(jsonStorage, "jsonStorage");
}
}

View File

@@ -0,0 +1,53 @@
package com.unity3d.ads.core.configuration;
import com.google.android.gms.ads.RequestConfiguration;
import com.unity3d.services.core.misc.JsonStorage;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nMetadataReader.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MetadataReader.kt\ncom/unity3d/ads/core/configuration/MetadataReader\n*L\n1#1,24:1\n8#1,6:25\n*S KotlinDebug\n*F\n+ 1 MetadataReader.kt\ncom/unity3d/ads/core/configuration/MetadataReader\n*L\n17#1:25,6\n*E\n"})
/* loaded from: classes4.dex */
public abstract class MetadataReader<T> {
private final JsonStorage jsonStorage;
private final String key;
public final JsonStorage getJsonStorage() {
return this.jsonStorage;
}
public final String getKey() {
return this.key;
}
public MetadataReader(JsonStorage jsonStorage, String key) {
Intrinsics.checkNotNullParameter(jsonStorage, "jsonStorage");
Intrinsics.checkNotNullParameter(key, "key");
this.jsonStorage = jsonStorage;
this.key = key;
}
public final /* synthetic */ <T> T read(T t) {
T t2 = (T) getJsonStorage().get(getKey());
if (t2 == null) {
return t;
}
Intrinsics.reifiedOperationMarker(3, RequestConfiguration.MAX_AD_CONTENT_RATING_T);
return t2;
}
/* JADX WARN: Multi-variable type inference failed */
public final /* synthetic */ <T> T readAndDelete(T t) {
Object obj = getJsonStorage().get(getKey());
if (obj != 0) {
Intrinsics.checkNotNullExpressionValue(obj, "get(key)");
Intrinsics.reifiedOperationMarker(3, RequestConfiguration.MAX_AD_CONTENT_RATING_T);
t = obj;
}
Object obj2 = getJsonStorage().get(getKey());
if (obj2 != null) {
Intrinsics.checkNotNullExpressionValue(obj2, "get(key)");
getJsonStorage().delete(getKey());
}
return t;
}
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public interface AnalyticsDataSource {
String getUserId();
}

View File

@@ -0,0 +1,12 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.services.core.preferences.AndroidPreferences;
import com.unity3d.services.core.properties.ClientProperties;
/* loaded from: classes4.dex */
public final class AndroidAnalyticsDataSource implements AnalyticsDataSource {
@Override // com.unity3d.ads.core.data.datasource.AnalyticsDataSource
public String getUserId() {
return AndroidPreferences.getString(ClientProperties.getAppName() + ".v2.playerprefs", "unity.cloud_userid");
}
}

View File

@@ -0,0 +1,72 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.CorruptionException;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.ByteStringStoreKt;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.flow.FlowCollector;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidByteStringDataSource$get$2", f = "AndroidByteStringDataSource.kt", l = {18}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nAndroidByteStringDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidByteStringDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidByteStringDataSource$get$2\n+ 2 ByteStringStoreKt.kt\ncom/unity3d/ads/datastore/ByteStringStoreKtKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,33:1\n8#2:34\n1#3:35\n*S KotlinDebug\n*F\n+ 1 AndroidByteStringDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidByteStringDataSource$get$2\n*L\n18#1:34\n18#1:35\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidByteStringDataSource$get$2 extends SuspendLambda implements Function3 {
private /* synthetic */ Object L$0;
/* synthetic */ Object L$1;
int label;
public AndroidByteStringDataSource$get$2(Continuation continuation) {
super(3, continuation);
}
@Override // kotlin.jvm.functions.Function3
public final Object invoke(FlowCollector flowCollector, Throwable th, Continuation continuation) {
AndroidByteStringDataSource$get$2 androidByteStringDataSource$get$2 = new AndroidByteStringDataSource$get$2(continuation);
androidByteStringDataSource$get$2.L$0 = flowCollector;
androidByteStringDataSource$get$2.L$1 = th;
return androidByteStringDataSource$get$2.invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.L$0;
Throwable th = (Throwable) this.L$1;
if (th instanceof CorruptionException) {
ByteStringStoreKt.Dsl.Companion companion = ByteStringStoreKt.Dsl.Companion;
ByteStringStoreOuterClass.ByteStringStore.Builder newBuilder = ByteStringStoreOuterClass.ByteStringStore.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
ByteStringStoreKt.Dsl _create = companion._create(newBuilder);
ByteString EMPTY = ByteString.EMPTY;
Intrinsics.checkNotNullExpressionValue(EMPTY, "EMPTY");
_create.setData(EMPTY);
ByteStringStoreOuterClass.ByteStringStore _build = _create._build();
this.L$0 = null;
this.label = 1;
if (flowCollector.emit(_build, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
throw th;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,50 @@
package com.unity3d.ads.core.data.datasource;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidByteStringDataSource$set$2", f = "AndroidByteStringDataSource.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidByteStringDataSource$set$2 extends SuspendLambda implements Function2 {
final /* synthetic */ ByteString $data;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidByteStringDataSource$set$2(ByteString byteString, Continuation continuation) {
super(2, continuation);
this.$data = byteString;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
AndroidByteStringDataSource$set$2 androidByteStringDataSource$set$2 = new AndroidByteStringDataSource$set$2(this.$data, continuation);
androidByteStringDataSource$set$2.L$0 = obj;
return androidByteStringDataSource$set$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
return ((AndroidByteStringDataSource$set$2) create(byteStringStore, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
ByteStringStoreOuterClass.ByteStringStore build = ((ByteStringStoreOuterClass.ByteStringStore) this.L$0).toBuilder().setData(this.$data).build();
Intrinsics.checkNotNullExpressionValue(build, "currentData.toBuilder()\n…\n .build()");
return build;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,33 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.DataStore;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.FlowKt;
/* loaded from: classes4.dex */
public final class AndroidByteStringDataSource implements ByteStringDataSource {
private final DataStore<ByteStringStoreOuterClass.ByteStringStore> dataStore;
public AndroidByteStringDataSource(DataStore<ByteStringStoreOuterClass.ByteStringStore> dataStore) {
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
this.dataStore = dataStore;
}
@Override // com.unity3d.ads.core.data.datasource.ByteStringDataSource
public Object get(Continuation continuation) {
return FlowKt.first(FlowKt.m4143catch(this.dataStore.getData(), new AndroidByteStringDataSource$get$2(null)), continuation);
}
@Override // com.unity3d.ads.core.data.datasource.ByteStringDataSource
public Object set(ByteString byteString, Continuation continuation) {
Object coroutine_suspended;
Object updateData = this.dataStore.updateData(new AndroidByteStringDataSource$set$2(byteString, null), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return updateData == coroutine_suspended ? updateData : Unit.INSTANCE;
}
}

Some files were not shown because too many files have changed in this diff Show More