导航菜单

页面标题

页面副标题

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

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

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


package com.bukalapak.mitra.feature.otp.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.google.android.gms.common.api.Status;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
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\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0006\u0018\u00002\u00020\u0001:\u0001\tB\u0013\u0012\n\b\u0002\u0010\u000b\u001a\u0004\u0018\u00010\b¢\u0006\u0004\b\u0010\u0010\u0011J\u0018\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0004H\u0016R\u0016\u0010\u000b\u001a\u0004\u0018\u00010\b8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\t\u0010\nR\u0014\u0010\u000f\u001a\u00020\f8\u0002X\u0082D¢\u0006\u0006\n\u0004\b\r\u0010\u000e¨\u0006\u0012"}, d2 = {"Lcom/bukalapak/mitra/feature/otp/receiver/SmsRetrieverBroadcastReceiver;", "Landroid/content/BroadcastReceiver;", "Landroid/content/Context;", "context", "Landroid/content/Intent;", "intent", "Llm9;", "onReceive", "Lcom/bukalapak/mitra/feature/otp/receiver/SmsRetrieverBroadcastReceiver$a;", "a", "Lcom/bukalapak/mitra/feature/otp/receiver/SmsRetrieverBroadcastReceiver$a;", "listener", "", "b", "Ljava/lang/String;", "otpDigit", "<init>", "(Lcom/bukalapak/mitra/feature/otp/receiver/SmsRetrieverBroadcastReceiver$a;)V", "feature_otp_release"}, k = 1, mv = {1, 8, 0})
public final class SmsRetrieverBroadcastReceiver extends BroadcastReceiver {

    private final a listener;

    private final String otpDigit;

    @Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bf\u0018\u00002\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H&¨\u0006\u0006"}, d2 = {"Lcom/bukalapak/mitra/feature/otp/receiver/SmsRetrieverBroadcastReceiver$a;", "", "", "otp", "Llm9;", "a", "feature_otp_release"}, k = 1, mv = {1, 8, 0})
    public interface a {
        void a(String str);
    }

    public SmsRetrieverBroadcastReceiver() {
        throw new UnsupportedOperationException("Method not decompiled: com.bukalapak.mitra.feature.otp.receiver.SmsRetrieverBroadcastReceiver.<init>():void");
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        a aVar;
        p64.h(context, "context");
        p64.h(intent, "intent");
        if (p64.c(intent.getAction(), "com.google.android.gms.auth.api.phone.SMS_RETRIEVED")) {
            Bundle extras = intent.getExtras();
            Matcher matcher = null;
            Object obj = extras != null ? extras.get("com.google.android.gms.auth.api.phone.EXTRA_STATUS") : null;
            Status status = obj instanceof Status ? (Status) obj : null;
            Integer valueOf = status != null ? Integer.valueOf(status.u()) : null;
            if (valueOf != null && valueOf.intValue() == 0) {
                Object obj2 = extras.get("com.google.android.gms.auth.api.phone.EXTRA_SMS_MESSAGE");
                String str = obj2 instanceof String ? (String) obj2 : null;
                Pattern compile = Pattern.compile(this.otpDigit);
                if (str != null) {
                    p64.g(compile, "extractPattern");
                    matcher = compile.matcher(str);
                }
                if (matcher == null || !matcher.find() || (aVar = this.listener) == null) {
                    return;
                }
                String group = matcher.group(0);
                p64.g(group, "matcher.group(0)");
                aVar.a(group);
            }
        }
    }

    public SmsRetrieverBroadcastReceiver(a aVar, int i, oq1 oq1Var) {
        this((i & 1) != 0 ? null : aVar);
    }

    public SmsRetrieverBroadcastReceiver(a aVar) {
        this.listener = aVar;
        this.otpDigit = "\\d{5}";
    }
}