导航菜单

页面标题

页面副标题

Oolka v2.4.42 - CustomTabMainActivity.java 源代码

正在查看: Oolka v2.4.42 应用的 CustomTabMainActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.facebook;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Bundle;
import com.facebook.internal.NativeProtocol;
import com.facebook.internal.r0;
import kotlin.Metadata;
import kotlin.jvm.JvmField;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class CustomTabMainActivity extends Activity {

    @NotNull
    public static final a c = new a(null);

    @JvmField
    @NotNull
    public static final String d = CustomTabMainActivity.class.getSimpleName() + ".extra_action";

    @JvmField
    @NotNull
    public static final String e = CustomTabMainActivity.class.getSimpleName() + ".extra_params";

    @JvmField
    @NotNull
    public static final String f = CustomTabMainActivity.class.getSimpleName() + ".extra_chromePackage";

    @JvmField
    @NotNull
    public static final String g = CustomTabMainActivity.class.getSimpleName() + ".extra_url";

    @JvmField
    @NotNull
    public static final String h = CustomTabMainActivity.class.getSimpleName() + ".extra_targetApp";

    @JvmField
    @NotNull
    public static final String i = CustomTabMainActivity.class.getSimpleName() + ".action_refresh";

    @JvmField
    @NotNull
    public static final String j = CustomTabMainActivity.class.getSimpleName() + ".no_activity_exception";
    public boolean a = true;
    public BroadcastReceiver b;

    @Metadata
    public static final class a {
        public a(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final Bundle b(String str) {
            Uri parse = Uri.parse(str);
            Bundle q0 = r0.q0(parse.getQuery());
            q0.putAll(r0.q0(parse.getFragment()));
            return q0;
        }

        public a() {
        }
    }

    @Metadata
    public class b {
        public static final int[] a;

        static {
            int[] iArr = new int[com.facebook.login.v.values().length];
            try {
                iArr[com.facebook.login.v.INSTAGRAM.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            a = iArr;
        }
    }

    @Metadata
    public static final class c extends BroadcastReceiver {
        public c() {
        }

        @Override
        public void onReceive(@NotNull Context context, @NotNull Intent intent) {
            Intrinsics.checkNotNullParameter(context, "context");
            Intrinsics.checkNotNullParameter(intent, "intent");
            Intent intent2 = new Intent(CustomTabMainActivity.this, (Class<?>) CustomTabMainActivity.class);
            intent2.setAction(CustomTabMainActivity.i);
            String str = CustomTabMainActivity.g;
            intent2.putExtra(str, intent.getStringExtra(str));
            intent2.addFlags(603979776);
            CustomTabMainActivity.this.startActivity(intent2);
        }
    }

    public final void a(int i2, Intent intent) {
        BroadcastReceiver broadcastReceiver = this.b;
        if (broadcastReceiver != null) {
            androidx.localbroadcastmanager.content.a.b(this).e(broadcastReceiver);
        }
        if (intent != null) {
            String stringExtra = intent.getStringExtra(g);
            Bundle b2 = stringExtra != null ? c.b(stringExtra) : new Bundle();
            Intent intent2 = getIntent();
            Intrinsics.checkNotNullExpressionValue(intent2, "intent");
            Intent n = NativeProtocol.n(intent2, b2, null);
            if (n != null) {
                intent = n;
            }
            setResult(i2, intent);
        } else {
            Intent intent3 = getIntent();
            Intrinsics.checkNotNullExpressionValue(intent3, "intent");
            setResult(i2, NativeProtocol.n(intent3, null, null));
        }
        finish();
    }

    @Override
    public void onCreate(Bundle bundle) {
        String stringExtra;
        super.onCreate(bundle);
        String str = CustomTabActivity.c;
        if (Intrinsics.areEqual(str, getIntent().getAction())) {
            setResult(0);
            finish();
            return;
        }
        if (bundle != null || (stringExtra = getIntent().getStringExtra(d)) == null) {
            return;
        }
        Bundle bundleExtra = getIntent().getBundleExtra(e);
        boolean a2 = (b.a[com.facebook.login.v.Companion.a(getIntent().getStringExtra(h)).ordinal()] == 1 ? new com.facebook.internal.b0(stringExtra, bundleExtra) : new com.facebook.internal.d(stringExtra, bundleExtra)).a(this, getIntent().getStringExtra(f));
        this.a = false;
        if (!a2) {
            setResult(0, getIntent().putExtra(j, true));
            finish();
        } else {
            c cVar = new c();
            this.b = cVar;
            androidx.localbroadcastmanager.content.a.b(this).c(cVar, new IntentFilter(str));
        }
    }

    @Override
    public void onNewIntent(@NotNull Intent intent) {
        Intrinsics.checkNotNullParameter(intent, "intent");
        super.onNewIntent(intent);
        if (Intrinsics.areEqual(i, intent.getAction())) {
            androidx.localbroadcastmanager.content.a.b(this).d(new Intent(CustomTabActivity.d));
            a(-1, intent);
        } else if (Intrinsics.areEqual(CustomTabActivity.c, intent.getAction())) {
            a(-1, intent);
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        if (this.a) {
            a(0, null);
        }
        this.a = true;
    }
}