正在查看: Mint v5.7.3 应用的 e.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 e.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.truecaller.android.sdk.oAuth.clients;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Handler;
import android.os.Process;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.fragment.app.FragmentActivity;
import com.truecaller.android.sdk.R;
import com.truecaller.android.sdk.TrueException;
import com.truecaller.android.sdk.TrueProfile;
import com.truecaller.android.sdk.clients.VerificationCallback;
import com.truecaller.android.sdk.oAuth.TcOAuthCallback;
import com.truecaller.android.sdk.oAuth.clients.e;
import java.util.Set;
import kf.h;
import lf.h;
@RestrictTo({RestrictTo.Scope.LIBRARY})
public final class e extends com.truecaller.android.sdk.oAuth.clients.a implements h.a {
@NonNull
private final h i;
@NonNull
private final lf.a j;
private final boolean k;
@Nullable
private lf.f l;
@Nullable
private lf.h m;
@Nullable
private Handler n;
class a implements h.a {
final String a;
final String b;
final FragmentActivity c;
final VerificationCallback d;
final String e;
a(String str, String str2, FragmentActivity fragmentActivity, VerificationCallback verificationCallback, String str3) {
this.a = str;
this.b = str2;
this.c = fragmentActivity;
this.d = verificationCallback;
this.e = str3;
}
public void f(DialogInterface dialogInterface, int i) {
e.this.m.o();
}
public void g(DialogInterface dialogInterface, int i) {
e.this.m.a();
dialogInterface.dismiss();
}
@Override
public void a(Set<String> set, Set<String> set2) {
e.this.i.m(e.this.g(), this.a, this.b, e.this.w(this.c), e.this.k, this.d, this.e);
}
@Override
public boolean b(Set<String> set) {
new AlertDialog.Builder(this.c).setMessage(R.string.permission_rationale_msg).setCancelable(false).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
e.a.this.f(dialogInterface, i);
}
}).setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
e.a.this.g(dialogInterface, i);
}
}).show();
return true;
}
@Override
public boolean c(Set<String> set) {
return false;
}
}
public e(@NonNull Context context, @NonNull String str, @NonNull TcOAuthCallback tcOAuthCallback, boolean z) {
super(context, str, tcOAuthCallback, 2);
this.k = z;
String string = context.getString(R.string.sdk_variant);
String string2 = context.getString(R.string.sdk_variant_version);
this.i = new f(this, (of.a) of.c.b("https://outline.truecaller.com/v1/", of.a.class, string, string2), (of.d) of.c.b("https://sdk-otp-verification-noneu.truecaller.com/v2/otp/installation/", of.d.class, string, string2), tcOAuthCallback, new nf.a(this.a));
this.j = lf.b.a(context);
}
private void t(FragmentActivity fragmentActivity, @NonNull String str, @NonNull String str2, @NonNull VerificationCallback verificationCallback, String str3) {
lf.h hVar = new lf.h(fragmentActivity, new a(str, str2, fragmentActivity, verificationCallback, str3));
this.m = hVar;
hVar.n();
}
private boolean x() {
return y("android.permission.ANSWER_PHONE_CALLS");
}
private boolean y(String str) {
return this.a.checkPermission(str, Process.myPid(), Process.myUid()) == 0;
}
private boolean z() {
return y("android.permission.READ_PHONE_STATE");
}
public void A(@Nullable Activity activity) {
com.truecaller.android.sdk.d.f(activity);
this.i.i();
}
public void B(@NonNull TrueProfile trueProfile, @NonNull VerificationCallback verificationCallback) {
this.i.d(trueProfile, g(), verificationCallback);
}
public void C(@NonNull TrueProfile trueProfile, @NonNull String str, @NonNull VerificationCallback verificationCallback) {
this.i.c(trueProfile, str, g(), verificationCallback);
}
@Override
public void a() {
this.j.a();
}
@Override
public void b(@NonNull mf.f fVar) {
TelephonyManager telephonyManager = (TelephonyManager) this.a.getSystemService("phone");
lf.f fVar2 = new lf.f(fVar);
this.l = fVar2;
telephonyManager.listen(fVar2, 32);
}
@Override
public boolean c() {
return z() && y("android.permission.READ_CALL_LOG") && x();
}
@Override
public boolean d() {
TelephonyManager telephonyManager = (TelephonyManager) this.a.getSystemService("phone");
return telephonyManager != null && telephonyManager.getSimState() == 5;
}
@Override
public void e() {
((TelephonyManager) this.a.getSystemService("phone")).listen(this.l, 0);
}
@Override
public boolean f() {
return Settings.Global.getInt(this.a.getContentResolver(), "airplane_mode_on", 0) != 0;
}
@Override
public Handler getHandler() {
if (this.n == null) {
this.n = new Handler();
}
return this.n;
}
@SuppressLint({"HardwareIds"})
public void u(@NonNull String str, @NonNull String str2, @NonNull VerificationCallback verificationCallback, @NonNull FragmentActivity fragmentActivity) {
com.truecaller.android.sdk.d.c(fragmentActivity);
if (!com.truecaller.android.sdk.d.e(str2)) {
throw new RuntimeException(TrueException.TYPE_INVALID_NUMBER);
}
String c = com.truecaller.android.sdk.f.c(fragmentActivity);
if (!d() || f() || c()) {
this.i.m(g(), str, str2, w(fragmentActivity), this.k, verificationCallback, c);
} else {
t(fragmentActivity, str, str2, verificationCallback, c);
}
}
public void v() {
if (this.l != null) {
e();
this.l = null;
}
this.m = null;
Handler handler = this.n;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
this.n = null;
}
}
@NonNull
public String w(FragmentActivity fragmentActivity) {
return com.truecaller.android.sdk.d.d(fragmentActivity);
}
}