303 lines
9.4 KiB
Java
303 lines
9.4 KiB
Java
package o;
|
|
|
|
import android.os.Bundle;
|
|
import android.os.Looper;
|
|
import androidx.lifecycle.LiveData;
|
|
import java.io.FileDescriptor;
|
|
import java.io.PrintWriter;
|
|
import java.lang.reflect.Modifier;
|
|
import o.NPK;
|
|
import o.VLM;
|
|
import o.iBO;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public final class vPi extends NPK {
|
|
static boolean c = false;
|
|
private final InterfaceC16541pFg a;
|
|
private final RVV b;
|
|
|
|
/* loaded from: classes.dex */
|
|
public static class Sts<D> extends HeN<D> implements iBO.LWm<D> {
|
|
final iBO<D> h;
|
|
LWm<D> i;
|
|
private InterfaceC16541pFg n;
|
|
final int j = 0;
|
|
final Bundle g = null;
|
|
private iBO<D> m = null;
|
|
|
|
Sts(int i, Bundle bundle, iBO<D> ibo) {
|
|
this.h = ibo;
|
|
ibo.registerListener(0, this);
|
|
}
|
|
|
|
@Override // androidx.lifecycle.LiveData
|
|
public final void d() {
|
|
boolean z = vPi.c;
|
|
this.h.startLoading();
|
|
}
|
|
|
|
@Override // androidx.lifecycle.LiveData
|
|
public final void a() {
|
|
boolean z = vPi.c;
|
|
this.h.stopLoading();
|
|
}
|
|
|
|
final iBO<D> a(InterfaceC16541pFg interfaceC16541pFg, NPK.HBt<D> hBt) {
|
|
LWm<D> lWm = new LWm<>(this.h, hBt);
|
|
d(interfaceC16541pFg, lWm);
|
|
LWm<D> lWm2 = this.i;
|
|
if (lWm2 != null) {
|
|
super.c(lWm2);
|
|
this.n = null;
|
|
this.i = null;
|
|
}
|
|
this.n = interfaceC16541pFg;
|
|
this.i = lWm;
|
|
return this.h;
|
|
}
|
|
|
|
final void e() {
|
|
InterfaceC16541pFg interfaceC16541pFg = this.n;
|
|
LWm<D> lWm = this.i;
|
|
if (interfaceC16541pFg == null || lWm == null) {
|
|
return;
|
|
}
|
|
super.c(lWm);
|
|
d(interfaceC16541pFg, lWm);
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // androidx.lifecycle.LiveData
|
|
public final void c(zBc<? super D> zbc) {
|
|
super.c(zbc);
|
|
this.n = null;
|
|
this.i = null;
|
|
}
|
|
|
|
final iBO<D> b() {
|
|
boolean z = vPi.c;
|
|
this.h.cancelLoad();
|
|
this.h.abandon();
|
|
LWm<D> lWm = this.i;
|
|
if (lWm != null) {
|
|
super.c(lWm);
|
|
this.n = null;
|
|
this.i = null;
|
|
if (lWm.d) {
|
|
boolean z2 = vPi.c;
|
|
lWm.a.onLoaderReset(lWm.c);
|
|
}
|
|
}
|
|
this.h.unregisterListener(this);
|
|
if (lWm != null) {
|
|
boolean z3 = lWm.d;
|
|
}
|
|
this.h.reset();
|
|
return this.m;
|
|
}
|
|
|
|
@Override // o.iBO.LWm
|
|
public final void e(iBO<D> ibo, D d) {
|
|
boolean z = vPi.c;
|
|
if (Looper.myLooper() != Looper.getMainLooper()) {
|
|
boolean z2 = vPi.c;
|
|
e((Sts<D>) d);
|
|
} else {
|
|
super.a((Sts<D>) d);
|
|
}
|
|
}
|
|
|
|
@Override // o.HeN, androidx.lifecycle.LiveData
|
|
public final void a(D d) {
|
|
super.a((Sts<D>) d);
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder(64);
|
|
sb.append("LoaderInfo{");
|
|
sb.append(Integer.toHexString(System.identityHashCode(this)));
|
|
sb.append(" #");
|
|
sb.append(this.j);
|
|
sb.append(" : ");
|
|
OcZ.e(this.h, sb);
|
|
sb.append("}}");
|
|
return sb.toString();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public static class LWm<D> implements zBc<D> {
|
|
final NPK.HBt<D> a;
|
|
final iBO<D> c;
|
|
boolean d = false;
|
|
|
|
LWm(iBO<D> ibo, NPK.HBt<D> hBt) {
|
|
this.c = ibo;
|
|
this.a = hBt;
|
|
}
|
|
|
|
@Override // o.zBc
|
|
public final void onChanged(D d) {
|
|
boolean z = vPi.c;
|
|
this.a.onLoadFinished(this.c, d);
|
|
this.d = true;
|
|
}
|
|
|
|
public final String toString() {
|
|
return this.a.toString();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public static class RVV extends VKL {
|
|
private static final VLM.LWm b = new VLM.LWm() { // from class: o.vPi.RVV.5
|
|
@Override // o.VLM.LWm
|
|
public final <T extends VKL> T create(Class<T> cls) {
|
|
return new RVV();
|
|
}
|
|
};
|
|
VOL<Sts> a = new VOL<>();
|
|
boolean d = false;
|
|
|
|
RVV() {
|
|
}
|
|
|
|
static RVV b(sUv suv) {
|
|
return (RVV) new VLM(suv, b).b(RVV.class);
|
|
}
|
|
|
|
@Override // o.VKL
|
|
public void onCleared() {
|
|
super.onCleared();
|
|
int c = this.a.c();
|
|
for (int i = 0; i < c; i++) {
|
|
this.a.b(i).b();
|
|
}
|
|
this.a.e();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public vPi(InterfaceC16541pFg interfaceC16541pFg, sUv suv) {
|
|
this.a = interfaceC16541pFg;
|
|
this.b = RVV.b(suv);
|
|
}
|
|
|
|
@Override // o.NPK
|
|
public final void d() {
|
|
RVV rvv = this.b;
|
|
int c2 = rvv.a.c();
|
|
for (int i = 0; i < c2; i++) {
|
|
rvv.a.b(i).e();
|
|
}
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder(128);
|
|
sb.append("LoaderManager{");
|
|
sb.append(Integer.toHexString(System.identityHashCode(this)));
|
|
sb.append(" in ");
|
|
OcZ.e(this.a, sb);
|
|
sb.append("}}");
|
|
return sb.toString();
|
|
}
|
|
|
|
@Override // o.NPK
|
|
@Deprecated
|
|
public final void e(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
|
RVV rvv = this.b;
|
|
if (rvv.a.c() > 0) {
|
|
printWriter.print(str);
|
|
printWriter.println("Loaders:");
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(str);
|
|
sb.append(" ");
|
|
String obj = sb.toString();
|
|
for (int i = 0; i < rvv.a.c(); i++) {
|
|
Sts b = rvv.a.b(i);
|
|
printWriter.print(str);
|
|
printWriter.print(" #");
|
|
printWriter.print(rvv.a.a(i));
|
|
printWriter.print(": ");
|
|
printWriter.println(b.toString());
|
|
printWriter.print(obj);
|
|
printWriter.print("mId=");
|
|
printWriter.print(b.j);
|
|
printWriter.print(" mArgs=");
|
|
printWriter.println(b.g);
|
|
printWriter.print(obj);
|
|
printWriter.print("mLoader=");
|
|
printWriter.println(b.h);
|
|
iBO<D> ibo = b.h;
|
|
StringBuilder sb2 = new StringBuilder();
|
|
sb2.append(obj);
|
|
sb2.append(" ");
|
|
ibo.dump(sb2.toString(), fileDescriptor, printWriter, strArr);
|
|
if (b.i != null) {
|
|
printWriter.print(obj);
|
|
printWriter.print("mCallbacks=");
|
|
printWriter.println(b.i);
|
|
LWm<D> lWm = b.i;
|
|
StringBuilder sb3 = new StringBuilder();
|
|
sb3.append(obj);
|
|
sb3.append(" ");
|
|
printWriter.print(sb3.toString());
|
|
printWriter.print("mDeliveredData=");
|
|
printWriter.println(lWm.d);
|
|
}
|
|
printWriter.print(obj);
|
|
printWriter.print("mData=");
|
|
iBO<D> ibo2 = b.h;
|
|
Object obj2 = b.d;
|
|
if (obj2 == LiveData.c) {
|
|
obj2 = null;
|
|
}
|
|
printWriter.println(ibo2.dataToString(obj2));
|
|
printWriter.print(obj);
|
|
printWriter.print("mStarted=");
|
|
printWriter.println(b.a > 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
private <D> iBO<D> c(NPK.HBt<D> hBt) {
|
|
try {
|
|
this.b.d = true;
|
|
iBO<D> onCreateLoader = hBt.onCreateLoader(0, null);
|
|
if (onCreateLoader == null) {
|
|
throw new IllegalArgumentException("Object returned from onCreateLoader must not be null");
|
|
}
|
|
if (onCreateLoader.getClass().isMemberClass() && !Modifier.isStatic(onCreateLoader.getClass().getModifiers())) {
|
|
StringBuilder sb = new StringBuilder("Object returned from onCreateLoader must not be a non-static inner member class: ");
|
|
sb.append(onCreateLoader);
|
|
throw new IllegalArgumentException(sb.toString());
|
|
}
|
|
Sts sts = new Sts(0, null, onCreateLoader);
|
|
this.b.a.a(0, sts);
|
|
this.b.d = false;
|
|
return sts.a(this.a, hBt);
|
|
} catch (Throwable th) {
|
|
this.b.d = false;
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@Override // o.NPK
|
|
public final <D> iBO<D> a(NPK.HBt<D> hBt) {
|
|
if (this.b.d) {
|
|
throw new IllegalStateException("Called while creating a loader");
|
|
}
|
|
if (Looper.getMainLooper() != Looper.myLooper()) {
|
|
throw new IllegalStateException("initLoader must be called on the main thread");
|
|
}
|
|
Sts e = this.b.a.e(0);
|
|
if (e == null) {
|
|
return c(hBt);
|
|
}
|
|
return e.a(this.a, hBt);
|
|
}
|
|
}
|