正在查看: Dostt v1.0.89 应用的 C6350m.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Dostt v1.0.89 应用的 C6350m.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package y5;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.Html;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.fragment.app.AbstractActivityC2553t;
import androidx.fragment.app.DialogInterfaceOnCancelListenerC2547m;
import com.cashfree.pg.core.hidden.utils.Constants;
import com.facebook.C2862a;
import com.facebook.C3052v;
import com.facebook.C3055y;
import com.facebook.EnumC2869h;
import com.facebook.FacebookActivity;
import com.facebook.M;
import com.razorpay.rn.RazorpayModule;
import i4.C4135a;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.EnumSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import o5.C4968A;
import o5.C4994w;
import o5.Y;
import o5.Z;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import x3.C6236D;
import y5.C6357u;
@Metadata(d1 = {"\u0000¸\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\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\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\t\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0016\u0018\u0000 m2\u00020\u0001:\u0003GKNB\u0007¢\u0006\u0004\b\u0002\u0010\u0003J-\u0010\u000b\u001a\u0004\u0018\u00010\n2\u0006\u0010\u0005\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0016¢\u0006\u0004\b\u000b\u0010\fJ\u0019\u0010\u000e\u001a\u00020\r2\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0016¢\u0006\u0004\b\u000e\u0010\u000fJ\u0017\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u0011\u001a\u00020\u0010H\u0016¢\u0006\u0004\b\u0013\u0010\u0014J\u0017\u0010\u0016\u001a\u00020\u00122\u0006\u0010\u0015\u001a\u00020\bH\u0016¢\u0006\u0004\b\u0016\u0010\u0017J\u000f\u0010\u0018\u001a\u00020\u0012H\u0016¢\u0006\u0004\b\u0018\u0010\u0003J\u0017\u0010\u001b\u001a\u00020\u00122\u0006\u0010\u001a\u001a\u00020\u0019H\u0016¢\u0006\u0004\b\u001b\u0010\u001cJ\u001d\u0010\u001f\u001a\u0010\u0012\u0004\u0012\u00020\u001e\u0012\u0004\u0012\u00020\u001e\u0018\u00010\u001dH\u0016¢\u0006\u0004\b\u001f\u0010 J\u000f\u0010!\u001a\u00020\u001eH\u0016¢\u0006\u0004\b!\u0010\"J\u0017\u0010%\u001a\u00020\n2\u0006\u0010$\u001a\u00020#H\u0014¢\u0006\u0004\b%\u0010&J\u0017\u0010(\u001a\u00020'2\u0006\u0010$\u001a\u00020#H\u0015¢\u0006\u0004\b(\u0010)J\u0017\u0010,\u001a\u00020\u00122\u0006\u0010+\u001a\u00020*H\u0014¢\u0006\u0004\b,\u0010-J\u000f\u0010.\u001a\u00020\u0012H\u0014¢\u0006\u0004\b.\u0010\u0003J\u000f\u0010/\u001a\u00020#H\u0014¢\u0006\u0004\b/\u00100J\u0017\u00103\u001a\u00020\u00122\u0006\u00102\u001a\u000201H\u0002¢\u0006\u0004\b3\u00104J\u000f\u00105\u001a\u00020\u0012H\u0002¢\u0006\u0004\b5\u0010\u0003J\u000f\u00106\u001a\u00020\u0012H\u0002¢\u0006\u0004\b6\u0010\u0003JC\u0010?\u001a\u00020\u00122\u0006\u00107\u001a\u00020\u001e2\u0006\u00109\u001a\u0002082\u0006\u0010:\u001a\u00020\u001e2\u0006\u0010;\u001a\u00020\u001e2\b\u0010=\u001a\u0004\u0018\u00010<2\b\u0010>\u001a\u0004\u0018\u00010<H\u0002¢\u0006\u0004\b?\u0010@J)\u0010C\u001a\u00020\u00122\u0006\u0010:\u001a\u00020\u001e2\u0006\u0010B\u001a\u00020A2\b\u0010>\u001a\u0004\u0018\u00010AH\u0002¢\u0006\u0004\bC\u0010DJ;\u0010E\u001a\u00020\u00122\u0006\u00107\u001a\u00020\u001e2\u0006\u00109\u001a\u0002082\u0006\u0010:\u001a\u00020\u001e2\b\u0010=\u001a\u0004\u0018\u00010<2\b\u0010>\u001a\u0004\u0018\u00010<H\u0002¢\u0006\u0004\bE\u0010FR\u0016\u0010I\u001a\u00020\n8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bG\u0010HR\u0016\u0010M\u001a\u00020J8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bK\u0010LR\u0016\u0010O\u001a\u00020J8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bN\u0010LR\u0018\u0010S\u001a\u0004\u0018\u00010P8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bQ\u0010RR\u0014\u0010W\u001a\u00020T8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bU\u0010VR\u0018\u0010[\u001a\u0004\u0018\u00010X8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bY\u0010ZR\u001c\u0010_\u001a\b\u0012\u0002\b\u0003\u0018\u00010\\8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b]\u0010^R\u0018\u00102\u001a\u0004\u0018\u0001018\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b`\u0010aR\u0016\u0010d\u001a\u00020#8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bb\u0010cR\u0016\u0010f\u001a\u00020#8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\be\u0010cR\u0018\u0010\u001a\u001a\u0004\u0018\u00010\u00198\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bg\u0010hR\u0014\u0010l\u001a\u00020i8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\bj\u0010k¨\u0006n"}, d2 = {"Ly5/m;", "Landroidx/fragment/app/m;", "<init>", "()V", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;", "Landroid/app/Dialog;", "onCreateDialog", "(Landroid/os/Bundle;)Landroid/app/Dialog;", "Landroid/content/DialogInterface;", "dialog", "LSh/J;", "onDismiss", "(Landroid/content/DialogInterface;)V", "outState", "onSaveInstanceState", "(Landroid/os/Bundle;)V", "onDestroyView", "Ly5/u$e;", "request", "e0", "(Ly5/u$e;)V", "", "", "L", "()Ljava/util/Map;", "N", "()Ljava/lang/String;", "", "isSmartLogin", "Q", "(Z)Landroid/view/View;", "", "O", "(Z)I", "Lcom/facebook/v;", "ex", "U", "(Lcom/facebook/v;)V", "T", "S", "()Z", "Ly5/m$c;", "currentRequestState", "d0", "(Ly5/m$c;)V", "X", "b0", "userId", "Ly5/m$b;", "permissions", "accessToken", "name", "Ljava/util/Date;", "expirationTime", "dataAccessExpirationTime", "Y", "(Ljava/lang/String;Ly5/m$b;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;)V", "", "expiresIn", "V", "(Ljava/lang/String;JLjava/lang/Long;)V", "M", "(Ljava/lang/String;Ly5/m$b;Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;)V", F6.a.f5691a, "Landroid/view/View;", "progressBar", "Landroid/widget/TextView;", "b", "Landroid/widget/TextView;", "confirmationCode", "c", "instructions", "Ly5/n;", "d", "Ly5/n;", "deviceAuthMethodHandler", "Ljava/util/concurrent/atomic/AtomicBoolean;", "e", "Ljava/util/concurrent/atomic/AtomicBoolean;", "completed", "Lcom/facebook/P;", "f", "Lcom/facebook/P;", "currentGraphRequestPoll", "Ljava/util/concurrent/ScheduledFuture;", "o", "Ljava/util/concurrent/ScheduledFuture;", "scheduledPoll", "p", "Ly5/m$c;", "q", "Z", "isBeingDestroyed", "r", "isRetry", "s", "Ly5/u$e;", "Lcom/facebook/M;", "P", "()Lcom/facebook/M;", "pollRequest", "t", "facebook-common_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public class C6350m extends DialogInterfaceOnCancelListenerC2547m {
public static final Companion INSTANCE = new Companion(null);
private static final String f62097u = "device/login";
private static final String f62098v = "device/login_status";
private static final int f62099w = 1349174;
private View progressBar;
private TextView confirmationCode;
private TextView instructions;
private C6351n deviceAuthMethodHandler;
private final AtomicBoolean completed = new AtomicBoolean();
private volatile com.facebook.P currentGraphRequestPoll;
private volatile ScheduledFuture scheduledPoll;
private volatile c currentRequestState;
private boolean isBeingDestroyed;
private boolean isRetry;
private C6357u.e request;
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final b b(JSONObject jSONObject) {
String optString;
JSONArray jSONArray = jSONObject.getJSONObject("permissions").getJSONArray("data");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
ArrayList arrayList3 = new ArrayList();
int length = jSONArray.length();
if (length > 0) {
int i10 = 0;
while (true) {
int i11 = i10 + 1;
JSONObject optJSONObject = jSONArray.optJSONObject(i10);
String permission = optJSONObject.optString("permission");
kotlin.jvm.internal.r.e(permission, "permission");
if (permission.length() != 0 && !kotlin.jvm.internal.r.b(permission, "installed") && (optString = optJSONObject.optString("status")) != null) {
int hashCode = optString.hashCode();
if (hashCode != -1309235419) {
if (hashCode != 280295099) {
if (hashCode == 568196142 && optString.equals("declined")) {
arrayList2.add(permission);
}
} else if (optString.equals("granted")) {
arrayList.add(permission);
}
} else if (optString.equals("expired")) {
arrayList3.add(permission);
}
}
if (i11 >= length) {
break;
}
i10 = i11;
}
}
return new b(arrayList, arrayList2, arrayList3);
}
private Companion() {
}
}
static final class b {
private List f62111a;
private List f62112b;
private List f62113c;
public b(List grantedPermissions, List declinedPermissions, List expiredPermissions) {
kotlin.jvm.internal.r.f(grantedPermissions, "grantedPermissions");
kotlin.jvm.internal.r.f(declinedPermissions, "declinedPermissions");
kotlin.jvm.internal.r.f(expiredPermissions, "expiredPermissions");
this.f62111a = grantedPermissions;
this.f62112b = declinedPermissions;
this.f62113c = expiredPermissions;
}
public final List a() {
return this.f62112b;
}
public final List b() {
return this.f62113c;
}
public final List c() {
return this.f62111a;
}
}
private static final class c implements Parcelable {
private String f62115a;
private String f62116b;
private String f62117c;
private long f62118d;
private long f62119e;
public static final b f62114f = new b(null);
public static final Parcelable.Creator<c> CREATOR = new a();
public static final class a implements Parcelable.Creator {
a() {
}
@Override
public c createFromParcel(Parcel parcel) {
kotlin.jvm.internal.r.f(parcel, "parcel");
return new c(parcel);
}
@Override
public c[] newArray(int i10) {
return new c[i10];
}
}
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private b() {
}
}
public c() {
}
public final String a() {
return this.f62115a;
}
public final long b() {
return this.f62118d;
}
public final String c() {
return this.f62117c;
}
public final String d() {
return this.f62116b;
}
@Override
public int describeContents() {
return 0;
}
public final void e(long j10) {
this.f62118d = j10;
}
public final void g(long j10) {
this.f62119e = j10;
}
public final void j(String str) {
this.f62117c = str;
}
public final void k(String str) {
this.f62116b = str;
kotlin.jvm.internal.S s10 = kotlin.jvm.internal.S.f48423a;
String format = String.format(Locale.ENGLISH, "https://facebook.com/device?user_code=%1$s&qr=1", Arrays.copyOf(new Object[]{str}, 1));
kotlin.jvm.internal.r.e(format, "java.lang.String.format(locale, format, *args)");
this.f62115a = format;
}
public final boolean l() {
return this.f62119e != 0 && (new Date().getTime() - this.f62119e) - (this.f62118d * 1000) < 0;
}
@Override
public void writeToParcel(Parcel dest, int i10) {
kotlin.jvm.internal.r.f(dest, "dest");
dest.writeString(this.f62115a);
dest.writeString(this.f62116b);
dest.writeString(this.f62117c);
dest.writeLong(this.f62118d);
dest.writeLong(this.f62119e);
}
protected c(Parcel parcel) {
kotlin.jvm.internal.r.f(parcel, "parcel");
this.f62115a = parcel.readString();
this.f62116b = parcel.readString();
this.f62117c = parcel.readString();
this.f62118d = parcel.readLong();
this.f62119e = parcel.readLong();
}
}
public static final class d extends Dialog {
d(AbstractActivityC2553t abstractActivityC2553t, int i10) {
super(abstractActivityC2553t, i10);
}
@Override
public void onBackPressed() {
if (C6350m.this.S()) {
super.onBackPressed();
}
}
}
public static final void K(C6350m this$0, com.facebook.S response) {
kotlin.jvm.internal.r.f(this$0, "this$0");
kotlin.jvm.internal.r.f(response, "response");
if (this$0.completed.get()) {
return;
}
C3055y b10 = response.b();
if (b10 == null) {
try {
JSONObject c10 = response.c();
if (c10 == null) {
c10 = new JSONObject();
}
String string = c10.getString("access_token");
kotlin.jvm.internal.r.e(string, "resultObject.getString(\"access_token\")");
this$0.V(string, c10.getLong("expires_in"), Long.valueOf(c10.optLong("data_access_expiration_time")));
return;
} catch (JSONException e10) {
this$0.U(new C3052v(e10));
return;
}
}
int r10 = b10.r();
if (r10 == f62099w || r10 == 1349172) {
this$0.b0();
return;
}
if (r10 != 1349152) {
if (r10 == 1349173) {
this$0.T();
return;
}
C3055y b11 = response.b();
C3052v k10 = b11 == null ? null : b11.k();
if (k10 == null) {
k10 = new C3052v();
}
this$0.U(k10);
return;
}
c cVar = this$0.currentRequestState;
if (cVar != null) {
C4135a c4135a = C4135a.f44469a;
C4135a.a(cVar.d());
}
C6357u.e eVar = this$0.request;
if (eVar != null) {
this$0.e0(eVar);
} else {
this$0.T();
}
}
private final void M(String userId, b permissions, String accessToken, Date expirationTime, Date dataAccessExpirationTime) {
C6351n c6351n = this.deviceAuthMethodHandler;
if (c6351n != null) {
c6351n.K(accessToken, com.facebook.I.m(), userId, permissions.c(), permissions.a(), permissions.b(), EnumC2869h.DEVICE_AUTH, expirationTime, null, dataAccessExpirationTime);
}
Dialog dialog = getDialog();
if (dialog == null) {
return;
}
dialog.dismiss();
}
private final com.facebook.M P() {
Bundle bundle = new Bundle();
c cVar = this.currentRequestState;
bundle.putString(RazorpayModule.MAP_KEY_ERROR_CODE, cVar == null ? null : cVar.c());
bundle.putString("access_token", N());
return com.facebook.M.f29755n.B(null, f62098v, bundle, new M.b() {
@Override
public final void a(com.facebook.S s10) {
C6350m.K(C6350m.this, s10);
}
});
}
public static final void R(C6350m this$0, View view) {
kotlin.jvm.internal.r.f(this$0, "this$0");
this$0.T();
}
private final void V(final String accessToken, long expiresIn, Long dataAccessExpirationTime) {
Bundle bundle = new Bundle();
bundle.putString("fields", "id,permissions,name");
final Date date = null;
final Date date2 = expiresIn != 0 ? new Date(new Date().getTime() + (expiresIn * 1000)) : null;
if ((dataAccessExpirationTime == null || dataAccessExpirationTime.longValue() != 0) && dataAccessExpirationTime != null) {
date = new Date(dataAccessExpirationTime.longValue() * 1000);
}
com.facebook.M x10 = com.facebook.M.f29755n.x(new C2862a(accessToken, com.facebook.I.m(), "0", null, null, null, null, date2, null, date, null, 1024, null), "me", new M.b() {
@Override
public final void a(com.facebook.S s10) {
C6350m.W(C6350m.this, accessToken, date2, date, s10);
}
});
x10.I(com.facebook.T.GET);
x10.J(bundle);
x10.l();
}
public static final void W(C6350m this$0, String accessToken, Date date, Date date2, com.facebook.S response) {
EnumSet m10;
kotlin.jvm.internal.r.f(this$0, "this$0");
kotlin.jvm.internal.r.f(accessToken, "$accessToken");
kotlin.jvm.internal.r.f(response, "response");
if (this$0.completed.get()) {
return;
}
C3055y b10 = response.b();
if (b10 != null) {
C3052v k10 = b10.k();
if (k10 == null) {
k10 = new C3052v();
}
this$0.U(k10);
return;
}
try {
JSONObject c10 = response.c();
if (c10 == null) {
c10 = new JSONObject();
}
String string = c10.getString(Constants.ORDER_ID);
kotlin.jvm.internal.r.e(string, "jsonObject.getString(\"id\")");
b b11 = INSTANCE.b(c10);
String string2 = c10.getString("name");
kotlin.jvm.internal.r.e(string2, "jsonObject.getString(\"name\")");
c cVar = this$0.currentRequestState;
if (cVar != null) {
C4135a c4135a = C4135a.f44469a;
C4135a.a(cVar.d());
}
C4968A c4968a = C4968A.f51190a;
C4994w f10 = C4968A.f(com.facebook.I.m());
Boolean bool = null;
if (f10 != null && (m10 = f10.m()) != null) {
bool = Boolean.valueOf(m10.contains(o5.Q.RequireConfirm));
}
if (!kotlin.jvm.internal.r.b(bool, Boolean.TRUE) || this$0.isRetry) {
this$0.M(string, b11, accessToken, date, date2);
} else {
this$0.isRetry = true;
this$0.Y(string, b11, accessToken, string2, date, date2);
}
} catch (JSONException e10) {
this$0.U(new C3052v(e10));
}
}
private final void X() {
c cVar = this.currentRequestState;
if (cVar != null) {
cVar.g(new Date().getTime());
}
this.currentGraphRequestPoll = P().l();
}
private final void Y(final String userId, final b permissions, final String accessToken, String name, final Date expirationTime, final Date dataAccessExpirationTime) {
String string = getResources().getString(P3.e.f11392g);
kotlin.jvm.internal.r.e(string, "resources.getString(R.string.com_facebook_smart_login_confirmation_title)");
String string2 = getResources().getString(P3.e.f11391f);
kotlin.jvm.internal.r.e(string2, "resources.getString(R.string.com_facebook_smart_login_confirmation_continue_as)");
String string3 = getResources().getString(P3.e.f11390e);
kotlin.jvm.internal.r.e(string3, "resources.getString(R.string.com_facebook_smart_login_confirmation_cancel)");
kotlin.jvm.internal.S s10 = kotlin.jvm.internal.S.f48423a;
String format = String.format(string2, Arrays.copyOf(new Object[]{name}, 1));
kotlin.jvm.internal.r.e(format, "java.lang.String.format(format, *args)");
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setMessage(string).setCancelable(true).setNegativeButton(format, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i10) {
C6350m.Z(C6350m.this, userId, permissions, accessToken, expirationTime, dataAccessExpirationTime, dialogInterface, i10);
}
}).setPositiveButton(string3, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i10) {
C6350m.a0(C6350m.this, dialogInterface, i10);
}
});
builder.create().show();
}
public static final void Z(C6350m this$0, String userId, b permissions, String accessToken, Date date, Date date2, DialogInterface dialogInterface, int i10) {
kotlin.jvm.internal.r.f(this$0, "this$0");
kotlin.jvm.internal.r.f(userId, "$userId");
kotlin.jvm.internal.r.f(permissions, "$permissions");
kotlin.jvm.internal.r.f(accessToken, "$accessToken");
this$0.M(userId, permissions, accessToken, date, date2);
}
public static final void a0(C6350m this$0, DialogInterface dialogInterface, int i10) {
kotlin.jvm.internal.r.f(this$0, "this$0");
View Q10 = this$0.Q(false);
Dialog dialog = this$0.getDialog();
if (dialog != null) {
dialog.setContentView(Q10);
}
C6357u.e eVar = this$0.request;
if (eVar == null) {
return;
}
this$0.e0(eVar);
}
private final void b0() {
c cVar = this.currentRequestState;
Long valueOf = cVar == null ? null : Long.valueOf(cVar.b());
if (valueOf != null) {
this.scheduledPoll = C6351n.f62121e.a().schedule(new Runnable() {
@Override
public final void run() {
C6350m.c0(C6350m.this);
}
}, valueOf.longValue(), TimeUnit.SECONDS);
}
}
public static final void c0(C6350m this$0) {
kotlin.jvm.internal.r.f(this$0, "this$0");
this$0.X();
}
private final void d0(c currentRequestState) {
this.currentRequestState = currentRequestState;
TextView textView = this.confirmationCode;
if (textView == null) {
kotlin.jvm.internal.r.t("confirmationCode");
throw null;
}
textView.setText(currentRequestState.d());
C4135a c4135a = C4135a.f44469a;
BitmapDrawable bitmapDrawable = new BitmapDrawable(getResources(), C4135a.c(currentRequestState.a()));
TextView textView2 = this.instructions;
if (textView2 == null) {
kotlin.jvm.internal.r.t("instructions");
throw null;
}
textView2.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, bitmapDrawable, (Drawable) null, (Drawable) null);
TextView textView3 = this.confirmationCode;
if (textView3 == null) {
kotlin.jvm.internal.r.t("confirmationCode");
throw null;
}
textView3.setVisibility(0);
View view = this.progressBar;
if (view == null) {
kotlin.jvm.internal.r.t("progressBar");
throw null;
}
view.setVisibility(8);
if (!this.isRetry && C4135a.f(currentRequestState.d())) {
new C6236D(getContext()).f("fb_smart_login_service");
}
if (currentRequestState.l()) {
b0();
} else {
X();
}
}
public static final void f0(C6350m this$0, com.facebook.S response) {
kotlin.jvm.internal.r.f(this$0, "this$0");
kotlin.jvm.internal.r.f(response, "response");
if (this$0.isBeingDestroyed) {
return;
}
if (response.b() != null) {
C3055y b10 = response.b();
C3052v k10 = b10 == null ? null : b10.k();
if (k10 == null) {
k10 = new C3052v();
}
this$0.U(k10);
return;
}
JSONObject c10 = response.c();
if (c10 == null) {
c10 = new JSONObject();
}
c cVar = new c();
try {
cVar.k(c10.getString("user_code"));
cVar.j(c10.getString(RazorpayModule.MAP_KEY_ERROR_CODE));
cVar.e(c10.getLong("interval"));
this$0.d0(cVar);
} catch (JSONException e10) {
this$0.U(new C3052v(e10));
}
}
public Map L() {
return null;
}
public String N() {
return Z.b() + '|' + Z.c();
}
protected int O(boolean isSmartLogin) {
return isSmartLogin ? P3.d.f11385d : P3.d.f11383b;
}
protected View Q(boolean isSmartLogin) {
LayoutInflater layoutInflater = requireActivity().getLayoutInflater();
kotlin.jvm.internal.r.e(layoutInflater, "requireActivity().layoutInflater");
View inflate = layoutInflater.inflate(O(isSmartLogin), (ViewGroup) null);
kotlin.jvm.internal.r.e(inflate, "inflater.inflate(getLayoutResId(isSmartLogin), null)");
View findViewById = inflate.findViewById(P3.c.f11381f);
kotlin.jvm.internal.r.e(findViewById, "view.findViewById(R.id.progress_bar)");
this.progressBar = findViewById;
View findViewById2 = inflate.findViewById(P3.c.f11380e);
if (findViewById2 == null) {
throw new NullPointerException("null cannot be cast to non-null type android.widget.TextView");
}
this.confirmationCode = (TextView) findViewById2;
View findViewById3 = inflate.findViewById(P3.c.f11376a);
if (findViewById3 == null) {
throw new NullPointerException("null cannot be cast to non-null type android.widget.Button");
}
((Button) findViewById3).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
C6350m.R(C6350m.this, view);
}
});
View findViewById4 = inflate.findViewById(P3.c.f11377b);
if (findViewById4 == null) {
throw new NullPointerException("null cannot be cast to non-null type android.widget.TextView");
}
TextView textView = (TextView) findViewById4;
this.instructions = textView;
textView.setText(Html.fromHtml(getString(P3.e.f11386a)));
return inflate;
}
protected boolean S() {
return true;
}
protected void T() {
if (this.completed.compareAndSet(false, true)) {
c cVar = this.currentRequestState;
if (cVar != null) {
C4135a c4135a = C4135a.f44469a;
C4135a.a(cVar.d());
}
C6351n c6351n = this.deviceAuthMethodHandler;
if (c6351n != null) {
c6351n.H();
}
Dialog dialog = getDialog();
if (dialog == null) {
return;
}
dialog.dismiss();
}
}
protected void U(C3052v ex) {
kotlin.jvm.internal.r.f(ex, "ex");
if (this.completed.compareAndSet(false, true)) {
c cVar = this.currentRequestState;
if (cVar != null) {
C4135a c4135a = C4135a.f44469a;
C4135a.a(cVar.d());
}
C6351n c6351n = this.deviceAuthMethodHandler;
if (c6351n != null) {
c6351n.I(ex);
}
Dialog dialog = getDialog();
if (dialog == null) {
return;
}
dialog.dismiss();
}
}
public void e0(C6357u.e request) {
kotlin.jvm.internal.r.f(request, "request");
this.request = request;
Bundle bundle = new Bundle();
bundle.putString("scope", TextUtils.join(",", request.t()));
Y y10 = Y.f51271a;
Y.n0(bundle, "redirect_uri", request.l());
Y.n0(bundle, "target_user_id", request.k());
bundle.putString("access_token", N());
C4135a c4135a = C4135a.f44469a;
Map L10 = L();
bundle.putString("device_info", C4135a.d(L10 == null ? null : Th.L.x(L10)));
com.facebook.M.f29755n.B(null, f62097u, bundle, new M.b() {
@Override
public final void a(com.facebook.S s10) {
C6350m.f0(C6350m.this, s10);
}
}).l();
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
d dVar = new d(requireActivity(), P3.f.f11394b);
dVar.setContentView(Q(C4135a.e() && !this.isRetry));
return dVar;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
c cVar;
C6357u I10;
kotlin.jvm.internal.r.f(inflater, "inflater");
View onCreateView = super.onCreateView(inflater, container, savedInstanceState);
y yVar = (y) ((FacebookActivity) requireActivity()).getCurrentFragment();
E e10 = null;
if (yVar != null && (I10 = yVar.I()) != null) {
e10 = I10.m();
}
this.deviceAuthMethodHandler = (C6351n) e10;
if (savedInstanceState != null && (cVar = (c) savedInstanceState.getParcelable("request_state")) != null) {
d0(cVar);
}
return onCreateView;
}
@Override
public void onDestroyView() {
this.isBeingDestroyed = true;
this.completed.set(true);
super.onDestroyView();
com.facebook.P p10 = this.currentGraphRequestPoll;
if (p10 != null) {
p10.cancel(true);
}
ScheduledFuture scheduledFuture = this.scheduledPoll;
if (scheduledFuture == null) {
return;
}
scheduledFuture.cancel(true);
}
@Override
public void onDismiss(DialogInterface dialog) {
kotlin.jvm.internal.r.f(dialog, "dialog");
super.onDismiss(dialog);
if (this.isBeingDestroyed) {
return;
}
T();
}
@Override
public void onSaveInstanceState(Bundle outState) {
kotlin.jvm.internal.r.f(outState, "outState");
super.onSaveInstanceState(outState);
if (this.currentRequestState != null) {
outState.putParcelable("request_state", this.currentRequestState);
}
}
}