90 lines
2.0 KiB
Java
90 lines
2.0 KiB
Java
package io.fabric.sdk.android;
|
|
|
|
import android.content.Context;
|
|
import io.fabric.sdk.android.services.common.IdManager;
|
|
import io.fabric.sdk.android.services.concurrency.DependsOn;
|
|
import java.io.File;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public abstract class Kit<Result> implements Comparable<Kit> {
|
|
Fabric a;
|
|
Context c;
|
|
InitializationCallback<Result> d;
|
|
IdManager e;
|
|
InitializationTask<Result> b = new InitializationTask<>(this);
|
|
final DependsOn f = (DependsOn) getClass().getAnnotation(DependsOn.class);
|
|
|
|
void a(Context context, Fabric fabric, InitializationCallback<Result> initializationCallback, IdManager idManager) {
|
|
this.a = fabric;
|
|
this.c = new FabricContext(context, g(), h());
|
|
this.d = initializationCallback;
|
|
this.e = idManager;
|
|
}
|
|
|
|
protected void a(Result result) {
|
|
}
|
|
|
|
protected void b(Result result) {
|
|
}
|
|
|
|
boolean b(Kit kit) {
|
|
if (m()) {
|
|
for (Class<?> cls : this.f.value()) {
|
|
if (cls.isAssignableFrom(kit.getClass())) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
protected abstract Result c();
|
|
|
|
public Context d() {
|
|
return this.c;
|
|
}
|
|
|
|
public Fabric e() {
|
|
return this.a;
|
|
}
|
|
|
|
protected IdManager f() {
|
|
return this.e;
|
|
}
|
|
|
|
public abstract String g();
|
|
|
|
public String h() {
|
|
return ".Fabric" + File.separator + g();
|
|
}
|
|
|
|
public abstract String i();
|
|
|
|
boolean m() {
|
|
return this.f != null;
|
|
}
|
|
|
|
final void n() {
|
|
this.b.a(this.a.b(), (Object[]) new Void[]{null});
|
|
}
|
|
|
|
protected boolean o() {
|
|
return true;
|
|
}
|
|
|
|
@Override // java.lang.Comparable
|
|
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
|
public int compareTo(Kit kit) {
|
|
if (b(kit)) {
|
|
return 1;
|
|
}
|
|
if (kit.b((Kit) this)) {
|
|
return -1;
|
|
}
|
|
if (!m() || kit.m()) {
|
|
return (m() || !kit.m()) ? 0 : -1;
|
|
}
|
|
return 1;
|
|
}
|
|
}
|