导航菜单

页面标题

页面副标题

Housing v14.7.8 - PushTracker.java 源代码

正在查看: Housing v14.7.8 应用的 PushTracker.java JAVA 源代码文件

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


package com.moengage.pushbase.activities;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Keep;
import androidx.fragment.app.u;
import com.moengage.core.MoEConstants;
import com.moengage.core.exceptions.SdkNotInitializedException;
import com.moengage.core.internal.CoreInternalHelper;
import com.moengage.core.internal.data.reports.ReportSyncTriggerPoint;
import com.moengage.core.internal.global.IntentProcessorKt;
import com.moengage.core.internal.logger.Logger;
import com.moengage.core.internal.model.SdkInstance;
import com.moengage.pushbase.internal.PushHelper;
import com.moengage.pushbase.internal.action.ClickHandler;
import com.newrelic.agent.android.api.v2.TraceFieldInterface;
import com.newrelic.agent.android.background.ApplicationStateMonitor;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.tracing.Trace;
import com.newrelic.agent.android.tracing.TraceMachine;
import kotlin.Metadata;
import kotlin.jvm.internal.r;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Keep
@Metadata(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\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0019\u0010\u0007\u001a\u00020\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0014¢\u0006\u0004\b\u0007\u0010\bR\u0014\u0010\n\u001a\u00020\t8\u0002X\u0082D¢\u0006\u0006\n\u0004\b\n\u0010\u000b¨\u0006\f"}, d2 = {"Lcom/moengage/pushbase/activities/PushTracker;", "Landroidx/fragment/app/u;", "<init>", "()V", "Landroid/os/Bundle;", "savedInstanceState", "Lzp/j0;", "onCreate", "(Landroid/os/Bundle;)V", "", "tag", "Ljava/lang/String;", "pushbase_defaultRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
@Instrumented
public final class PushTracker extends u implements TraceFieldInterface {
    public Trace _nr_trace;

    @NotNull
    private final String tag = "PushBase_8.3.1_PushTracker";

    public void onCreate(@Nullable Bundle savedInstanceState) {
        Intent intent;
        TraceMachine.startTracing("PushTracker");
        try {
            TraceMachine.enterMethod(this._nr_trace, "PushTracker#onCreate", null);
        } catch (NoSuchFieldError unused) {
            TraceMachine.enterMethod(null, "PushTracker#onCreate", null);
        }
        try {
            super.onCreate(savedInstanceState);
            Logger.Companion.print$default(Logger.INSTANCE, 0, null, null, new PushTracker$onCreate$1(this), 7, null);
            intent = getIntent();
        } catch (Throwable th) {
            Logger.Companion.print$default(Logger.INSTANCE, 1, th, null, new PushTracker$onCreate$3(this), 4, null);
        }
        if (intent == null) {
            IllegalStateException illegalStateException = new IllegalStateException("Intent cannot be null");
            TraceMachine.exitMethod();
            throw illegalStateException;
        }
        Bundle extras = intent.getExtras();
        if (extras == null) {
            IllegalStateException illegalStateException2 = new IllegalStateException("Intent extras cannot be empty");
            TraceMachine.exitMethod();
            throw illegalStateException2;
        }
        IntentProcessorKt.notifyPreProcessListenerIfRequired(extras);
        SdkInstance sdkInstanceForPayload = PushHelper.INSTANCE.getInstance().getSdkInstanceForPayload(extras);
        if (sdkInstanceForPayload == null) {
            SdkNotInitializedException sdkNotInitializedException = new SdkNotInitializedException("Instance not initialised.");
            TraceMachine.exitMethod();
            throw sdkNotInitializedException;
        }
        boolean containsKey = extras.containsKey(MoEConstants.PUSH_NOTIFICATION_NAVIGATION_DEEPLINK_LEGACY);
        ClickHandler clickHandler = new ClickHandler(sdkInstanceForPayload);
        clickHandler.postClickProcessing(this);
        Context applicationContext = getApplicationContext();
        r.j(applicationContext, "getApplicationContext(...)");
        clickHandler.showTestInAppIfRequired(applicationContext, extras);
        clickHandler.onClick(this, extras);
        if (containsKey) {
            CoreInternalHelper coreInternalHelper = CoreInternalHelper.INSTANCE;
            Context applicationContext2 = getApplicationContext();
            r.j(applicationContext2, "getApplicationContext(...)");
            coreInternalHelper.syncTrackedData(applicationContext2, sdkInstanceForPayload, ReportSyncTriggerPoint.PUSH_NOTIFICATION_DEEPLINK);
        }
        finish();
        Logger.log$default(sdkInstanceForPayload.logger, 0, null, null, new PushTracker$onCreate$2(this), 7, null);
        finish();
        TraceMachine.exitMethod();
    }

    public void onStart() {
        super.onStart();
        ApplicationStateMonitor.getInstance().activityStarted();
    }

    public void onStop() {
        super.onStop();
        ApplicationStateMonitor.getInstance().activityStopped();
    }
}