Free Fire v1.103.1版本的 MD5 值为:f6c45f9f1485263aa5af0fb400f973fc

以下内容为反编译后的 m.java 源代码,内容仅作参考


package h3;

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 com.facebook.FacebookActivity;
import h2.j0;
import h2.o0;
import h2.p0;
import h3.u;
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 org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import x2.t0;
import x2.u0;
public class m extends androidx.fragment.app.d {
    public static final a M0 = new a(null);
    private static final String N0 = "device/login";
    private static final String O0 = "device/login_status";
    private static final int P0 = 1349174;
    private View B0;
    private TextView C0;
    private TextView D0;
    private n E0;
    private final AtomicBoolean F0 = new AtomicBoolean();
    private volatile h2.m0 G0;
    private volatile ScheduledFuture<?> H0;
    private volatile c I0;
    private boolean J0;
    private boolean K0;
    private u.e L0;

    public static final class a {
        private a() {
        }

        public a(ia.f fVar) {
            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 optString2 = optJSONObject.optString("permission");
                    ia.i.d(optString2, "permission");
                    if (!(optString2.length() == 0) && !ia.i.a(optString2, "installed") && (optString = optJSONObject.optString("status")) != null) {
                        int hashCode = optString.hashCode();
                        if (hashCode != -1309235419) {
                            if (hashCode != 280295099) {
                                if (hashCode == 568196142 && optString.equals("declined")) {
                                    arrayList2.add(optString2);
                                }
                            } else if (optString.equals("granted")) {
                                arrayList.add(optString2);
                            }
                        } else if (optString.equals("expired")) {
                            arrayList3.add(optString2);
                        }
                    }
                    if (i11 >= length) {
                        break;
                    }
                    i10 = i11;
                }
            }
            return new b(arrayList, arrayList2, arrayList3);
        }
    }

    public static final class b {
        private List<String> f8726a;
        private List<String> f8727b;
        private List<String> f8728c;

        public b(List<String> list, List<String> list2, List<String> list3) {
            ia.i.e(list, "grantedPermissions");
            ia.i.e(list2, "declinedPermissions");
            ia.i.e(list3, "expiredPermissions");
            this.f8726a = list;
            this.f8727b = list2;
            this.f8728c = list3;
        }

        public final List<String> a() {
            return this.f8727b;
        }

        public final List<String> b() {
            return this.f8728c;
        }

        public final List<String> c() {
            return this.f8726a;
        }
    }

    public static final class c implements Parcelable {
        private String f8730a;
        private String f8731b;
        private String f8732c;
        private long f8733d;
        private long f8734e;
        public static final b f8729f = new b(null);
        public static final Parcelable.Creator<c> CREATOR = new a();

        public static final class a implements Parcelable.Creator<c> {
            a() {
            }

            @Override
            public c createFromParcel(Parcel parcel) {
                ia.i.e(parcel, "parcel");
                return new c(parcel);
            }

            @Override
            public c[] newArray(int i10) {
                return new c[i10];
            }
        }

        public static final class b {
            private b() {
            }

            public b(ia.f fVar) {
                this();
            }
        }

        public c() {
        }

        protected c(Parcel parcel) {
            ia.i.e(parcel, "parcel");
            this.f8730a = parcel.readString();
            this.f8731b = parcel.readString();
            this.f8732c = parcel.readString();
            this.f8733d = parcel.readLong();
            this.f8734e = parcel.readLong();
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public final String f() {
            return this.f8730a;
        }

        public final long h() {
            return this.f8733d;
        }

        public final String k() {
            return this.f8732c;
        }

        public final String m() {
            return this.f8731b;
        }

        public final void n(long j10) {
            this.f8733d = j10;
        }

        public final void o(long j10) {
            this.f8734e = j10;
        }

        public final void p(String str) {
            this.f8732c = str;
        }

        public final void r(String str) {
            this.f8731b = str;
            ia.n nVar = ia.n.f9196a;
            String format = String.format(Locale.ENGLISH, "https://facebook.com/device?user_code=%1$s&qr=1", Arrays.copyOf(new Object[]{str}, 1));
            ia.i.d(format, "java.lang.String.format(locale, format, *args)");
            this.f8730a = format;
        }

        public final boolean s() {
            return this.f8734e != 0 && (new Date().getTime() - this.f8734e) - (this.f8733d * 1000) < 0;
        }

        @Override
        public void writeToParcel(Parcel parcel, int i10) {
            ia.i.e(parcel, "dest");
            parcel.writeString(this.f8730a);
            parcel.writeString(this.f8731b);
            parcel.writeString(this.f8732c);
            parcel.writeLong(this.f8733d);
            parcel.writeLong(this.f8734e);
        }
    }

    public static final class d extends Dialog {
        d(androidx.fragment.app.e eVar, int i10) {
            super(eVar, i10);
        }

        @Override
        public void onBackPressed() {
            if (m.this.o2()) {
                super.onBackPressed();
            }
        }
    }

    public static final void B2(m mVar, o0 o0Var) {
        ia.i.e(mVar, "this$0");
        ia.i.e(o0Var, "response");
        if (mVar.J0) {
            return;
        }
        if (o0Var.b() != null) {
            h2.v b10 = o0Var.b();
            h2.s n10 = b10 == null ? null : b10.n();
            if (n10 == null) {
                n10 = new h2.s();
            }
            mVar.q2(n10);
            return;
        }
        JSONObject c10 = o0Var.c();
        if (c10 == null) {
            c10 = new JSONObject();
        }
        c cVar = new c();
        try {
            cVar.r(c10.getString("user_code"));
            cVar.p(c10.getString("code"));
            cVar.n(c10.getLong("interval"));
            mVar.z2(cVar);
        } catch (JSONException e10) {
            mVar.q2(new h2.s(e10));
        }
    }

    public static final void g2(m mVar, o0 o0Var) {
        ia.i.e(mVar, "this$0");
        ia.i.e(o0Var, "response");
        if (mVar.F0.get()) {
            return;
        }
        h2.v b10 = o0Var.b();
        if (b10 == null) {
            try {
                JSONObject c10 = o0Var.c();
                if (c10 == null) {
                    c10 = new JSONObject();
                }
                String string = c10.getString("access_token");
                ia.i.d(string, "resultObject.getString(\"access_token\")");
                mVar.r2(string, c10.getLong("expires_in"), Long.valueOf(c10.optLong("data_access_expiration_time")));
                return;
            } catch (JSONException e10) {
                mVar.q2(new h2.s(e10));
                return;
            }
        }
        int p10 = b10.p();
        boolean z10 = true;
        if (p10 != P0 && p10 != 1349172) {
            z10 = false;
        }
        if (z10) {
            mVar.x2();
            return;
        }
        if (p10 == 1349152) {
            c cVar = mVar.I0;
            if (cVar != null) {
                w2.a aVar = w2.a.f13797a;
                w2.a.a(cVar.m());
            }
            u.e eVar = mVar.L0;
            if (eVar != null) {
                mVar.A2(eVar);
                return;
            }
        } else if (p10 != 1349173) {
            h2.v b11 = o0Var.b();
            h2.s n10 = b11 == null ? null : b11.n();
            if (n10 == null) {
                n10 = new h2.s();
            }
            mVar.q2(n10);
            return;
        }
        mVar.p2();
    }

    private final void i2(String str, b bVar, String str2, Date date, Date date2) {
        n nVar = this.E0;
        if (nVar != null) {
            nVar.M(str2, h2.f0.m(), str, bVar.c(), bVar.a(), bVar.b(), h2.h.DEVICE_AUTH, date, null, date2);
        }
        Dialog Q1 = Q1();
        if (Q1 == null) {
            return;
        }
        Q1.dismiss();
    }

    private final h2.j0 l2() {
        Bundle bundle = new Bundle();
        c cVar = this.I0;
        bundle.putString("code", cVar == null ? null : cVar.k());
        bundle.putString("access_token", j2());
        return h2.j0.f8485n.B(null, O0, bundle, new j0.b() {
            @Override
            public final void b(o0 o0Var) {
                m.g2(m.this, o0Var);
            }
        });
    }

    public static final void n2(m mVar, View view) {
        ia.i.e(mVar, "this$0");
        mVar.p2();
    }

    private final void r2(final String str, long j10, Long l10) {
        Bundle bundle = new Bundle();
        bundle.putString("fields", "id,permissions,name");
        final Date date = null;
        final Date date2 = j10 != 0 ? new Date(new Date().getTime() + (j10 * 1000)) : null;
        if ((l10 == null || l10.longValue() != 0) && l10 != null) {
            date = new Date(l10.longValue() * 1000);
        }
        h2.j0 x10 = h2.j0.f8485n.x(new h2.a(str, h2.f0.m(), "0", null, null, null, null, date2, null, date, null, 1024, null), "me", new j0.b() {
            @Override
            public final void b(o0 o0Var) {
                m.s2(m.this, str, date2, date, o0Var);
            }
        });
        x10.G(p0.GET);
        x10.H(bundle);
        x10.l();
    }

    public static final void s2(m mVar, String str, Date date, Date date2, o0 o0Var) {
        EnumSet<x2.o0> m10;
        ia.i.e(mVar, "this$0");
        ia.i.e(str, "$accessToken");
        ia.i.e(o0Var, "response");
        if (mVar.F0.get()) {
            return;
        }
        h2.v b10 = o0Var.b();
        if (b10 != null) {
            h2.s n10 = b10.n();
            if (n10 == null) {
                n10 = new h2.s();
            }
            mVar.q2(n10);
            return;
        }
        try {
            JSONObject c10 = o0Var.c();
            if (c10 == null) {
                c10 = new JSONObject();
            }
            String string = c10.getString("id");
            ia.i.d(string, "jsonObject.getString(\"id\")");
            b b11 = M0.b(c10);
            String string2 = c10.getString("name");
            ia.i.d(string2, "jsonObject.getString(\"name\")");
            c cVar = mVar.I0;
            if (cVar != null) {
                w2.a aVar = w2.a.f13797a;
                w2.a.a(cVar.m());
            }
            x2.a0 a0Var = x2.a0.f14169a;
            x2.w f10 = x2.a0.f(h2.f0.m());
            Boolean bool = null;
            if (f10 != null && (m10 = f10.m()) != null) {
                bool = Boolean.valueOf(m10.contains(x2.o0.RequireConfirm));
            }
            if (!ia.i.a(bool, Boolean.TRUE) || mVar.K0) {
                mVar.i2(string, b11, str, date, date2);
                return;
            }
            mVar.K0 = true;
            mVar.u2(string, b11, str, string2, date, date2);
        } catch (JSONException e10) {
            mVar.q2(new h2.s(e10));
        }
    }

    private final void t2() {
        c cVar = this.I0;
        if (cVar != null) {
            cVar.o(new Date().getTime());
        }
        this.G0 = l2().l();
    }

    private final void u2(final String str, final b bVar, final String str2, String str3, final Date date, final Date date2) {
        String string = M().getString(v2.d.f13592g);
        ia.i.d(string, "resources.getString(R.string.com_facebook_smart_login_confirmation_title)");
        String string2 = M().getString(v2.d.f13591f);
        ia.i.d(string2, "resources.getString(R.string.com_facebook_smart_login_confirmation_continue_as)");
        String string3 = M().getString(v2.d.f13590e);
        ia.i.d(string3, "resources.getString(R.string.com_facebook_smart_login_confirmation_cancel)");
        ia.n nVar = ia.n.f9196a;
        String format = String.format(string2, Arrays.copyOf(new Object[]{str3}, 1));
        ia.i.d(format, "java.lang.String.format(format, *args)");
        AlertDialog.Builder builder = new AlertDialog.Builder(t());
        builder.setMessage(string).setCancelable(true).setNegativeButton(format, new DialogInterface.OnClickListener() {
            @Override
            public final void onClick(DialogInterface dialogInterface, int i10) {
                m.v2(m.this, str, bVar, str2, date, date2, dialogInterface, i10);
            }
        }).setPositiveButton(string3, new DialogInterface.OnClickListener() {
            @Override
            public final void onClick(DialogInterface dialogInterface, int i10) {
                m.w2(m.this, dialogInterface, i10);
            }
        });
        builder.create().show();
    }

    public static final void v2(m mVar, String str, b bVar, String str2, Date date, Date date2, DialogInterface dialogInterface, int i10) {
        ia.i.e(mVar, "this$0");
        ia.i.e(str, "$userId");
        ia.i.e(bVar, "$permissions");
        ia.i.e(str2, "$accessToken");
        mVar.i2(str, bVar, str2, date, date2);
    }

    public static final void w2(m mVar, DialogInterface dialogInterface, int i10) {
        ia.i.e(mVar, "this$0");
        View m22 = mVar.m2(false);
        Dialog Q1 = mVar.Q1();
        if (Q1 != null) {
            Q1.setContentView(m22);
        }
        u.e eVar = mVar.L0;
        if (eVar == null) {
            return;
        }
        mVar.A2(eVar);
    }

    private final void x2() {
        c cVar = this.I0;
        Long valueOf = cVar == null ? null : Long.valueOf(cVar.h());
        if (valueOf != null) {
            this.H0 = n.f8738e.a().schedule(new Runnable() {
                @Override
                public final void run() {
                    m.y2(m.this);
                }
            }, valueOf.longValue(), TimeUnit.SECONDS);
        }
    }

    public static final void y2(m mVar) {
        ia.i.e(mVar, "this$0");
        mVar.t2();
    }

    private final void z2(c cVar) {
        this.I0 = cVar;
        TextView textView = this.C0;
        if (textView == null) {
            ia.i.r("confirmationCode");
            throw null;
        }
        textView.setText(cVar.m());
        w2.a aVar = w2.a.f13797a;
        BitmapDrawable bitmapDrawable = new BitmapDrawable(M(), w2.a.c(cVar.f()));
        TextView textView2 = this.D0;
        if (textView2 == null) {
            ia.i.r("instructions");
            throw null;
        }
        textView2.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, bitmapDrawable, (Drawable) null, (Drawable) null);
        TextView textView3 = this.C0;
        if (textView3 == null) {
            ia.i.r("confirmationCode");
            throw null;
        }
        textView3.setVisibility(0);
        View view = this.B0;
        if (view == null) {
            ia.i.r("progressBar");
            throw null;
        }
        view.setVisibility(8);
        if (!this.K0 && w2.a.f(cVar.m())) {
            new i2.e0(t()).f("fb_smart_login_service");
        }
        if (cVar.s()) {
            x2();
        } else {
            t2();
        }
    }

    public void A2(u.e eVar) {
        ia.i.e(eVar, "request");
        this.L0 = eVar;
        Bundle bundle = new Bundle();
        bundle.putString("scope", TextUtils.join(",", eVar.y()));
        t0 t0Var = t0.f14355a;
        t0.s0(bundle, "redirect_uri", eVar.r());
        t0.s0(bundle, "target_user_id", eVar.p());
        bundle.putString("access_token", j2());
        w2.a aVar = w2.a.f13797a;
        Map<String, String> h22 = h2();
        bundle.putString("device_info", w2.a.d(h22 == null ? null : y9.c0.o(h22)));
        h2.j0.f8485n.B(null, N0, bundle, new j0.b() {
            @Override
            public final void b(o0 o0Var) {
                m.B2(m.this, o0Var);
            }
        }).l();
    }

    @Override
    public void M0(Bundle bundle) {
        ia.i.e(bundle, "outState");
        super.M0(bundle);
        if (this.I0 != null) {
            bundle.putParcelable("request_state", this.I0);
        }
    }

    @Override
    public Dialog S1(Bundle bundle) {
        d dVar = new d(s1(), v2.e.f13594b);
        dVar.setContentView(m2(w2.a.e() && !this.K0));
        return dVar;
    }

    public Map<String, String> h2() {
        return null;
    }

    public String j2() {
        return u0.b() + '|' + u0.c();
    }

    protected int k2(boolean z10) {
        return z10 ? v2.c.f13585d : v2.c.f13583b;
    }

    protected View m2(boolean z10) {
        LayoutInflater layoutInflater = s1().getLayoutInflater();
        ia.i.d(layoutInflater, "requireActivity().layoutInflater");
        View inflate = layoutInflater.inflate(k2(z10), (ViewGroup) null);
        ia.i.d(inflate, "inflater.inflate(getLayoutResId(isSmartLogin), null)");
        View findViewById = inflate.findViewById(v2.b.f13581f);
        ia.i.d(findViewById, "view.findViewById(R.id.progress_bar)");
        this.B0 = findViewById;
        View findViewById2 = inflate.findViewById(v2.b.f13580e);
        if (findViewById2 != null) {
            this.C0 = (TextView) findViewById2;
            View findViewById3 = inflate.findViewById(v2.b.f13576a);
            if (findViewById3 != null) {
                ((Button) findViewById3).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public final void onClick(View view) {
                        m.n2(m.this, view);
                    }
                });
                View findViewById4 = inflate.findViewById(v2.b.f13577b);
                if (findViewById4 != null) {
                    TextView textView = (TextView) findViewById4;
                    this.D0 = textView;
                    textView.setText(Html.fromHtml(T(v2.d.f13586a)));
                    return inflate;
                }
                throw new NullPointerException("null cannot be cast to non-null type android.widget.TextView");
            }
            throw new NullPointerException("null cannot be cast to non-null type android.widget.Button");
        }
        throw new NullPointerException("null cannot be cast to non-null type android.widget.TextView");
    }

    protected boolean o2() {
        return true;
    }

    @Override
    public void onDismiss(DialogInterface dialogInterface) {
        ia.i.e(dialogInterface, "dialog");
        super.onDismiss(dialogInterface);
        if (this.J0) {
            return;
        }
        p2();
    }

    protected void p2() {
        if (this.F0.compareAndSet(false, true)) {
            c cVar = this.I0;
            if (cVar != null) {
                w2.a aVar = w2.a.f13797a;
                w2.a.a(cVar.m());
            }
            n nVar = this.E0;
            if (nVar != null) {
                nVar.I();
            }
            Dialog Q1 = Q1();
            if (Q1 == null) {
                return;
            }
            Q1.dismiss();
        }
    }

    protected void q2(h2.s sVar) {
        ia.i.e(sVar, "ex");
        if (this.F0.compareAndSet(false, true)) {
            c cVar = this.I0;
            if (cVar != null) {
                w2.a aVar = w2.a.f13797a;
                w2.a.a(cVar.m());
            }
            n nVar = this.E0;
            if (nVar != null) {
                nVar.L(sVar);
            }
            Dialog Q1 = Q1();
            if (Q1 == null) {
                return;
            }
            Q1.dismiss();
        }
    }

    @Override
    public View u0(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        c cVar;
        u T1;
        ia.i.e(layoutInflater, "inflater");
        View u02 = super.u0(layoutInflater, viewGroup, bundle);
        y yVar = (y) ((FacebookActivity) s1()).B();
        e0 e0Var = null;
        if (yVar != null && (T1 = yVar.T1()) != null) {
            e0Var = T1.t();
        }
        this.E0 = (n) e0Var;
        if (bundle != null && (cVar = (c) bundle.getParcelable("request_state")) != null) {
            z2(cVar);
        }
        return u02;
    }

    @Override
    public void x0() {
        this.J0 = true;
        this.F0.set(true);
        super.x0();
        h2.m0 m0Var = this.G0;
        if (m0Var != null) {
            m0Var.cancel(true);
        }
        ScheduledFuture<?> scheduledFuture = this.H0;
        if (scheduledFuture == null) {
            return;
        }
        scheduledFuture.cancel(true);
    }
}