导航菜单

页面标题

页面副标题

MedEd v5.3.6 - SmsBroadcastReceiver.java 源代码

正在查看: MedEd v5.3.6 应用的 SmsBroadcastReceiver.java JAVA 源代码文件

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


package com.penpencil.physicswallah.broadcast;

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 in.juspay.hyper.constants.LogCategory;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

@Metadata
public final class SmsBroadcastReceiver extends BroadcastReceiver {
    public a a;

    public interface a {
        void a(String str);
    }

    @Override
    public final void onReceive(Context context, Intent intent) {
        Intrinsics.checkNotNullParameter(context, LogCategory.CONTEXT);
        Intrinsics.checkNotNullParameter(intent, "intent");
        if (Intrinsics.b(intent.getAction(), "com.google.android.gms.auth.api.phone.SMS_RETRIEVED")) {
            Bundle extras = intent.getExtras();
            Status status = extras != null ? (Status) extras.getParcelable("com.google.android.gms.auth.api.phone.EXTRA_STATUS") : null;
            if (status == null || status.a != 0) {
                return;
            }
            String string = extras != null ? extras.getString("com.google.android.gms.auth.api.phone.EXTRA_SMS_MESSAGE") : null;
            if (string != null) {
                Matcher matcher = Pattern.compile("(\\d{6})").matcher(string);
                if (matcher.find()) {
                    String group = matcher.group();
                    a aVar = this.a;
                    if (aVar != null) {
                        aVar.a(group);
                    }
                }
            }
        }
    }
}