导航菜单

页面标题

页面副标题

OLX India v19.42.007 - SMSBroadcastReceiver.java 源代码

正在查看: OLX India v19.42.007 应用的 SMSBroadcastReceiver.java JAVA 源代码文件

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


package com.olxgroup.panamera.app.users.auth.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;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsKt;

@Metadata
public final class SMSBroadcastReceiver extends BroadcastReceiver {
    private Pattern a = Pattern.compile("(|^)\\d{4}");
    private a b;

    public final void a(a aVar) {
        this.b = aVar;
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        a aVar;
        if (Intrinsics.d("com.google.android.gms.auth.api.phone.SMS_RETRIEVED", intent.getAction())) {
            Bundle extras = intent.getExtras();
            int statusCode = ((Status) (extras != null ? extras.get("com.google.android.gms.auth.api.phone.EXTRA_STATUS") : null)).getStatusCode();
            if (statusCode != 0) {
                if (statusCode == 15 && (aVar = this.b) != null) {
                    aVar.m2();
                    return;
                }
                return;
            }
            Object obj = extras.get("com.google.android.gms.auth.api.phone.EXTRA_SMS_MESSAGE");
            String str = obj instanceof String ? (String) obj : null;
            if (str == null || !(!StringsKt__StringsKt.i0(str))) {
                return;
            }
            Matcher matcher = this.a.matcher(str);
            if (matcher.find()) {
                String group = matcher.group(0);
                a aVar2 = this.b;
                if (aVar2 != null) {
                    aVar2.onOtpReceived(group);
                }
            }
        }
    }
}