107 lines
2.4 KiB
Java
107 lines
2.4 KiB
Java
package com.ubtrobot.ubtlib.analytics;
|
|
|
|
import android.app.Activity;
|
|
import android.content.Context;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class JimuAnalytics implements IAnalytics {
|
|
private static JimuAnalytics e;
|
|
private volatile boolean c = true;
|
|
private volatile boolean d = false;
|
|
private FirebaseAnalyticsImp b = new FirebaseAnalyticsImp();
|
|
private UbtAnalytics a = new UbtAnalytics();
|
|
|
|
private JimuAnalytics() {
|
|
}
|
|
|
|
public static synchronized JimuAnalytics b() {
|
|
JimuAnalytics jimuAnalytics;
|
|
synchronized (JimuAnalytics.class) {
|
|
if (e == null) {
|
|
e = new JimuAnalytics();
|
|
}
|
|
jimuAnalytics = e;
|
|
}
|
|
return jimuAnalytics;
|
|
}
|
|
|
|
public void a(Context context) {
|
|
if (this.d) {
|
|
return;
|
|
}
|
|
this.a.a(context);
|
|
this.b.a(context);
|
|
this.d = true;
|
|
}
|
|
|
|
public void c(String str) {
|
|
if (a() && this.d) {
|
|
this.a.c(str);
|
|
this.b.c(str);
|
|
}
|
|
}
|
|
|
|
@Override // com.ubtrobot.ubtlib.analytics.IAnalytics
|
|
public void b(Activity activity, String str) {
|
|
if (a() && this.d) {
|
|
this.a.b(activity, str);
|
|
this.b.b(activity, str);
|
|
}
|
|
}
|
|
|
|
public void a(String str, String str2) {
|
|
if (a() && this.d) {
|
|
this.a.a(str, str2);
|
|
}
|
|
}
|
|
|
|
@Override // com.ubtrobot.ubtlib.analytics.IAnalytics
|
|
public void a(String str, Map<String, String> map) {
|
|
if (a() && this.d) {
|
|
this.a.a(str, map);
|
|
this.b.a(str, map);
|
|
}
|
|
}
|
|
|
|
public void b(String str) {
|
|
if (a() && this.d) {
|
|
this.a.b(str);
|
|
this.b.b(str);
|
|
}
|
|
}
|
|
|
|
@Override // com.ubtrobot.ubtlib.analytics.IAnalytics
|
|
public void a(String str) {
|
|
if (a() && this.d) {
|
|
this.a.a(str);
|
|
this.b.a(str);
|
|
}
|
|
}
|
|
|
|
public void b(boolean z) {
|
|
if (a() && this.d) {
|
|
this.a.b(z);
|
|
this.b.b(z);
|
|
}
|
|
}
|
|
|
|
@Override // com.ubtrobot.ubtlib.analytics.IAnalytics
|
|
public void a(Activity activity, String str) {
|
|
if (a() && this.d) {
|
|
this.a.a(activity, str);
|
|
this.b.a(activity, str);
|
|
}
|
|
}
|
|
|
|
public void a(boolean z) {
|
|
this.c = z;
|
|
this.b.a(z);
|
|
this.a.a(z);
|
|
}
|
|
|
|
public boolean a() {
|
|
return this.c;
|
|
}
|
|
}
|