导航菜单

页面标题

页面副标题

CityMall v1.42.1 - FullScreenPushNotificationActivity.java 源代码

正在查看: CityMall v1.42.1 应用的 FullScreenPushNotificationActivity.java JAVA 源代码文件

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


package live.citymall.customer;

import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.clevertap.android.sdk.CleverTapAPI;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import io.sentry.Sentry;
import java.util.HashMap;
import kotlin.Metadata;

@Metadata
public final class FullScreenPushNotificationActivity extends androidx.appcompat.app.b {
    private CleverTapAPI a;
    private final HashMap b = new HashMap();

    public static final void H(FullScreenPushNotificationActivity this$0, View view) {
        kotlin.jvm.internal.j.i(this$0, "this$0");
        CleverTapAPI cleverTapAPI = this$0.a;
        if (cleverTapAPI != null) {
            cleverTapAPI.g1("FPN_CLOSED", this$0.b);
        }
        this$0.finish();
    }

    public static final void I(final FullScreenPushNotificationActivity this$0) {
        kotlin.jvm.internal.j.i(this$0, "this$0");
        this$0.runOnUiThread(new Runnable() {
            @Override
            public final void run() {
                FullScreenPushNotificationActivity.J(FullScreenPushNotificationActivity.this);
            }
        });
    }

    public static final void J(FullScreenPushNotificationActivity this$0) {
        kotlin.jvm.internal.j.i(this$0, "this$0");
        CleverTapAPI cleverTapAPI = this$0.a;
        if (cleverTapAPI != null) {
            cleverTapAPI.g1("FPN_AUTO_CLOSED", this$0.b);
        }
        this$0.finish();
    }

    private final void K(FrameLayout frameLayout, final Bundle bundle) {
        frameLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FullScreenPushNotificationActivity.L(FullScreenPushNotificationActivity.this, bundle, view);
            }
        });
    }

    public static final void L(FullScreenPushNotificationActivity this$0, Bundle bundle, View view) {
        kotlin.jvm.internal.j.i(this$0, "this$0");
        CleverTapAPI cleverTapAPI = this$0.a;
        if (cleverTapAPI != null) {
            cleverTapAPI.g1("FPN_CLICKED", this$0.b);
        }
        this$0.finish();
        String string = bundle != null ? bundle.getString("deepLink") : null;
        if (string == null || string.length() == 0) {
            this$0.startActivity(new Intent((Context) this$0, (Class<?>) MainActivity.class));
            return;
        }
        try {
            Intent intent = new Intent("android.intent.action.VIEW");
            intent.setData(Uri.parse(string));
            this$0.startActivity(intent);
        } catch (Exception e) {
            this$0.startActivity(new Intent((Context) this$0, (Class<?>) MainActivity.class));
            FirebaseCrashlytics firebaseCrashlytics = FirebaseCrashlytics.getInstance();
            kotlin.jvm.internal.j.h(firebaseCrashlytics, "getInstance(...)");
            firebaseCrashlytics.recordException(e);
            Sentry.h(e);
        }
    }

    protected void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        setContentView(h.a);
        setRequestedOrientation(1);
        getWindow().addFlags(6815872);
        Object systemService = getSystemService("notification");
        kotlin.jvm.internal.j.g(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        ((NotificationManager) systemService).cancel(100);
        Intent intent = getIntent();
        Bundle bundle2 = null;
        bundle2 = null;
        if (intent != null && intent.getExtras() != null) {
            Bundle extras = intent.getExtras();
            ImageView imageView = (ImageView) findViewById(g.l);
            String string = extras != null ? extras.getString("image") : null;
            if (string == null) {
                string = com.simpl.android.fingerprint.BuildConfig.FLAVOR;
            }
            if (extras != null) {
                try {
                    for (String str : extras.keySet()) {
                        if (str != null) {
                            HashMap hashMap = this.b;
                            String string2 = extras.getString(str);
                            if (string2 == null) {
                                string2 = com.simpl.android.fingerprint.BuildConfig.FLAVOR;
                            }
                            hashMap.put(str, string2);
                        }
                    }
                } catch (Exception e) {
                    Sentry.h(e);
                }
            }
            if (string.length() > 0) {
                Glide.v(this).m(string).E0(imageView);
            }
            bundle2 = extras;
        }
        CleverTapAPI d0 = CleverTapAPI.d0(getApplicationContext());
        this.a = d0;
        if (d0 != null) {
            d0.g1("FPN_SHOW", this.b);
        }
        View findViewById = findViewById(g.m);
        kotlin.jvm.internal.j.g(findViewById, "null cannot be cast to non-null type android.widget.FrameLayout");
        K((FrameLayout) findViewById, bundle2);
        FloatingActionButton findViewById2 = findViewById(g.c);
        kotlin.jvm.internal.j.g(findViewById2, "null cannot be cast to non-null type com.google.android.material.floatingactionbutton.FloatingActionButton");
        findViewById2.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FullScreenPushNotificationActivity.H(FullScreenPushNotificationActivity.this, view);
            }
        });
        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public final void run() {
                FullScreenPushNotificationActivity.I(FullScreenPushNotificationActivity.this);
            }
        }, 600000L);
    }
}