Files
rr3-apk/decompiled/sources/com/tapjoy/n1.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

56 lines
2.0 KiB
Java

package com.tapjoy;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import org.json.JSONArray;
import org.json.JSONException;
/* loaded from: classes4.dex */
public final class n1 extends Thread {
public final /* synthetic */ JSONArray a;
public final /* synthetic */ TJCacheListener b;
public final /* synthetic */ TapjoyCache c;
public n1(TapjoyCache tapjoyCache, JSONArray jSONArray, TJCacheListener tJCacheListener) {
this.c = tapjoyCache;
this.a = jSONArray;
this.b = tJCacheListener;
}
@Override // java.lang.Thread, java.lang.Runnable
public final void run() {
TapjoyLog.d("TapjoyCache", "Starting to cache asset group size of " + this.a.length());
ArrayList arrayList = new ArrayList();
for (int i = 0; i < this.a.length(); i++) {
try {
Future<Boolean> cacheAssetFromJSONObject = this.c.cacheAssetFromJSONObject(this.a.getJSONObject(i));
if (cacheAssetFromJSONObject != null) {
arrayList.add(cacheAssetFromJSONObject);
}
} catch (JSONException unused) {
TapjoyLog.e("TapjoyCache", "Failed to load JSON object from JSONArray");
}
}
Iterator it = arrayList.iterator();
int i2 = 1;
while (it.hasNext()) {
try {
} catch (InterruptedException e) {
TapjoyLog.e("TapjoyCache", "Caching thread failed: " + e.toString());
} catch (ExecutionException e2) {
TapjoyLog.e("TapjoyCache", "Caching thread failed: " + e2.toString());
}
if (!((Boolean) ((Future) it.next()).get()).booleanValue()) {
i2 = 2;
}
}
TapjoyLog.d("TapjoyCache", "Finished caching group");
TJCacheListener tJCacheListener = this.b;
if (tJCacheListener != null) {
tJCacheListener.onCachingComplete(i2);
}
}
}