导航菜单

页面标题

页面副标题

Dostt v1.0.89 - c.java 源代码

正在查看: Dostt v1.0.89 应用的 c.java JAVA 源代码文件

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


package com.truecaller.android.sdk.oAuth.clients;

import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Process;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import androidx.fragment.app.t;
import com.truecaller.android.sdk.common.TrueException;
import com.truecaller.android.sdk.common.VerificationCallback;
import com.truecaller.android.sdk.common.models.TrueProfile;
import com.truecaller.android.sdk.oAuth.TcOAuthCallback;
import com.truecaller.android.sdk.oAuth.TcOAuthError;
import jf.C1683c;
import jf.InterfaceC1682b;
import kf.AbstractC1698b;
import kf.InterfaceC1697a;
import kf.f;
import mf.C1775a;
import nf.AbstractC1787c;
import nf.InterfaceC1785a;
import nf.InterfaceC1788d;
import of.C1814a;
import p000if.d;
import p000if.g;

public final class c extends a implements InterfaceC1682b.a {
    private final InterfaceC1682b i;
    private final InterfaceC1697a j;
    private final boolean k;
    private f l;
    private Handler m;
    private C1775a n;

    public c(Context context, String str, TcOAuthCallback tcOAuthCallback, boolean z) {
        super(context, str, tcOAuthCallback, 2);
        this.k = z;
        String string = context.getString(d.c);
        String string2 = context.getString(d.d);
        this.i = new C1683c(this, (InterfaceC1785a) AbstractC1787c.b("https://outline.truecaller.com/v1/", InterfaceC1785a.class, "3.1.0", string, string2), (InterfaceC1788d) AbstractC1787c.b("https://sdk-otp-verification-noneu.truecaller.com/v2/otp/client/installation/", InterfaceC1788d.class, "3.1.0", string, string2), tcOAuthCallback, new C1814a(this.a));
        this.j = AbstractC1698b.a(context);
        this.n = new C1775a(this.a);
    }

    private void t() {
        C1775a c1775a = this.n;
        if (c1775a != null) {
            c1775a.d();
            this.n.c();
            this.n = null;
        }
    }

    public static c u(Context context, String str, TcOAuthCallback tcOAuthCallback, Activity activity, TcOAuthError tcOAuthError) {
        c cVar = new c(context, str, tcOAuthCallback, true);
        g.i(activity);
        tcOAuthCallback.onVerificationRequired(tcOAuthError);
        return cVar;
    }

    private boolean w() {
        return Build.VERSION.SDK_INT < 26 ? x("android.permission.CALL_PHONE") : x("android.permission.ANSWER_PHONE_CALLS");
    }

    private boolean x(String str) {
        return this.a.checkPermission(str, Process.myPid(), Process.myUid()) == 0;
    }

    private boolean y() {
        return x("android.permission.READ_PHONE_STATE");
    }

    public void A(TrueProfile trueProfile, VerificationCallback verificationCallback) {
        this.i.f(trueProfile, h(), verificationCallback);
    }

    public void B(TrueProfile trueProfile, String str, VerificationCallback verificationCallback) {
        this.i.n(trueProfile, str, h(), verificationCallback);
    }

    @Override
    public void a() {
        this.j.a();
    }

    @Override
    public void b(VerificationCallback verificationCallback, long j) {
        C1775a c1775a = this.n;
        if (c1775a != null) {
            c1775a.a(verificationCallback, g.d(h(), m()));
            this.n.b(j);
        }
    }

    @Override
    public boolean c() {
        return Settings.Global.getInt(this.a.getContentResolver(), "airplane_mode_on", 0) == 0;
    }

    @Override
    public void d(lf.g gVar) {
        TelephonyManager telephonyManager = (TelephonyManager) this.a.getSystemService("phone");
        f fVar = new f(gVar);
        this.l = fVar;
        telephonyManager.listen(fVar, 32);
    }

    @Override
    public boolean e() {
        return y() && x("android.permission.READ_CALL_LOG") && w();
    }

    @Override
    public int f() {
        TelephonyManager telephonyManager = (TelephonyManager) this.a.getSystemService("phone");
        if (telephonyManager == null) {
            return 0;
        }
        return telephonyManager.getSimState();
    }

    @Override
    public void g() {
        ((TelephonyManager) this.a.getSystemService("phone")).listen(this.l, 0);
    }

    @Override
    public Handler getHandler() {
        if (this.m == null) {
            this.m = new Handler();
        }
        return this.m;
    }

    public void r(String str, String str2, VerificationCallback verificationCallback, t tVar) {
        g.c(tVar);
        if (!g.h(str2)) {
            throw new RuntimeException(TrueException.TYPE_INVALID_NUMBER);
        }
        this.i.i(m(), h(), str, str2, v(tVar), this.k, verificationCallback, com.truecaller.android.sdk.oAuth.g.b(tVar));
    }

    public void s() {
        t();
        if (this.l != null) {
            g();
            this.l = null;
        }
        Handler handler = this.m;
        if (handler != null) {
            handler.removeCallbacksAndMessages(null);
            this.m = null;
        }
    }

    public String v(t tVar) {
        return g.e(tVar);
    }

    public void z(Activity activity) {
        g.i(activity);
        this.i.k();
    }
}