导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - PushClickDialogTracker.java 源代码

正在查看: bbinstant v6.24.0 应用的 PushClickDialogTracker.java JAVA 源代码文件

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


package com.moengage.pushbase.activities;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Keep;
import androidx.fragment.app.FragmentActivity;
import com.google.android.material.l;
import com.moengage.core.exceptions.SdkNotInitializedException;
import com.moengage.core.internal.global.d;
import com.moengage.core.internal.logger.f;
import com.moengage.core.internal.model.a0;
import com.moengage.core.internal.utils.MoEUtils;
import com.moengage.pushbase.internal.MoEPushReceiver;
import com.moengage.pushbase.internal.PushHelper;
import com.moengage.pushbase.internal.fragments.DatePickerFragment;
import com.moengage.pushbase.internal.fragments.TimePickerFragment;
import com.moengage.pushbase.internal.listener.a;
import com.moengage.pushbase.internal.listener.b;
import com.moengage.pushbase.internal.listener.c;
import java.util.Calendar;
import kotlin.jvm.internal.v;

@Keep
public final class PushClickDialogTracker extends FragmentActivity implements a, c, b {
    private int day;
    private Bundle extras;
    private int month;
    private final String tag = "PushBase_6.8.1_PushClickDialogTracker";
    private int year;

    protected void onCreate(Bundle bundle) {
        try {
            super.onCreate(bundle);
            f.a.print$default(f.Companion, 0, null, new PushClickDialogTracker$onCreate$1(this), 3, null);
            Intent intent = getIntent();
            if (intent == null) {
                throw new IllegalStateException("Intent cannot be null");
            }
            Bundle extras = intent.getExtras();
            if (extras == null) {
                throw new IllegalStateException("Intent extras cannot be empty");
            }
            this.extras = extras;
            d.notifyPreProcessListenerIfRequired(extras);
            PushHelper aVar = PushHelper.Companion.getInstance();
            Bundle bundle2 = this.extras;
            Bundle bundle3 = null;
            if (bundle2 == null) {
                v.throwUninitializedPropertyAccessException("extras");
                bundle2 = null;
            }
            a0 sdkInstanceForPayload = aVar.getSdkInstanceForPayload(bundle2);
            if (sdkInstanceForPayload == null) {
                throw new SdkNotInitializedException("Instance not initialised.");
            }
            com.moengage.pushbase.internal.action.b bVar = new com.moengage.pushbase.internal.action.b(sdkInstanceForPayload);
            bVar.postClickProcessing(this);
            Bundle bundle4 = this.extras;
            if (bundle4 == null) {
                v.throwUninitializedPropertyAccessException("extras");
                bundle4 = null;
            }
            bundle4.putBoolean("moe_re_notify", true);
            Bundle bundle5 = this.extras;
            if (bundle5 == null) {
                v.throwUninitializedPropertyAccessException("extras");
                bundle5 = null;
            }
            bundle5.putString("moe_n_r_s", "moe_source_r_l_s");
            Bundle bundle6 = this.extras;
            if (bundle6 == null) {
                v.throwUninitializedPropertyAccessException("extras");
                bundle6 = null;
            }
            if (!bundle6.containsKey("moe_action")) {
                finish();
            }
            Bundle bundle7 = this.extras;
            if (bundle7 == null) {
                v.throwUninitializedPropertyAccessException("extras");
            } else {
                bundle3 = bundle7;
            }
            bVar.onClick(this, bundle3);
        } catch (Exception e2) {
            f.Companion.print(1, e2, new PushClickDialogTracker$onCreate$2(this));
            finish();
        }
    }

    @Override
    public void onDateDialogCancelled() {
        f.a.print$default(f.Companion, 0, null, new PushClickDialogTracker$onDateDialogCancelled$1(this), 3, null);
        finish();
    }

    @Override
    public void onDateSelected(int i2, int i3, int i4) {
        try {
            f.a.print$default(f.Companion, 0, null, new PushClickDialogTracker$onDateSelected$1(this, i2, i3, i4), 3, null);
            this.year = i2;
            this.day = i4;
            this.month = i3;
            TimePickerFragment timePickerFragment = new TimePickerFragment();
            timePickerFragment.setTimeSelectedListener(this);
            timePickerFragment.show(getSupportFragmentManager(), "timePicker");
        } catch (Exception e2) {
            f.Companion.print(1, e2, new PushClickDialogTracker$onDateSelected$2(this));
            finish();
        }
    }

    @Override
    public void onDialogCancelled() {
        finish();
    }

    @Override
    public void onItemSelected(long j) {
        try {
            f.a.print$default(f.Companion, 0, null, new PushClickDialogTracker$onItemSelected$1(this, j), 3, null);
            Bundle bundle = null;
            if (j == -1) {
                DatePickerFragment datePickerFragment = new DatePickerFragment();
                Bundle bundle2 = this.extras;
                if (bundle2 == null) {
                    v.throwUninitializedPropertyAccessException("extras");
                } else {
                    bundle = bundle2;
                }
                datePickerFragment.setArguments(bundle);
                datePickerFragment.setDateSelectedListener(this);
                datePickerFragment.show(getSupportFragmentManager(), "datePicker");
                return;
            }
            Intent intent = new Intent(getApplicationContext(), (Class<?>) MoEPushReceiver.class);
            Bundle bundle3 = this.extras;
            if (bundle3 == null) {
                v.throwUninitializedPropertyAccessException("extras");
            } else {
                bundle = bundle3;
            }
            intent.putExtras(MoEUtils.deepCopy(bundle));
            intent.setAction("MOE_ACTION_SHOW_NOTIFICATION");
            Context applicationContext = getApplicationContext();
            v.checkNotNullExpressionValue(applicationContext, "applicationContext");
            PendingIntent pendingIntentBroadcast$default = com.moengage.core.internal.utils.d.getPendingIntentBroadcast$default(applicationContext, l.AppCompatTheme_windowFixedWidthMinor, intent, 0, 8, null);
            Object systemService = getApplication().getSystemService("alarm");
            if (systemService == null) {
                throw new NullPointerException("null cannot be cast to non-null type android.app.AlarmManager");
            }
            ((AlarmManager) systemService).set(0, j, pendingIntentBroadcast$default);
            finish();
        } catch (Exception e2) {
            f.Companion.print(1, e2, new PushClickDialogTracker$onItemSelected$2(this));
            finish();
        }
    }

    @Override
    public void onTimeDialogCancelled() {
        f.a.print$default(f.Companion, 0, null, new PushClickDialogTracker$onTimeDialogCancelled$1(this), 3, null);
        finish();
    }

    @Override
    public void onTimeSelected(int i2, int i3) {
        try {
            f.a aVar = f.Companion;
            f.a.print$default(aVar, 0, null, new PushClickDialogTracker$onTimeSelected$1(this, i2, i3), 3, null);
            Calendar calendar = Calendar.getInstance();
            calendar.set(this.year, this.month, this.day, i2, i3, 0);
            long timeInMillis = calendar.getTimeInMillis();
            f.a.print$default(aVar, 0, null, new PushClickDialogTracker$onTimeSelected$2(this, timeInMillis), 3, null);
            Intent intent = new Intent((Context) this, (Class<?>) MoEPushReceiver.class);
            Bundle bundle = this.extras;
            if (bundle == null) {
                v.throwUninitializedPropertyAccessException("extras");
                bundle = null;
            }
            Bundle deepCopy = MoEUtils.deepCopy(bundle);
            deepCopy.remove("moe_action_id");
            deepCopy.remove("moe_action");
            intent.putExtras(deepCopy);
            intent.setAction("MOE_ACTION_SHOW_NOTIFICATION");
            Context applicationContext = getApplicationContext();
            v.checkNotNullExpressionValue(applicationContext, "applicationContext");
            PendingIntent pendingIntentBroadcast$default = com.moengage.core.internal.utils.d.getPendingIntentBroadcast$default(applicationContext, com.moengage.core.internal.utils.d.getUniqueNumber(), intent, 0, 8, null);
            Object systemService = getSystemService("alarm");
            if (systemService == null) {
                throw new NullPointerException("null cannot be cast to non-null type android.app.AlarmManager");
            }
            ((AlarmManager) systemService).set(0, timeInMillis, pendingIntentBroadcast$default);
            finish();
        } catch (Exception e2) {
            f.Companion.print(1, e2, new PushClickDialogTracker$onTimeSelected$4(this));
            finish();
        }
    }
}