正在查看: Antivirus Cleaner v1.2.0.0 应用的 FullScreenWebViewDisplay.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 FullScreenWebViewDisplay.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.unity3d.ads.adplayer;
import android.os.Bundle;
import android.view.ComponentActivity;
import android.view.KeyEvent;
import android.webkit.WebView;
import androidx.core.app.NotificationCompat;
import androidx.lifecycle.LifecycleOwnerKt;
import bf.i;
import bf.l0;
import bf.m0;
import bf.n0;
import bf.o;
import com.unity3d.ads.core.data.model.AdObject;
import com.unity3d.ads.core.data.repository.AdRepository;
import com.unity3d.ads.core.domain.SendDiagnosticEvent;
import com.unity3d.ads.core.extensions.JSONObjectExtensionsKt;
import com.unity3d.ads.core.extensions.ProtobufExtensionsKt;
import com.unity3d.services.core.di.IServiceComponent;
import com.unity3d.services.core.di.IServiceProvider;
import com.unity3d.services.core.domain.ISDKDispatchers;
import ef.b0;
import ef.f;
import ef.g;
import ef.h;
import java.util.Map;
import java.util.UUID;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.DebugProbesKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import org.json.JSONObject;
@Metadata(d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010$\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\u0005¢\u0006\u0002\u0010\u0003J\u0011\u0010\u0019\u001a\u00020\u001aH\u0082@ø\u0001\u0000¢\u0006\u0002\u0010\u001bJ\u0010\u0010\u001c\u001a\u00020\u001a2\u0006\u0010\u001d\u001a\u00020\u001eH\u0002J\u0012\u0010\u001f\u001a\u00020\u001a2\b\u0010 \u001a\u0004\u0018\u00010!H\u0014J\b\u0010\"\u001a\u00020\u001aH\u0014J\u001a\u0010#\u001a\u00020$2\u0006\u0010%\u001a\u00020&2\b\u0010'\u001a\u0004\u0018\u00010(H\u0016J\b\u0010)\u001a\u00020\u001aH\u0014J\b\u0010*\u001a\u00020\u001aH\u0014J\u0010\u0010+\u001a\u00020\u001a2\u0006\u0010,\u001a\u00020$H\u0016R\u001d\u0010\u0004\u001a\u0004\u0018\u00010\u00058BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\b\u0010\t\u001a\u0004\b\u0006\u0010\u0007R\u001b\u0010\n\u001a\u00020\u000b8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000e\u0010\t\u001a\u0004\b\f\u0010\rR\u000e\u0010\u000f\u001a\u00020\u0010X\u0082\u000e¢\u0006\u0002\n\u0000R\u001b\u0010\u0011\u001a\u00020\u00128BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0015\u0010\t\u001a\u0004\b\u0013\u0010\u0014R\u001e\u0010\u0016\u001a\u0012\u0012\u0004\u0012\u00020\u0010\u0012\u0006\u0012\u0004\u0018\u00010\u0018\u0018\u00010\u0017X\u0082\u000e¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006-²\u0006\n\u0010.\u001a\u00020/X\u008a\u0084\u0002"}, d2 = {"Lcom/unity3d/ads/adplayer/FullScreenWebViewDisplay;", "Landroidx/activity/ComponentActivity;", "Lcom/unity3d/services/core/di/IServiceComponent;", "()V", "adObject", "Lcom/unity3d/ads/core/data/model/AdObject;", "getAdObject", "()Lcom/unity3d/ads/core/data/model/AdObject;", "adObject$delegate", "Lkotlin/Lazy;", "dispatchers", "Lcom/unity3d/services/core/domain/ISDKDispatchers;", "getDispatchers", "()Lcom/unity3d/services/core/domain/ISDKDispatchers;", "dispatchers$delegate", "opportunityId", "", "sendDiagnosticEvent", "Lcom/unity3d/ads/core/domain/SendDiagnosticEvent;", "getSendDiagnosticEvent", "()Lcom/unity3d/ads/core/domain/SendDiagnosticEvent;", "sendDiagnosticEvent$delegate", "showOptions", "", "", "listenToAdPlayerEvents", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "loadWebView", "webView", "Landroid/webkit/WebView;", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onDestroy", "onKeyDown", "", "keyCode", "", NotificationCompat.CATEGORY_EVENT, "Landroid/view/KeyEvent;", "onPause", "onResume", "onWindowFocusChanged", "hasFocus", "unity-ads_release", "adRepository", "Lcom/unity3d/ads/core/data/repository/AdRepository;"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class FullScreenWebViewDisplay extends ComponentActivity implements IServiceComponent {
private final Lazy adObject;
private final Lazy dispatchers;
private String opportunityId = "";
private final Lazy sendDiagnosticEvent;
private Map<String, ? extends Object> showOptions;
public FullScreenWebViewDisplay() {
final String str = "";
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.NONE;
this.sendDiagnosticEvent = LazyKt.lazy(lazyThreadSafetyMode, new Function0<SendDiagnosticEvent>() {
{
super(0);
}
public final SendDiagnosticEvent invoke() {
IServiceComponent iServiceComponent = this;
return iServiceComponent.getServiceProvider().getRegistry().getService(str, Reflection.getOrCreateKotlinClass(SendDiagnosticEvent.class));
}
});
this.adObject = LazyKt.lazy(new Function0<AdObject>() {
{
super(0);
}
private static final AdRepository invoke$lambda$0(Lazy<? extends AdRepository> lazy) {
return (AdRepository) lazy.getValue();
}
public final AdObject m21invoke() {
Object obj;
String str2;
final FullScreenWebViewDisplay fullScreenWebViewDisplay = FullScreenWebViewDisplay.this;
final String str3 = "";
Lazy lazy = LazyKt.lazy(LazyThreadSafetyMode.NONE, new Function0<AdRepository>() {
{
super(0);
}
public final AdRepository invoke() {
IServiceComponent iServiceComponent = fullScreenWebViewDisplay;
return iServiceComponent.getServiceProvider().getRegistry().getService(str3, Reflection.getOrCreateKotlinClass(AdRepository.class));
}
});
FullScreenWebViewDisplay fullScreenWebViewDisplay2 = FullScreenWebViewDisplay.this;
try {
Result.Companion companion = Result.Companion;
AdRepository invoke$lambda$0 = invoke$lambda$0(lazy);
str2 = fullScreenWebViewDisplay2.opportunityId;
UUID fromString = UUID.fromString(str2);
Intrinsics.checkNotNullExpressionValue(fromString, "fromString(opportunityId)");
obj = Result.constructor-impl(invoke$lambda$0.getAd(ProtobufExtensionsKt.toByteString(fromString)));
} catch (Throwable th) {
Result.Companion companion2 = Result.Companion;
obj = Result.constructor-impl(ResultKt.createFailure(th));
}
if (Result.isFailure-impl(obj)) {
obj = null;
}
return (AdObject) obj;
}
});
this.dispatchers = LazyKt.lazy(lazyThreadSafetyMode, new Function0<ISDKDispatchers>() {
{
super(0);
}
public final ISDKDispatchers invoke() {
IServiceComponent iServiceComponent = this;
return iServiceComponent.getServiceProvider().getRegistry().getService(str, Reflection.getOrCreateKotlinClass(ISDKDispatchers.class));
}
});
}
public final AdObject getAdObject() {
return (AdObject) this.adObject.getValue();
}
public final ISDKDispatchers getDispatchers() {
return (ISDKDispatchers) this.dispatchers.getValue();
}
public final SendDiagnosticEvent getSendDiagnosticEvent() {
return (SendDiagnosticEvent) this.sendDiagnosticEvent.getValue();
}
public final Object listenToAdPlayerEvents(Continuation<? super Unit> continuation) {
o oVar = new o(IntrinsicsKt.intercepted(continuation), 1);
oVar.F();
final b0 E = h.E(AndroidFullscreenWebViewAdPlayer.INSTANCE.getDisplayMessages(), new FullScreenWebViewDisplay$listenToAdPlayerEvents$2$1(this, oVar, null));
h.z(h.C(new f<DisplayMessage>() {
@Metadata(d1 = {"\u0000\f\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\u0006\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u0000\"\u0004\b\u0001\u0010\u00012\u0006\u0010\u0002\u001a\u00028\u0000H\u008a@¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"T", "R", "value", "", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 8, 0})
public static final class AnonymousClass2<T> implements g {
final g $this_unsafeFlow;
final FullScreenWebViewDisplay this$0;
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$lambda$5$$inlined$filter$1$2", f = "FullScreenWebViewDisplay.kt", i = {}, l = {223}, m = "emit", n = {}, s = {})
public static final class AnonymousClass1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
Object result;
public AnonymousClass1(Continuation continuation) {
super(continuation);
}
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return AnonymousClass2.this.emit(null, this);
}
}
public AnonymousClass2(g gVar, FullScreenWebViewDisplay fullScreenWebViewDisplay) {
this.$this_unsafeFlow = gVar;
this.this$0 = fullScreenWebViewDisplay;
}
public final java.lang.Object emit(java.lang.Object r6, kotlin.coroutines.Continuation r7) {
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.adplayer.FullScreenWebViewDisplay$listenToAdPlayerEvents$lambda$5$$inlined$filter$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
public Object collect(g gVar, Continuation continuation2) {
Object collect = E.collect(new AnonymousClass2(gVar, this), continuation2);
return collect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? collect : Unit.INSTANCE;
}
}, new FullScreenWebViewDisplay$listenToAdPlayerEvents$2$3(this, null)), LifecycleOwnerKt.getLifecycleScope(this));
Object x3 = oVar.x();
if (x3 == IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
DebugProbesKt.probeCoroutineSuspended(continuation);
}
return x3 == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? x3 : Unit.INSTANCE;
}
public final void loadWebView(WebView webView) {
i.d(m0.a(getDispatchers().getMain()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$loadWebView$1(webView, this, null), 3, (Object) null);
}
public IServiceProvider getServiceProvider() {
return IServiceComponent.DefaultImpls.getServiceProvider(this);
}
@Override
public void onCreate(Bundle savedInstanceState) {
l0 scope;
Object obj;
Map<String, ? extends Object> map;
super.onCreate(savedInstanceState);
String stringExtra = getIntent().getStringExtra("opportunityId");
if (stringExtra == null) {
stringExtra = "not_provided";
}
this.opportunityId = stringExtra;
SendDiagnosticEvent.DefaultImpls.invoke$default(getSendDiagnosticEvent(), "native_show_ad_viewer_fullscreen_intent_creation_starts", (Double) null, MapsKt.mapOf(TuplesKt.to("intentOpportunityId", this.opportunityId)), (Map) null, getAdObject(), (Integer) null, 42, (Object) null);
if (Intrinsics.areEqual(this.opportunityId, "not_provided")) {
setResult(0);
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onCreate$1(this, null), 3, (Object) null);
SendDiagnosticEvent.DefaultImpls.invoke$default(getSendDiagnosticEvent(), "native_show_ad_viewer_fullscreen_intent_creation_fails", (Double) null, MapsKt.mapOf(TuplesKt.to("reason_debug", "no_opportunity_id")), (Map) null, (AdObject) null, (Integer) null, 58, (Object) null);
finish();
return;
}
AdObject adObject = getAdObject();
AdPlayer adPlayer = adObject != null ? adObject.getAdPlayer() : null;
if (adPlayer == null || (scope = adPlayer.getScope()) == null || !m0.i(scope)) {
setResult(0);
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onCreate$2(this, null), 3, (Object) null);
finish();
SendDiagnosticEvent.DefaultImpls.invoke$default(getSendDiagnosticEvent(), "native_show_ad_viewer_fullscreen_intent_creation_fails", (Double) null, MapsKt.mapOf(TuplesKt.to("reason_debug", "ad_player_scope_not_active")), (Map) null, (AdObject) null, (Integer) null, 58, (Object) null);
return;
}
boolean hasExtra = getIntent().hasExtra("orientation");
Boolean valueOf = Boolean.valueOf(hasExtra);
if (!hasExtra) {
valueOf = null;
}
if (valueOf != null) {
setRequestedOrientation(getIntent().getIntExtra("orientation", -1));
}
String stringExtra2 = getIntent().getStringExtra("showOptions");
if (stringExtra2 != null) {
try {
Result.Companion companion = Result.Companion;
obj = Result.constructor-impl(JSONObjectExtensionsKt.toBuiltInMap(new JSONObject(stringExtra2)));
} catch (Throwable th) {
Result.Companion companion2 = Result.Companion;
obj = Result.constructor-impl(ResultKt.createFailure(th));
}
if (Result.isFailure-impl(obj)) {
obj = null;
}
map = (Map) obj;
} else {
map = null;
}
this.showOptions = map;
i.d(LifecycleOwnerKt.getLifecycleScope(this), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onCreate$6(this, null), 3, (Object) null);
}
@Override
public void onDestroy() {
SendDiagnosticEvent.DefaultImpls.invoke$default(getSendDiagnosticEvent(), "native_show_ad_viewer_fullscreen_intent_destroyed", (Double) null, (Map) null, (Map) null, getAdObject(), (Integer) null, 46, (Object) null);
if (isFinishing()) {
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onDestroy$1(this, null), 3, (Object) null);
SendDiagnosticEvent.DefaultImpls.invoke$default(getSendDiagnosticEvent(), "native_show_ad_viewer_fullscreen_intent_finishing_on_destroy", (Double) null, (Map) null, (Map) null, getAdObject(), (Integer) null, 46, (Object) null);
}
super.onDestroy();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
return keyCode == 4;
}
@Override
public void onPause() {
super.onPause();
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onPause$1(this, null), 3, (Object) null);
if (isFinishing()) {
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onPause$2(this, null), 3, (Object) null);
SendDiagnosticEvent.DefaultImpls.invoke$default(getSendDiagnosticEvent(), "native_show_ad_viewer_fullscreen_intent_finishing_on_pause", (Double) null, (Map) null, (Map) null, getAdObject(), (Integer) null, 46, (Object) null);
}
}
@Override
public void onResume() {
super.onResume();
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onResume$1(this, null), 3, (Object) null);
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
i.d(m0.a(getDispatchers().getDefault()), (CoroutineContext) null, (n0) null, new FullScreenWebViewDisplay$onWindowFocusChanged$1(this, hasFocus, null), 3, (Object) null);
}
}