正在查看: CallApp v2.226 应用的 MobileFuseSplashAdActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 MobileFuseSplashAdActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mobilefuse.sdk.ad.rendering.splashad;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import com.mobilefuse.sdk.StabilityHelper;
import com.mobilefuse.sdk.ad.view.CloseButton;
import com.mobilefuse.sdk.concurrency.SchedulersKt;
import com.mobilefuse.sdk.exception.Either;
import com.mobilefuse.sdk.exception.ErrorResult;
import com.mobilefuse.sdk.exception.ExceptionHandlingStrategy;
import com.mobilefuse.sdk.exception.SuccessResult;
import com.mobilefuse.sdk.mraid.R;
import com.mobilefuse.sdk.omid.OmidBridge;
import com.mobilefuse.sdk.omid.OmidFriendlyObstructionPurpose;
import com.mobilefuse.sdk.vast.VastAdRenderer;
import java.lang.ref.WeakReference;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import q1.b;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0018\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u000eH\u0002J\b\u0010\u000f\u001a\u00020\nH\u0002J\b\u0010\u0010\u001a\u00020\nH\u0002J\b\u0010\u0011\u001a\u00020\nH\u0002J\b\u0010\u0012\u001a\u00020\nH\u0016J\u0012\u0010\u0013\u001a\u00020\n2\b\u0010\u0014\u001a\u0004\u0018\u00010\u0015H\u0014J\b\u0010\u0016\u001a\u00020\nH\u0002J\b\u0010\u0017\u001a\u00020\nH\u0002R\u0010\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\bX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0018"}, d2 = {"Lcom/mobilefuse/sdk/ad/rendering/splashad/MobileFuseSplashAdActivity;", "Landroid/app/Activity;", "()V", "closeBtn", "Lcom/mobilefuse/sdk/ad/view/CloseButton;", "splashAdController", "Lcom/mobilefuse/sdk/ad/rendering/splashad/SplashAdController;", "webView", "Landroid/webkit/WebView;", "addCloseButton", "", "isTransparent", "", "container", "Landroid/widget/RelativeLayout;", "addWebView", "animateAdClose", "closeActivity", "onBackPressed", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "requestToClose", "updateCloseBtnAsOmidFriendlyObstruction", "mobilefuse-sdk-mraid_release"}, k = 1, mv = {1, 4, 3})
public final class MobileFuseSplashAdActivity extends Activity {
private CloseButton closeBtn;
private SplashAdController splashAdController;
private WebView webView;
public final void addCloseButton(boolean isTransparent, RelativeLayout container) {
Either errorResult;
ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.LogAndIgnore;
try {
CloseButton closeButton = new CloseButton(this, 0, 0, MobileFuseSplashAdActivity$addCloseButton$1$closeBtn$1.INSTANCE, new MobileFuseSplashAdActivity$addCloseButton$$inlined$gracefullyHandleException$lambda$1(this, isTransparent, container), null, null, 102, null);
this.closeBtn = closeButton;
closeButton.setTransparent(isTransparent);
closeButton.setOnVisibilityChange(new MobileFuseSplashAdActivity$addCloseButton$$inlined$gracefullyHandleException$lambda$2(this, isTransparent, container));
closeButton.show();
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(closeButton.getInteractionSizePx(), closeButton.getInteractionSizePx());
layoutParams.alignWithParent = true;
layoutParams.addRule(11);
layoutParams.addRule(10);
container.addView(closeButton, layoutParams);
errorResult = new SuccessResult(Unit.a);
} catch (Throwable th) {
if (MobileFuseSplashAdActivity$addCloseButton$$inlined$gracefullyHandleException$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$1[exceptionHandlingStrategy.ordinal()] == 1) {
StabilityHelper.logException("[Automatically caught]", th);
}
errorResult = new ErrorResult(th);
}
if (errorResult instanceof ErrorResult) {
ExceptionHandlingStrategy exceptionHandlingStrategy2 = ExceptionHandlingStrategy.LogAndIgnore;
try {
requestToClose();
} catch (Throwable th2) {
int i = MobileFuseSplashAdActivity$$special$$inlined$handleExceptions$2$wm$TryKt$WhenMappings.$EnumSwitchMapping$0[exceptionHandlingStrategy2.ordinal()];
if (i == 1) {
StabilityHelper.logException("[Automatically caught]", th2);
} else if (i != 2) {
throw new NoWhenBranchMatchedException();
}
}
}
}
private final void addWebView() {
Either errorResult;
WeakReference<SplashAdController> currentFullscreenController$mobilefuse_sdk_mraid_release;
final SplashAdController splashAdController;
ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.LogAndIgnore;
try {
currentFullscreenController$mobilefuse_sdk_mraid_release = SplashAdController.INSTANCE.getCurrentFullscreenController$mobilefuse_sdk_mraid_release();
} catch (Throwable th) {
if (MobileFuseSplashAdActivity$addWebView$$inlined$gracefullyHandleException$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$1[exceptionHandlingStrategy.ordinal()] == 1) {
StabilityHelper.logException("[Automatically caught]", th);
}
errorResult = new ErrorResult(th);
}
if (currentFullscreenController$mobilefuse_sdk_mraid_release == null || (splashAdController = currentFullscreenController$mobilefuse_sdk_mraid_release.get()) == null) {
finish();
return;
}
this.splashAdController = splashAdController;
Intrinsics.checkNotNullExpressionValue(splashAdController, "SplashAdController.curre… return\n }");
splashAdController.onWebViewExpanded(new MobileFuseSplashAdActivity$addWebView$$inlined$gracefullyHandleException$lambda$1(this));
final RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.mainContainer);
WebView webView = splashAdController.getWebView();
this.webView = webView;
ViewParent parent = webView.getParent();
if (parent == null) {
throw new NullPointerException("null cannot be cast to non-null type android.view.ViewGroup");
}
((ViewGroup) parent).removeView(webView);
Intrinsics.checkNotNullExpressionValue(relativeLayout, "mainContainer");
relativeLayout.setVisibility(4);
relativeLayout.addView(webView);
errorResult = new SuccessResult(Boolean.valueOf(SchedulersKt.getGlobalHandler().postDelayed(new Runnable() {
@Override
public final void run() {
RelativeLayout relativeLayout2 = relativeLayout;
Intrinsics.checkNotNullExpressionValue(relativeLayout2, "mainContainer");
relativeLayout2.setVisibility(0);
MobileFuseSplashAdActivity mobileFuseSplashAdActivity = this;
boolean isExpandedCloseBtnTransparent = splashAdController.getIsExpandedCloseBtnTransparent();
RelativeLayout relativeLayout3 = relativeLayout;
Intrinsics.checkNotNullExpressionValue(relativeLayout3, "mainContainer");
mobileFuseSplashAdActivity.addCloseButton(isExpandedCloseBtnTransparent, relativeLayout3);
}
}, 200L)));
if (errorResult instanceof ErrorResult) {
ExceptionHandlingStrategy exceptionHandlingStrategy2 = ExceptionHandlingStrategy.LogAndIgnore;
try {
requestToClose();
} catch (Throwable th2) {
int i = MobileFuseSplashAdActivity$$special$$inlined$handleExceptions$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$0[exceptionHandlingStrategy2.ordinal()];
if (i == 1) {
StabilityHelper.logException("[Automatically caught]", th2);
} else if (i != 2) {
throw new NoWhenBranchMatchedException();
}
}
}
}
public final void animateAdClose() {
Either errorResult;
final WebView webView;
ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.LogAndIgnore;
try {
webView = this.webView;
} catch (Throwable th) {
if (MobileFuseSplashAdActivity$animateAdClose$$inlined$gracefullyHandleException$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$1[exceptionHandlingStrategy.ordinal()] == 1) {
StabilityHelper.logException("[Automatically caught]", th);
}
errorResult = new ErrorResult(th);
}
if (webView == null) {
closeActivity();
return;
}
final float x = webView.getX();
final float f = (-webView.getWidth()) - x;
final ValueAnimator duration = ValueAnimator.ofFloat(VastAdRenderer.DEFAULT_END_CARD_CLOSE_SECONDS, 1.0f).setDuration(500L);
Intrinsics.checkNotNullExpressionValue(duration, "ValueAnimator.ofFloat(0f, 1f).setDuration(500)");
duration.setInterpolator(new b());
duration.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public final void onAnimationUpdate(@NotNull ValueAnimator valueAnimator) {
Intrinsics.checkNotNullParameter(valueAnimator, "it");
WebView webView2 = webView;
float f2 = x;
float f3 = f;
Object animatedValue = duration.getAnimatedValue();
if (animatedValue == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Float");
}
webView2.setX((((Float) animatedValue).floatValue() * f3) + f2);
}
});
duration.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationCancel(@NotNull Animator animation) {
Intrinsics.checkNotNullParameter(animation, "animation");
}
@Override
public void onAnimationEnd(@NotNull Animator animation) {
Intrinsics.checkNotNullParameter(animation, "animation");
MobileFuseSplashAdActivity.this.closeActivity();
}
@Override
public void onAnimationRepeat(@NotNull Animator animation) {
Intrinsics.checkNotNullParameter(animation, "animation");
}
@Override
public void onAnimationStart(@NotNull Animator animation) {
Intrinsics.checkNotNullParameter(animation, "animation");
}
});
duration.start();
errorResult = new SuccessResult(Unit.a);
if (errorResult instanceof ErrorResult) {
closeActivity();
}
}
public final void closeActivity() {
ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.LogAndIgnore;
try {
SplashAdController splashAdController = this.splashAdController;
if (splashAdController != null) {
splashAdController.onExpandActivityClosed();
}
CloseButton closeButton = this.closeBtn;
if (closeButton != null) {
closeButton.destroy();
}
finish();
} catch (Throwable th) {
int i = MobileFuseSplashAdActivity$closeActivity$$inlined$handleExceptions$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$0[exceptionHandlingStrategy.ordinal()];
if (i == 1) {
StabilityHelper.logException("[Automatically caught]", th);
} else if (i != 2) {
throw new NoWhenBranchMatchedException();
}
}
}
public final void requestToClose() {
SplashAdController splashAdController = this.splashAdController;
if (splashAdController != null) {
splashAdController.onCloseRequestedFromExpandActivity();
} else {
closeActivity();
}
}
public final void updateCloseBtnAsOmidFriendlyObstruction() {
OmidBridge omidBridge;
CloseButton closeButton;
ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.LogAndIgnore;
try {
SplashAdController splashAdController = this.splashAdController;
if (splashAdController != null && (omidBridge = splashAdController.getOmidBridge()) != null && (closeButton = this.closeBtn) != null) {
omidBridge.removeFriendlyObstruction(closeButton);
if (closeButton.isVisible()) {
omidBridge.addFriendlyObstruction(closeButton, OmidFriendlyObstructionPurpose.CLOSE_AD, null);
}
}
} catch (Throwable th) {
int i = MobileFuseSplashAdActivity$updateCloseBtnAsOmidFriendlyObstruction$$inlined$handleExceptions$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$0[exceptionHandlingStrategy.ordinal()];
if (i == 1) {
StabilityHelper.logException("[Automatically caught]", th);
} else if (i != 2) {
throw new NoWhenBranchMatchedException();
}
}
}
@Override
public void onBackPressed() {
ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.LogAndIgnore;
try {
requestToClose();
} catch (Throwable th) {
int i = MobileFuseSplashAdActivity$onBackPressed$$inlined$handleExceptions$1$wm$TryKt$WhenMappings.$EnumSwitchMapping$0[exceptionHandlingStrategy.ordinal()];
if (i == 1) {
StabilityHelper.logException("[Automatically caught]", th);
} else if (i != 2) {
throw new NoWhenBranchMatchedException();
}
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mobilefuse_splash_ad_fullscreen);
addWebView();
}
}