导航菜单

页面标题

页面副标题

Pulsar v1.0.0 - MTMainActivity.java 源代码

正在查看: Pulsar v1.0.0 应用的 MTMainActivity.java JAVA 源代码文件

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


package com.mt;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import f8.d;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.devio.rn.splashscreen.c;
import org.jetbrains.annotations.NotNull;

@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0011\n\u0000\n\u0002\u0010\u0015\n\u0002\b\b\u0018\u0000 \u001b2\u00020\u0001:\u0001\u001bB\u0007¢\u0006\u0004\b\u0019\u0010\u001aJ\b\u0010\u0003\u001a\u00020\u0002H\u0014J\u0012\u0010\u0007\u001a\u00020\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0014J\u0012\u0010\n\u001a\u00020\u00062\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0016J\b\u0010\f\u001a\u00020\u000bH\u0014J\b\u0010\r\u001a\u00020\u0006H\u0014J\b\u0010\u000e\u001a\u00020\u0006H\u0014J\b\u0010\u000f\u001a\u00020\u0006H\u0016J/\u0010\u0016\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00102\u000e\u0010\u0013\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00020\u00122\u0006\u0010\u0015\u001a\u00020\u0014H\u0016¢\u0006\u0004\b\u0016\u0010\u0017J\b\u0010\u0018\u001a\u00020\u0006H\u0014¨\u0006\u001c"}, d2 = {"Lcom/mt/MTMainActivity;", "Lcom/facebook/react/ReactActivity;", "", "getMainComponentName", "Landroid/os/Bundle;", "savedInstanceState", "", "onCreate", "Landroid/content/Intent;", "intent", "onNewIntent", "Lcom/facebook/react/ReactActivityDelegate;", "createReactActivityDelegate", "onResume", "onPause", "onBackPressed", "", "requestCode", "", "permissions", "", "grantResults", "onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "onDestroy", "<init>", "()V", "a", "app_pulsar_prodRelease"}, k = 1, mv = {1, 9, 0})
public final class MTMainActivity extends ReactActivity {

    @NotNull
    public static final Companion INSTANCE = new Companion(null);
    public static ReactActivity b;

    public static final class Companion {
        private Companion() {
        }

        @NotNull
        public final ReactActivity getMActivity() {
            ReactActivity reactActivity = MTMainActivity.b;
            if (reactActivity != null) {
                return reactActivity;
            }
            Intrinsics.throwUninitializedPropertyAccessException("mActivity");
            return null;
        }

        public final void setMActivity(@NotNull ReactActivity reactActivity) {
            Intrinsics.checkNotNullParameter(reactActivity, "<set-?>");
            MTMainActivity.b = reactActivity;
        }

        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }
    }

    @NotNull
    protected ReactActivityDelegate createReactActivityDelegate() {
        return new DefaultReactActivityDelegate(this, getMainComponentName(), DefaultNewArchitectureEntryPoint.getFabricEnabled());
    }

    @NotNull
    protected String getMainComponentName() {
        return BuildConfig.appCode;
    }

    public void onBackPressed() {
        if (getReactInstanceManager() != null) {
            getReactInstanceManager().onBackPressed();
        } else {
            super.onBackPressed();
        }
    }

    protected void onCreate(@d Bundle savedInstanceState) {
        INSTANCE.setMActivity(this);
        c.show(this);
        super.onCreate((Bundle) null);
    }

    protected void onDestroy() {
        super.onDestroy();
        if (getReactInstanceManager() != null) {
            getReactInstanceManager().onHostDestroy(this);
        }
    }

    public void onNewIntent(@d Intent intent) {
        String action;
        Bundle extras;
        Bundle extras2;
        super.onNewIntent(intent);
        String str = null;
        if (intent != null) {
            try {
                action = intent.getAction();
            } catch (Exception unused) {
                return;
            }
        } else {
            action = null;
        }
        Uri data = intent != null ? intent.getData() : null;
        Log.d("TAG", "action " + action + " data " + data);
        Companion companion = INSTANCE;
        companion.getMActivity().getIntent().getExtras();
        Intent intent2 = companion.getMActivity().getIntent();
        intent2.setAction(action);
        intent2.setData(data);
        String string = (intent == null || (extras2 = intent.getExtras()) == null) ? null : extras2.getString("bootLabel", "");
        if (intent != null && (extras = intent.getExtras()) != null) {
            str = extras.getString("mt_event", "");
        }
        companion.getMActivity().getIntent().putExtra("bootLabel", String.valueOf(string));
        companion.getMActivity().getIntent().putExtra("mt_event", String.valueOf(str));
    }

    protected void onPause() {
        super.onPause();
        if (getReactInstanceManager() != null) {
            getReactInstanceManager().onHostPause(this);
        }
    }

    public void onRequestPermissionsResult(int requestCode, @NotNull String[] permissions, @NotNull int[] grantResults) {
        Intrinsics.checkNotNullParameter(permissions, "permissions");
        Intrinsics.checkNotNullParameter(grantResults, "grantResults");
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        com.mt.tracker.a.a.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

    protected void onResume() {
        super.onResume();
        if (getReactInstanceManager() != null) {
            getReactInstanceManager().onHostResume(this, this);
        }
    }
}