导航菜单

页面标题

页面副标题

Mitra Bukalapak v2.55.0 - ApplicationSelectorBroadcastReceiver.java 源代码

正在查看: Mitra Bukalapak v2.55.0 应用的 ApplicationSelectorBroadcastReceiver.java JAVA 源代码文件

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


package com.bukalapak.mitra.service;

import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import defpackage.iv6;
import defpackage.ju6;
import defpackage.sv6;
import defpackage.yd2;
import kotlin.Metadata;

@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u0000 \u00072\u00020\u0001:\u0001\u0007B\u0007¢\u0006\u0004\b\u000e\u0010\u000fJ\u001a\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0004H\u0003J\u0018\u0010\n\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002J\u0018\u0010\u000b\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002J\u0018\u0010\f\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002J\u0018\u0010\r\u001a\u00020\t2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0004H\u0017¨\u0006\u0010"}, d2 = {"Lcom/bukalapak/mitra/service/ApplicationSelectorBroadcastReceiver;", "Landroid/content/BroadcastReceiver;", "Landroid/content/Context;", "context", "Landroid/content/Intent;", "intent", "", "a", "appName", "Llm9;", "b", "d", "c", "onReceive", "<init>", "()V", "base_app_release"}, k = 1, mv = {1, 8, 0})
public final class ApplicationSelectorBroadcastReceiver extends BroadcastReceiver {

    @Metadata(d1 = {"\u0000\u0011\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0013*\u0001\u0000\b\n\u0018\u00002\u00020\u0001R\u001a\u0010\u0007\u001a\u00020\u00028\u0016X\u0096\u0004¢\u0006\f\n\u0004\b\u0003\u0010\u0004\u001a\u0004\b\u0005\u0010\u0006R$\u0010\f\u001a\u0004\u0018\u00010\u00028\u0016@\u0016X\u0096\u000e¢\u0006\u0012\n\u0004\b\b\u0010\u0004\u001a\u0004\b\t\u0010\u0006\"\u0004\b\n\u0010\u000bR$\u0010\u0010\u001a\u0004\u0018\u00010\u00028\u0016@\u0016X\u0096\u000e¢\u0006\u0012\n\u0004\b\r\u0010\u0004\u001a\u0004\b\u000e\u0010\u0006\"\u0004\b\u000f\u0010\u000bR$\u0010\u0014\u001a\u0004\u0018\u00010\u00028\u0016@\u0016X\u0096\u000e¢\u0006\u0012\n\u0004\b\u0011\u0010\u0004\u001a\u0004\b\u0012\u0010\u0006\"\u0004\b\u0013\u0010\u000b¨\u0006\u0015"}, d2 = {"com/bukalapak/mitra/service/ApplicationSelectorBroadcastReceiver$b", "Lzb9;", "", "a", "Ljava/lang/String;", "getScreenName", "()Ljava/lang/String;", "screenName", "b", "getReferrerScreen", "setReferrerScreen", "(Ljava/lang/String;)V", "referrerScreen", "c", "getReferrerUrl", "setReferrerUrl", "referrerUrl", "d", "getReferrerFeature", "setReferrerFeature", "referrerFeature", "base_app_release"}, k = 1, mv = {1, 8, 0})
    public static final class b implements zb9 {

        private final String screenName;

        private String referrerScreen;

        private String referrerUrl;

        private String referrerFeature;

        b() {
            d48 d48Var = d48.a;
            this.screenName = d48Var.y1().b();
            this.referrerScreen = d48Var.z1().b();
        }

        public String getReferrerFeature() {
            return this.referrerFeature;
        }

        public String getReferrerScreen() {
            return this.referrerScreen;
        }

        public String getReferrerUrl() {
            return this.referrerUrl;
        }

        public String getScreenName() {
            return this.screenName;
        }
    }

    private final String a(Context context, Intent intent) {
        String str;
        try {
            ComponentName componentName = (ComponentName) intent.getParcelableExtra("android.intent.extra.CHOSEN_COMPONENT");
            PackageManager packageManager = context.getPackageManager();
            if (componentName == null || (str = componentName.getPackageName()) == null) {
                str = "";
            }
            ApplicationInfo applicationInfo = packageManager.getApplicationInfo(str, 128);
            p64.g(applicationInfo, "packageManager.getApplic…T_META_DATA\n            )");
            CharSequence applicationLabel = packageManager.getApplicationLabel(applicationInfo);
            p64.f(applicationLabel, "null cannot be cast to non-null type kotlin.String");
            return (String) applicationLabel;
        } catch (Exception unused) {
            return null;
        }
    }

    private final void b(String str, Intent intent) {
        String stringExtra = intent.getStringExtra("promotion_media_type");
        if (stringExtra == null) {
            stringExtra = "";
        }
        long longExtra = intent.getLongExtra("promotion_media_id", 0L);
        String stringExtra2 = intent.getStringExtra("promotion_media_title");
        String str2 = stringExtra2 == null ? "" : stringExtra2;
        long longExtra2 = intent.getLongExtra("session_time", 0L);
        sv6 a = iv6.INSTANCE.a(ic8.a.I(), new b());
        if (a != null) {
            a.a(longExtra, str2, longExtra2, new ju6.AppSharePromotionMedia(stringExtra, str));
        }
    }

    private final void c(String str, Intent intent) {
        String stringExtra = intent.getStringExtra("referrer_screen");
        if (stringExtra == null) {
            stringExtra = "";
        }
        float floatExtra = intent.getFloatExtra("debt_amount", 0.0f);
        float floatExtra2 = intent.getFloatExtra("entry_amount", 0.0f);
        long longExtra = intent.getLongExtra("customer_id", 0L);
        new wea(new bfa()).N(stringExtra, "", d48.a.e2().b(), "debt_payment_link_detail_share_" + str, "success", floatExtra, floatExtra2, longExtra, (Long) null, (Boolean) null);
    }

    private final void d(String str, Intent intent) {
        String stringExtra = intent.getStringExtra("current_screen");
        if (stringExtra == null) {
            stringExtra = "";
        }
        long longExtra = intent.getLongExtra("session_time", 0L);
        yd2.a.a(stringExtra, longExtra, "bagikan_screenshot_" + str);
    }

    @Override
    @SuppressLint({"DefaultLocale"})
    public void onReceive(Context context, Intent intent) {
        String str;
        p64.h(context, "context");
        p64.h(intent, "intent");
        if (Build.VERSION.SDK_INT >= 22) {
            String a = a(context, intent);
            if (a != null) {
                str = a.toLowerCase();
                p64.g(str, "this as java.lang.String).toLowerCase()");
            } else {
                str = null;
            }
            String stringExtra = intent.getStringExtra("source");
            if (str == null || stringExtra == null) {
                return;
            }
            int hashCode = stringExtra.hashCode();
            if (hashCode == -793823625) {
                if (stringExtra.equals("share_saas_payment_request")) {
                    c(str, intent);
                }
            } else if (hashCode == -356851283) {
                if (stringExtra.equals("share_poster")) {
                    b(str, intent);
                }
            } else if (hashCode == 1492814392 && stringExtra.equals("share_screenshot_selector")) {
                d(str, intent);
            }
        }
    }
}