漫漫擼2 v1.3.9版本的 MD5 值为:e07b15db49ff38b958ff7c8268ff1c9b

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


package g.i.a.d.g.d;

import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public final class p2 {
    public static volatile p2 f10115a;
    public final String f10116b;
    public final g.i.a.d.d.o.b f10117c;
    public final ExecutorService f10118d;
    public final g.i.a.d.h.a.a f10119e;
    public final List<Pair<g.i.a.d.h.b.r5, f2>> f10120f;
    public int f10121g;
    public boolean f10122h;
    public volatile z0 f10123i;

    public p2(Context context, String str, String str2, String str3, Bundle bundle) {
        boolean z;
        if (str != null && c(str2, str3)) {
            this.f10116b = str;
        } else {
            this.f10116b = "FA";
        }
        this.f10117c = g.i.a.d.d.o.c.f9717a;
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 1, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue(), new z1());
        threadPoolExecutor.allowCoreThreadTimeOut(true);
        this.f10118d = Executors.unconfigurableExecutorService(threadPoolExecutor);
        this.f10119e = new g.i.a.d.h.a.a(this);
        this.f10120f = new ArrayList();
        try {
            if (g.i.a.d.h.b.b7.b(context, "google_app_id", g.i.a.d.d.o.f.M4(context)) != null) {
                try {
                    Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
                    z = true;
                } catch (ClassNotFoundException unused) {
                    z = false;
                }
                if (!z) {
                    this.f10122h = true;
                    Log.w(this.f10116b, "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 unused2) {
        }
        if (!c(str2, str3)) {
            if (str2 == null || str3 == null) {
                if ((str2 == null) ^ (str3 == null)) {
                    Log.w(this.f10116b, "Specified origin or custom app id is null. Both parameters will be ignored.");
                }
            } else {
                Log.v(this.f10116b, "Deferring to Google Analytics for Firebase for event data collection. https://goo.gl/J1sWQy");
            }
        }
        this.f10118d.execute(new o1(this, str2, str3, context, bundle));
        Application application = (Application) context.getApplicationContext();
        if (application == null) {
            Log.w(this.f10116b, "Unable to register lifecycle notifications. Application null.");
        } else {
            application.registerActivityLifecycleCallbacks(new o2(this));
        }
    }

    public static final boolean c(String str, String str2) {
        boolean z;
        if (str2 != null && str != null) {
            try {
                Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
                z = true;
            } catch (ClassNotFoundException unused) {
                z = false;
            }
            if (!z) {
                return true;
            }
        }
        return false;
    }

    public static p2 d(Context context, String str, String str2, String str3, Bundle bundle) {
        Objects.requireNonNull(context, "null reference");
        if (f10115a == null) {
            synchronized (p2.class) {
                if (f10115a == null) {
                    f10115a = new p2(context, null, null, null, bundle);
                }
            }
        }
        return f10115a;
    }

    public final void a(Exception exc, boolean z, boolean z2) {
        this.f10122h |= z;
        if (z) {
            Log.w(this.f10116b, "Data collection startup failed. No data will be collected.", exc);
            return;
        }
        if (z2) {
            this.f10118d.execute(new y1(this, "Error with data collection. Data lost.", exc));
        }
        Log.w(this.f10116b, "Error with data collection. Data lost.", exc);
    }

    public final void b(String str, String str2, Bundle bundle, boolean z, boolean z2, Long l2) {
        this.f10118d.execute(new c2(this, null, str, str2, bundle, z, z2));
    }
}