TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932

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


package c.f.a.c.j.h;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
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 e0 {
    public static volatile e0 f12870a;
    public static Boolean f12871b;
    public final String f12872c;
    public final c.f.a.c.f.t.d f12873d;
    public final ExecutorService f12874e;
    public final c.f.a.c.k.a.a f12875f;
    public final List<Pair<c.f.a.c.k.b.e6, ?>> f12876g;
    public int f12877h;
    public boolean f12878i;
    public final String f12879j;
    public volatile qd f12880k;

    public e0(Context context, String str, String str2, String str3, Bundle bundle) {
        this.f12872c = (str == null || !s(str2, str3)) ? "FA" : "FA";
        this.f12873d = c.f.a.c.f.t.g.d();
        this.f12874e = t8.a().a(new p(this), 1);
        this.f12875f = new c.f.a.c.k.a.a(this);
        this.f12876g = new ArrayList();
        try {
            if (c.f.a.c.k.b.m7.b(context, "google_app_id", c.f.a.c.k.b.v4.a(context)) != null && !o()) {
                this.f12879j = null;
                this.f12878i = true;
                Log.w(this.f12872c, "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 (s(str2, str3)) {
            this.f12879j = str2;
        } else {
            this.f12879j = "fa";
            if (str2 == null || str3 == null) {
                if ((str2 == null) ^ (str3 == null)) {
                    Log.w(this.f12872c, "Specified origin or custom app id is null. Both parameters will be ignored.");
                }
            } else {
                Log.v(this.f12872c, "Deferring to Google Analytics for Firebase for event data collection. https://goo.gl/J1sWQy");
            }
        }
        p(new f(this, str2, str3, context, bundle));
        Application application = (Application) context.getApplicationContext();
        if (application == null) {
            Log.w(this.f12872c, "Unable to register lifecycle notifications. Application null.");
        } else {
            application.registerActivityLifecycleCallbacks(new d0(this));
        }
    }

    public static void j(Context context) {
        Bundle bundle;
        synchronized (e0.class) {
            try {
            } catch (Exception e2) {
                Log.e("FA", "Exception reading flag from SharedPreferences.", e2);
                f12871b = Boolean.TRUE;
            }
            if (f12871b != null) {
                return;
            }
            c.f.a.c.f.q.o.e("app_measurement_internal_disable_startup_flags");
            try {
                ApplicationInfo c2 = c.f.a.c.f.u.c.a(context).c(context.getPackageName(), 128);
                if (c2 != null && (bundle = c2.metaData) != null) {
                    if (bundle.getBoolean("app_measurement_internal_disable_startup_flags")) {
                        f12871b = Boolean.TRUE;
                        return;
                    }
                }
            } catch (PackageManager.NameNotFoundException unused) {
            }
            SharedPreferences sharedPreferences = context.getSharedPreferences("com.google.android.gms.measurement.prefs", 0);
            f12871b = Boolean.valueOf(sharedPreferences.getBoolean("allow_remote_dynamite", true));
            SharedPreferences.Editor edit = sharedPreferences.edit();
            edit.remove("allow_remote_dynamite");
            edit.apply();
        }
    }

    public static final boolean o() {
        try {
            Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
            return true;
        } catch (ClassNotFoundException unused) {
            return false;
        }
    }

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

    public static e0 t(Context context, String str, String str2, String str3, Bundle bundle) {
        c.f.a.c.f.q.o.i(context);
        if (f12870a == null) {
            synchronized (e0.class) {
                if (f12870a == null) {
                    f12870a = new e0(context, str, str2, str3, bundle);
                }
            }
        }
        return f12870a;
    }

    public final List<Bundle> A(String str, String str2) {
        va vaVar = new va();
        p(new d(this, str, str2, vaVar));
        List<Bundle> list = (List) va.C2(vaVar.A2(5000L), List.class);
        return list == null ? Collections.emptyList() : list;
    }

    public final void B(Activity activity, String str, String str2) {
        p(new e(this, activity, str, str2));
    }

    public final void C(String str) {
        p(new g(this, str));
    }

    public final void D(String str) {
        p(new h(this, str));
    }

    public final String E() {
        va vaVar = new va();
        p(new i(this, vaVar));
        return vaVar.Y0(500L);
    }

    public final String F() {
        va vaVar = new va();
        p(new j(this, vaVar));
        return vaVar.Y0(50L);
    }

    public final long G() {
        va vaVar = new va();
        p(new k(this, vaVar));
        Long l2 = (Long) va.C2(vaVar.A2(500L), Long.class);
        if (l2 == null) {
            long nextLong = new Random(System.nanoTime() ^ this.f12873d.a()).nextLong();
            int i2 = this.f12877h + 1;
            this.f12877h = i2;
            return nextLong + i2;
        }
        return l2.longValue();
    }

    public final String H() {
        va vaVar = new va();
        p(new l(this, vaVar));
        return vaVar.Y0(500L);
    }

    public final String a() {
        va vaVar = new va();
        p(new m(this, vaVar));
        return vaVar.Y0(500L);
    }

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

    public final void c(int i2, String str, Object obj, Object obj2, Object obj3) {
        p(new o(this, false, 5, str, obj, null, null));
    }

    public final int d(String str) {
        va vaVar = new va();
        p(new q(this, str, vaVar));
        Integer num = (Integer) va.C2(vaVar.A2(10000L), Integer.class);
        if (num == null) {
            return 25;
        }
        return num.intValue();
    }

    public final void e(boolean z) {
        p(new r(this, z));
    }

    public final void p(v vVar) {
        this.f12874e.execute(vVar);
    }

    public final void q(Exception exc, boolean z, boolean z2) {
        this.f12878i |= z;
        if (z) {
            Log.w(this.f12872c, "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.f12872c, "Error with data collection. Data lost.", exc);
    }

    public final void r(String str, String str2, Bundle bundle, boolean z, boolean z2, Long l2) {
        p(new t(this, l2, str, str2, bundle, z, z2));
    }

    public final c.f.a.c.k.a.a u() {
        return this.f12875f;
    }

    public final qd v(Context context, boolean z) {
        try {
            return xc.asInterface(DynamiteModule.e(context, z ? DynamiteModule.f23522f : DynamiteModule.f23518b, ModuleDescriptor.MODULE_ID).d("com.google.android.gms.measurement.internal.AppMeasurementDynamiteService"));
        } catch (DynamiteModule.a e2) {
            q(e2, true, false);
            return null;
        }
    }

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

    public final void x(String str, String str2, Object obj, boolean z) {
        p(new u(this, str, str2, obj, z));
    }

    public final void y(Bundle bundle) {
        p(new b(this, bundle));
    }

    public final void z(String str, String str2, Bundle bundle) {
        p(new c(this, str, str2, bundle));
    }
}