正在查看: Empower MX v1.29.4.340 应用的 LinkForegroundActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Empower MX v1.29.4.340 应用的 LinkForegroundActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.link;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.appcompat.app.c;
import androidx.browser.customtabs.c;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u0006\b\u0000\u0018\u0000 \u00162\u00020\u0001:\u0001\u0017B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0017\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0007\u0010\bJ\u000f\u0010\t\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\t\u0010\u0003J\u0019\u0010\f\u001a\u00020\u00062\b\u0010\u000b\u001a\u0004\u0018\u00010\nH\u0016¢\u0006\u0004\b\f\u0010\rJ\u0017\u0010\u000f\u001a\u00020\u00062\u0006\u0010\u000e\u001a\u00020\nH\u0014¢\u0006\u0004\b\u000f\u0010\rJ\u0017\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0016¢\u0006\u0004\b\u0010\u0010\bJ\u000f\u0010\u0011\u001a\u00020\u0006H\u0014¢\u0006\u0004\b\u0011\u0010\u0003R\u0016\u0010\u0015\u001a\u00020\u00128\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0013\u0010\u0014¨\u0006\u0018"}, d2 = {"Lcom/stripe/android/link/LinkForegroundActivity;", "Landroidx/appcompat/app/c;", "<init>", "()V", "Landroid/content/Intent;", "intent", "", "w1", "(Landroid/content/Intent;)V", "x1", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "outState", "onSaveInstanceState", "onNewIntent", "onResume", "", "b0", "Z", "hasLaunchedPopup", "c0", "a", "link_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class LinkForegroundActivity extends c {
public static final Companion INSTANCE = new Companion(null);
public static final int d0 = 8;
private boolean hasLaunchedPopup;
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final Intent a(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "popupUrl");
Intent putExtra = new Intent(context, (Class<?>) LinkForegroundActivity.class).putExtra("LinkPopupUrl", str);
Intrinsics.checkNotNullExpressionValue(putExtra, "putExtra(...)");
return putExtra;
}
public final Intent b(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intent intent = new Intent(context, (Class<?>) LinkForegroundActivity.class);
intent.setAction("LinkForegroundActivity.redirect");
intent.setData(uri);
intent.addFlags(603979776);
return intent;
}
private Companion() {
}
}
private final void w1(Intent intent) {
if (Intrinsics.d(intent.getAction(), "LinkForegroundActivity.redirect")) {
setResult(49871, intent);
finish();
}
}
private final void x1() {
String string;
this.hasLaunchedPopup = true;
Bundle extras = getIntent().getExtras();
Uri parse = (extras == null || (string = extras.getString("LinkPopupUrl")) == null) ? null : Uri.parse(string);
if (parse == null) {
setResult(0);
finish();
return;
}
try {
new c.d().f(2).a().a(this, parse);
} catch (ActivityNotFoundException e) {
setResult(91367, new Intent().putExtra("LinkFailure", e));
finish();
}
}
public void onCreate(Bundle savedInstanceState) {
super/*androidx.fragment.app.i*/.onCreate(savedInstanceState);
this.hasLaunchedPopup = savedInstanceState != null ? savedInstanceState.getBoolean("LinkHasLaunchedPopup") : false;
Intent intent = getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "getIntent(...)");
w1(intent);
}
public void onNewIntent(Intent intent) {
Intrinsics.checkNotNullParameter(intent, "intent");
super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
w1(intent);
}
protected void onResume() {
super/*androidx.fragment.app.i*/.onResume();
if (isFinishing()) {
return;
}
if (!this.hasLaunchedPopup) {
x1();
} else {
setResult(0);
finish();
}
}
protected void onSaveInstanceState(Bundle outState) {
Intrinsics.checkNotNullParameter(outState, "outState");
super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(outState);
outState.putBoolean("LinkHasLaunchedPopup", this.hasLaunchedPopup);
}
}