导航菜单

页面标题

页面副标题

Tuna Cash v1.0.0 - LLiIl.java 源代码

正在查看: Tuna Cash v1.0.0 应用的 LLiIl.java JAVA 源代码文件

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


package LLLLI;

import IIIlL.IILlL;
import LiIil.lLILl;
import LliIl.lIiiLli;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import iliLi.IILliLL;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import lLLIl.IlllLLl;
import lLLLlLI.iiILI;
import lLllI.liIiIiI;
import liIIiIL.ILLiI;
import llLil.IlIlliI;
import lliLl.IiILLi;
import lliLl.LILli;
import lliLl.LlLiILL;
import lliLl.LlLlL;
import lliLl.LllLii;
import lliLl.iliilLi;
import org.json.JSONException;
import org.json.JSONObject;

public final class LLiIl implements iliLLil {
    public static final Object lLILl = new Object();
    public final ExecutorService IILii;
    public final ArrayList IiLIL;
    public final Object IiLlI;
    public String LILlLi;
    public final lLlILil.IiLIL LLiIl;
    public final HashSet iLLLl;
    public final Executor iiIiiI;
    public final iiIiiI ilLll;
    public final IiLIL iliLLil;
    public final LlLlL lIliL;
    public final lIiiLli lLILIl;
    public final IILlL llLii;

    static {
        new AtomicInteger(1);
    }

    public LLiIl(lIiiLli liiilli, Lillll.llLii lllii, ExecutorService executorService, iiILI iiili) {
        liiilli.lLILIl();
        LlLlL llLlL = new LlLlL(liiilli.lLILIl, lllii);
        lLlILil.IiLIL iiLIL = new lLlILil.IiLIL(liiilli, 24);
        IiLIL lLILIl = IiLIL.lLILIl();
        IILlL iILlL = new IILlL(new IIIlL.ilLll(liiilli, 2));
        iiIiiI iiiiii = new iiIiiI();
        this.IiLlI = new Object();
        this.iLLLl = new HashSet();
        this.IiLIL = new ArrayList();
        this.lLILIl = liiilli;
        this.lIliL = llLlL;
        this.LLiIl = iiLIL;
        this.iliLLil = lLILIl;
        this.llLii = iILlL;
        this.ilLll = iiiiii;
        this.IILii = executorService;
        this.iiIiiI = iiili;
    }

    public final java.lang.String IILii(lLLIllI.lLILIl r3) {
        throw new UnsupportedOperationException("Method not decompiled: LLLLI.LLiIl.IILii(lLLIllI.lLILIl):java.lang.String");
    }

    public final synchronized void IiLIL(String str) {
        this.LILlLi = str;
    }

    public final void IiLlI() {
        lIiiLli liiilli = this.lLILIl;
        liiilli.lLILIl();
        IlIlliI.IiLIL("Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", liiilli.LLiIl.lIliL);
        liiilli.lLILIl();
        IlIlliI.IiLIL("Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", liiilli.LLiIl.IiLlI);
        liiilli.lLILIl();
        IlIlliI.IiLIL("Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.", liiilli.LLiIl.lLILIl);
        liiilli.lLILIl();
        String str = liiilli.LLiIl.lIliL;
        Pattern pattern = IiLIL.LLiIl;
        IlIlliI.IiLlI("Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", str.contains(":"));
        liiilli.lLILIl();
        IlIlliI.IiLlI("Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.", IiLIL.LLiIl.matcher(liiilli.LLiIl.lLILIl).matches());
    }

    public final void LILlLi(Exception exc) {
        synchronized (this.IiLlI) {
            try {
                Iterator it = this.IiLIL.iterator();
                while (it.hasNext()) {
                    if (((LILlLi) it.next()).onException(exc)) {
                        it.remove();
                    }
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public final lLLIllI.lLILIl LLiIl(lLLIllI.lLILIl llilil) {
        StringBuilder sb;
        int responseCode;
        LILli ilLll;
        lIiiLli liiilli = this.lLILIl;
        liiilli.lLILIl();
        String str = liiilli.LLiIl.lLILIl;
        liiilli.lLILIl();
        String str2 = liiilli.LLiIl.IiLlI;
        String str3 = llilil.llLii;
        LlLlL llLlL = this.lIliL;
        LlLiILL llLiILL = llLlL.LLiIl;
        boolean lIliL = llLiILL.lIliL();
        llLii lllii = llLii.iiILI;
        if (!lIliL) {
            throw new ilLll("Firebase Installations Service is unavailable. Please try again later.", lllii);
        }
        URL lLILIl = LlLlL.lLILIl(String.format("projects/%s/installations/%s/authTokens:generate", str2, llilil.lIliL));
        for (int i = 0; i <= 1; i++) {
            TrafficStats.setThreadStatsTag(32771);
            HttpURLConnection LLiIl = llLlL.LLiIl(lLILIl, str);
            try {
                try {
                    LLiIl.setRequestMethod("POST");
                    sb = new StringBuilder();
                } catch (IOException | AssertionError unused) {
                }
                try {
                    sb.append("FIS_v2 ");
                    sb.append(str3);
                    LLiIl.addRequestProperty("Authorization", sb.toString());
                    LLiIl.setDoOutput(true);
                    LlLlL.IILii(LLiIl);
                    responseCode = LLiIl.getResponseCode();
                    llLiILL.iliLLil(responseCode);
                } catch (IOException | AssertionError unused2) {
                    LLiIl.disconnect();
                    TrafficStats.clearThreadStatsTag();
                }
                if (responseCode >= 200 && responseCode < 300) {
                    ilLll = LlLlL.ilLll(LLiIl);
                } else {
                    LlLlL.lIliL(LLiIl, null, str, str2);
                    if (responseCode == 401 || responseCode == 404) {
                        LlLlL.lIliL lLILIl2 = LILli.lLILIl();
                        lLILIl2.liLILi = IiILLi.ILLiI;
                        ilLll = lLILIl2.LLILli();
                    } else {
                        if (responseCode == 429) {
                            throw new ilLll("Firebase servers have received too many requests from this client in a short period of time. Please try again later.", llLii.ILLiI);
                        }
                        if (responseCode < 500 || responseCode >= 600) {
                            Log.e("Firebase-Installations", "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
                            LlLlL.lIliL lLILIl3 = LILli.lLILIl();
                            lLILIl3.liLILi = IiILLi.iiILI;
                            ilLll = lLILIl3.LLILli();
                        } else {
                            LLiIl.disconnect();
                            TrafficStats.clearThreadStatsTag();
                        }
                    }
                }
                LLiIl.disconnect();
                TrafficStats.clearThreadStatsTag();
                int ordinal = ilLll.LLiIl.ordinal();
                if (ordinal == 0) {
                    IiLIL iiLIL = this.iliLLil;
                    iiLIL.getClass();
                    TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                    iiLIL.lLILIl.getClass();
                    long seconds = timeUnit.toSeconds(System.currentTimeMillis());
                    liIiIiI lLILIl4 = llilil.lLILIl();
                    lLILIl4.LLiIl = ilLll.lLILIl;
                    lLILIl4.llLii = Long.valueOf(ilLll.lIliL);
                    lLILIl4.ilLll = Long.valueOf(seconds);
                    return lLILIl4.LLiIl();
                }
                if (ordinal == 1) {
                    liIiIiI lLILIl5 = llilil.lLILIl();
                    lLILIl5.IiLlI = "BAD CONFIG";
                    lLILIl5.iiILI(lLLIllI.LLiIl.lIIiL);
                    return lLILIl5.LLiIl();
                }
                if (ordinal != 2) {
                    throw new ilLll("Firebase Installations Service is unavailable. Please try again later.", lllii);
                }
                IiLIL(null);
                liIiIiI lLILIl6 = llilil.lLILIl();
                lLILIl6.iiILI(lLLIllI.LLiIl.iiILI);
                return lLILIl6.LLiIl();
            } catch (Throwable th) {
                LLiIl.disconnect();
                TrafficStats.clearThreadStatsTag();
                throw th;
            }
        }
        throw new ilLll("Firebase Installations Service is unavailable. Please try again later.", lllii);
    }

    public final void iLLLl(lLLIllI.lLILIl llilil) {
        synchronized (this.IiLlI) {
            try {
                Iterator it = this.IiLIL.iterator();
                while (it.hasNext()) {
                    if (((LILlLi) it.next()).onStateReached(llilil)) {
                        it.remove();
                    }
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public final lLLIllI.lLILIl iiIiiI(lLLIllI.lLILIl llilil) {
        String str;
        HttpURLConnection httpURLConnection;
        int i;
        URL url;
        String str2;
        llLii lllii;
        Object obj;
        int responseCode;
        int i2;
        LllLii lllLii;
        String str3;
        String str4 = llilil.lIliL;
        if (str4 == null || str4.length() != 11) {
            str = null;
        } else {
            lLLIllI.lIliL lilil = (lLLIllI.lIliL) this.llLii.get();
            synchronized (lilil.lLILIl) {
                try {
                    String[] strArr = lLLIllI.lIliL.LLiIl;
                    int i3 = 0;
                    while (true) {
                        if (i3 >= 4) {
                            str3 = null;
                            break;
                        }
                        String str5 = strArr[i3];
                        str3 = lilil.lLILIl.getString("|T|" + lilil.lIliL + "|" + str5, null);
                        if (str3 == null || str3.isEmpty()) {
                            i3++;
                        } else if (str3.startsWith("{")) {
                            try {
                                str3 = new JSONObject(str3).getString("token");
                            } catch (JSONException unused) {
                                str3 = null;
                            }
                        }
                    }
                } finally {
                }
            }
            str = str3;
        }
        LlLlL llLlL = this.lIliL;
        lIiiLli liiilli = this.lLILIl;
        liiilli.lLILIl();
        String str6 = liiilli.LLiIl.lLILIl;
        String str7 = llilil.lIliL;
        lIiiLli liiilli2 = this.lLILIl;
        liiilli2.lLILIl();
        String str8 = liiilli2.LLiIl.IiLlI;
        lIiiLli liiilli3 = this.lLILIl;
        liiilli3.lLILIl();
        String str9 = liiilli3.LLiIl.lIliL;
        LlLiILL llLiILL = llLlL.LLiIl;
        boolean lIliL = llLiILL.lIliL();
        llLii lllii2 = llLii.iiILI;
        String str10 = "Firebase Installations Service is unavailable. Please try again later.";
        if (!lIliL) {
            throw new ilLll("Firebase Installations Service is unavailable. Please try again later.", lllii2);
        }
        URL lLILIl = LlLlL.lLILIl(String.format("projects/%s/installations", str8));
        int i4 = 0;
        for (?? r6 = 1; i4 <= r6; r6 = 1) {
            TrafficStats.setThreadStatsTag(32769);
            HttpURLConnection LLiIl = llLlL.LLiIl(lLILIl, str6);
            try {
                try {
                    LLiIl.setRequestMethod("POST");
                    LLiIl.setDoOutput(r6);
                    if (str != null) {
                        LLiIl.addRequestProperty("x-goog-fis-android-iid-migration-auth", str);
                    }
                    LlLlL.IiLlI(LLiIl, str7, str9);
                    responseCode = LLiIl.getResponseCode();
                    llLiILL.iliLLil(responseCode);
                } catch (Throwable th) {
                    th = th;
                    httpURLConnection = LLiIl;
                }
            } catch (IOException | AssertionError unused2) {
                httpURLConnection = LLiIl;
                i = i4;
                url = lLILIl;
                str2 = str10;
                lllii = lllii2;
                obj = null;
            }
            if (responseCode < 200 || responseCode >= 300) {
                LlLlL.lIliL(LLiIl, str9, str6, str8);
                try {
                    try {
                    } catch (Throwable th2) {
                        th = th2;
                        httpURLConnection.disconnect();
                        TrafficStats.clearThreadStatsTag();
                        throw th;
                    }
                } catch (IOException | AssertionError unused3) {
                    httpURLConnection.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i4 = i + 1;
                    lLILIl = url;
                    str10 = str2;
                    lllii2 = lllii;
                }
                if (responseCode == 429) {
                    throw new ilLll("Firebase servers have received too many requests from this client in a short period of time. Please try again later.", llLii.ILLiI);
                }
                if (responseCode < 500 || responseCode >= 600) {
                    Log.e("Firebase-Installations", "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
                    i2 = 1;
                    LllLii lllLii2 = new LllLii(null, null, null, null, iliilLi.iiILI);
                    LLiIl.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    lllLii = lllLii2;
                } else {
                    LLiIl.disconnect();
                    TrafficStats.clearThreadStatsTag();
                    i = i4;
                    url = lLILIl;
                    str2 = str10;
                    lllii = lllii2;
                    obj = null;
                    i4 = i + 1;
                    lLILIl = url;
                    str10 = str2;
                    lllii2 = lllii;
                }
            } else {
                lllLii = LlLlL.llLii(LLiIl);
                LLiIl.disconnect();
                TrafficStats.clearThreadStatsTag();
                i2 = 1;
            }
            int ordinal = lllLii.llLii.ordinal();
            if (ordinal != 0) {
                if (ordinal != i2) {
                    throw new ilLll("Firebase Installations Service is unavailable. Please try again later.", llLii.iiILI);
                }
                liIiIiI lLILIl2 = llilil.lLILIl();
                lLILIl2.IiLlI = "BAD CONFIG";
                lLILIl2.iiILI(lLLIllI.LLiIl.lIIiL);
                return lLILIl2.LLiIl();
            }
            String str11 = lllLii.lIliL;
            String str12 = lllLii.LLiIl;
            IiLIL iiLIL = this.iliLLil;
            iiLIL.getClass();
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            iiLIL.lLILIl.getClass();
            long seconds = timeUnit.toSeconds(System.currentTimeMillis());
            LILli lILli = lllLii.iliLLil;
            String str13 = lILli.lLILIl;
            long j = lILli.lIliL;
            liIiIiI lLILIl3 = llilil.lLILIl();
            lLILIl3.lLILIl = str11;
            lLILIl3.iiILI(lLLIllI.LLiIl.liLILi);
            lLILIl3.LLiIl = str13;
            lLILIl3.iliLLil = str12;
            lLILIl3.llLii = Long.valueOf(j);
            lLILIl3.ilLll = Long.valueOf(seconds);
            return lLILIl3.LLiIl();
        }
        throw new ilLll(str10, lllii2);
    }

    public final void ilLll(lLLIllI.lLILIl llilil) {
        synchronized (lLILl) {
            try {
                lIiiLli liiilli = this.lLILIl;
                liiilli.lLILIl();
                lLlILil.IiLIL lIliL = lLlILil.IiLIL.lIliL(liiilli.lLILIl);
                try {
                    this.LLiIl.IILii(llilil);
                    if (lIliL != null) {
                        lIliL.IiLIL();
                    }
                } catch (Throwable th) {
                    if (lIliL != null) {
                        lIliL.IiLIL();
                    }
                    throw th;
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
    }

    public final LiIil.LlLlL iliLLil() {
        String str;
        IiLlI();
        synchronized (this) {
            str = this.LILlLi;
        }
        if (str != null) {
            return LiLlL.IiLlI.LlLiILL(str);
        }
        lLILl llill = new lLILl();
        lLILIl(new IILii(llill));
        LiIil.LlLlL llLlL = llill.lLILIl;
        this.IILii.execute(new IILliLL(this, 19));
        return llLlL;
    }

    public final void lIliL(boolean z) {
        lLLIllI.lLILIl iLLLl;
        synchronized (lLILl) {
            try {
                lIiiLli liiilli = this.lLILIl;
                liiilli.lLILIl();
                lLlILil.IiLIL lIliL = lLlILil.IiLIL.lIliL(liiilli.lLILIl);
                try {
                    iLLLl = this.LLiIl.iLLLl();
                    lLLIllI.LLiIl lLiIl = lLLIllI.LLiIl.iiILI;
                    lLLIllI.LLiIl lLiIl2 = iLLLl.LLiIl;
                    if (lLiIl2 == lLiIl || lLiIl2 == lLLIllI.LLiIl.lLlii) {
                        String IILii = IILii(iLLLl);
                        lLlILil.IiLIL iiLIL = this.LLiIl;
                        liIiIiI lLILIl = iLLLl.lLILIl();
                        lLILIl.lLILIl = IILii;
                        lLILIl.iiILI(lLLIllI.LLiIl.ILLiI);
                        iLLLl = lLILIl.LLiIl();
                        iiLIL.IILii(iLLLl);
                    }
                    if (lIliL != null) {
                        lIliL.IiLIL();
                    }
                } catch (Throwable th) {
                    if (lIliL != null) {
                        lIliL.IiLIL();
                    }
                    throw th;
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
        if (z) {
            liIiIiI lLILIl2 = iLLLl.lLILIl();
            lLILIl2.LLiIl = null;
            iLLLl = lLILIl2.LLiIl();
        }
        iLLLl(iLLLl);
        this.iiIiiI.execute(new lIliL(this, z, 1));
    }

    public final void lLILIl(LILlLi lILlLi) {
        synchronized (this.IiLlI) {
            this.IiLIL.add(lILlLi);
        }
    }

    public final synchronized void lLILl(lLLIllI.lLILIl llilil, lLLIllI.lLILIl llilil2) {
        if (this.iLLLl.size() != 0 && !TextUtils.equals(llilil.lIliL, llilil2.lIliL)) {
            Iterator it = this.iLLLl.iterator();
            if (it.hasNext()) {
                IlllLLl.iLLLl(it.next());
                throw null;
            }
        }
    }

    public final LiIil.LlLlL llLii() {
        IiLlI();
        lLILl llill = new lLILl();
        lLILIl(new IiLlI(this.iliLLil, llill));
        this.IILii.execute(new lIliL(this, false, 0 == true ? 1 : 0));
        return llill.lLILIl;
    }

    @Override
    public final synchronized ILLiI registerFidListener(liIIiIL.iiILI iiili) {
        this.iLLLl.add(null);
        return new lLlILil.IiLIL(this, (Object) null, 23);
    }
}