CheetahGram v8.5.4版本的 MD5 值为:3d14e79cc242c314d3933620ff3ab030

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


package org.telegram.messenger.p110;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.dynamite.DynamiteModule;
import com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite.ModuleDescriptor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ExecutorService;

public final class gi9 {
    private static volatile gi9 h;
    private final String a;
    protected final xh0 b;
    protected final ExecutorService c;
    private final m9 d;
    private int e;
    private boolean f;
    private volatile sb9 g;

    protected gi9(Context context, String str, String str2, String str3, Bundle bundle) {
        this.a = (str == null || !q(str2, str3)) ? "FA" : str;
        this.b = qu0.d();
        this.c = x99.a().a(new df9(this), 1);
        this.d = new m9(this);
        new ArrayList();
        try {
            if (vp9.a(context, "google_app_id", nk9.a(context)) != null && !m()) {
                this.f = true;
                Log.w(this.a, "Disabling data collection. Found google_app_id in strings.xml but Google Analytics for Firebase is missing. Remove this value or add Google Analytics for Firebase to resume data collection.");
                return;
            }
        } catch (IllegalStateException unused) {
        }
        if (!q(str2, str3)) {
            if (str2 == null || str3 == null) {
                if ((str2 == null) ^ (str3 == null)) {
                    Log.w(this.a, "Specified origin or custom app id is null. Both parameters will be ignored.");
                }
            } else {
                Log.v(this.a, "Deferring to Google Analytics for Firebase for event data collection. https://goo.gl/J1sWQy");
            }
        }
        n(new id9(this, str2, str3, context, bundle));
        Application application = (Application) context.getApplicationContext();
        if (application == null) {
            Log.w(this.a, "Unable to register lifecycle notifications. Application null.");
        } else {
            application.registerActivityLifecycleCallbacks(new di9(this));
        }
    }

    protected static final boolean m() {
        return true;
    }

    public final void n(fg9 fg9Var) {
        this.c.execute(fg9Var);
    }

    public final void o(Exception exc, boolean z, boolean z2) {
        this.f |= z;
        if (z) {
            Log.w(this.a, "Data collection startup failed. No data will be collected.", exc);
            return;
        }
        if (z2) {
            c(5, "Error with data collection. Data lost.", exc, null, null);
        }
        Log.w(this.a, "Error with data collection. Data lost.", exc);
    }

    private final void p(String str, String str2, Bundle bundle, boolean z, boolean z2, Long l) {
        n(new yf9(this, l, str, str2, bundle, z, z2));
    }

    public static final boolean q(String str, String str2) {
        return (str2 == null || str == null || m()) ? false : true;
    }

    public static gi9 r(Context context, String str, String str2, String str3, Bundle bundle) {
        f54.k(context);
        if (h == null) {
            synchronized (gi9.class) {
                if (h == null) {
                    h = new gi9(context, str, str2, str3, bundle);
                }
            }
        }
        return h;
    }

    public final void A(Activity activity, String str, String str2) {
        n(new zc9(this, activity, str, str2));
    }

    public final void B(String str) {
        n(new kd9(this, str));
    }

    public final void C(String str) {
        n(new nd9(this, str));
    }

    public final String D() {
        ca9 ca9Var = new ca9();
        n(new me9(this, ca9Var));
        return ca9Var.I(500L);
    }

    public final String E() {
        ca9 ca9Var = new ca9();
        n(new oe9(this, ca9Var));
        return ca9Var.I(50L);
    }

    public final long F() {
        ca9 ca9Var = new ca9();
        n(new qe9(this, ca9Var));
        Long l = (Long) ca9.N(ca9Var.J(500L), Long.class);
        if (l != null) {
            return l.longValue();
        }
        long nextLong = new Random(System.nanoTime() ^ this.b.a()).nextLong();
        int i = this.e + 1;
        this.e = i;
        return nextLong + i;
    }

    public final String G() {
        ca9 ca9Var = new ca9();
        n(new se9(this, ca9Var));
        return ca9Var.I(500L);
    }

    public final String a() {
        ca9 ca9Var = new ca9();
        n(new ue9(this, ca9Var));
        return ca9Var.I(500L);
    }

    public final Map<String, Object> b(String str, String str2, boolean z) {
        ca9 ca9Var = new ca9();
        n(new we9(this, str, str2, z, ca9Var));
        Bundle J = ca9Var.J(5000L);
        if (J == null || J.size() == 0) {
            return Collections.emptyMap();
        }
        HashMap hashMap = new HashMap(J.size());
        for (String str3 : J.keySet()) {
            Object obj = J.get(str3);
            if ((obj instanceof Double) || (obj instanceof Long) || (obj instanceof String)) {
                hashMap.put(str3, obj);
            }
        }
        return hashMap;
    }

    public final void c(int i, String str, Object obj, Object obj2, Object obj3) {
        n(new ye9(this, false, 5, str, obj, null, null));
    }

    public final int d(String str) {
        ca9 ca9Var = new ca9();
        n(new ff9(this, str, ca9Var));
        Integer num = (Integer) ca9.N(ca9Var.J(10000L), Integer.class);
        if (num == null) {
            return 25;
        }
        return num.intValue();
    }

    public final void e(boolean z) {
        n(new lf9(this, z));
    }

    public final m9 s() {
        return this.d;
    }

    public final sb9 t(Context context, boolean z) {
        try {
            return qb9.asInterface(DynamiteModule.e(context, DynamiteModule.l, ModuleDescriptor.MODULE_ID).d("com.google.android.gms.measurement.internal.AppMeasurementDynamiteService"));
        } catch (DynamiteModule.a e) {
            o(e, true, false);
            return null;
        }
    }

    public final void u(String str, Bundle bundle) {
        p(null, str, bundle, false, true, null);
    }

    public final void v(String str, String str2, Bundle bundle) {
        p(str, str2, bundle, true, true, null);
    }

    public final void w(String str, String str2, Object obj, boolean z) {
        n(new bg9(this, str, str2, obj, z));
    }

    public final void x(Bundle bundle) {
        n(new qc9(this, bundle));
    }

    public final void y(String str, String str2, Bundle bundle) {
        n(new sc9(this, str, str2, bundle));
    }

    public final List<Bundle> z(String str, String str2) {
        ca9 ca9Var = new ca9();
        n(new vc9(this, str, str2, ca9Var));
        List<Bundle> list = (List) ca9.N(ca9Var.J(5000L), List.class);
        return list == null ? Collections.emptyList() : list;
    }
}