package p037.p123.p124.p133;

import android.database.Cursor;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import p037.p041.p042.LayoutInflaterFactory2C1494;
import p037.p057.C1714;
import p037.p109.C2409;
import p037.p109.p111.C2421;
import p037.p123.C2552;
import p037.p123.p124.p133.C2676;

/* JADX INFO: renamed from: މ.ޗ.ޘ.ޏ.ޏ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class CallableC2681 implements Callable<List<C2676.C2679>> {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final /* synthetic */ C2409 f8345;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final /* synthetic */ C2682 f8346;

    public CallableC2681(C2682 c2682, C2409 c2409) {
        this.f8346 = c2682;
        this.f8345 = c2409;
    }

    @Override // java.util.concurrent.Callable
    public List<C2676.C2679> call() {
        this.f8346.f8347.m4479();
        try {
            Cursor cursorM4504 = C2421.m4504(this.f8346.f8347, this.f8345, true, null);
            try {
                int iM2969 = LayoutInflaterFactory2C1494.C1505.m2969(cursorM4504, "id");
                int iM29692 = LayoutInflaterFactory2C1494.C1505.m2969(cursorM4504, "state");
                int iM29693 = LayoutInflaterFactory2C1494.C1505.m2969(cursorM4504, "output");
                int iM29694 = LayoutInflaterFactory2C1494.C1505.m2969(cursorM4504, "run_attempt_count");
                C1714<String, ArrayList<String>> c1714 = new C1714<>();
                C1714<String, ArrayList<C2552>> c17142 = new C1714<>();
                while (cursorM4504.moveToNext()) {
                    if (!cursorM4504.isNull(iM2969)) {
                        String string = cursorM4504.getString(iM2969);
                        if (c1714.get(string) == null) {
                            c1714.put(string, new ArrayList<>());
                        }
                    }
                    if (!cursorM4504.isNull(iM2969)) {
                        String string2 = cursorM4504.getString(iM2969);
                        if (c17142.get(string2) == null) {
                            c17142.put(string2, new ArrayList<>());
                        }
                    }
                }
                cursorM4504.moveToPosition(-1);
                this.f8346.m4757(c1714);
                this.f8346.m4753(c17142);
                ArrayList arrayList = new ArrayList(cursorM4504.getCount());
                while (cursorM4504.moveToNext()) {
                    ArrayList<String> arrayList2 = !cursorM4504.isNull(iM2969) ? c1714.get(cursorM4504.getString(iM2969)) : null;
                    if (arrayList2 == null) {
                        arrayList2 = new ArrayList<>();
                    }
                    ArrayList<C2552> arrayList3 = !cursorM4504.isNull(iM2969) ? c17142.get(cursorM4504.getString(iM2969)) : null;
                    if (arrayList3 == null) {
                        arrayList3 = new ArrayList<>();
                    }
                    C2676.C2679 c2679 = new C2676.C2679();
                    c2679.f8339 = cursorM4504.getString(iM2969);
                    c2679.f8340 = LayoutInflaterFactory2C1494.C1505.m2988(cursorM4504.getInt(iM29692));
                    c2679.f8341 = C2552.m4616(cursorM4504.getBlob(iM29693));
                    c2679.f8342 = cursorM4504.getInt(iM29694);
                    c2679.f8343 = arrayList2;
                    c2679.f8344 = arrayList3;
                    arrayList.add(c2679);
                }
                this.f8346.f8347.m4484();
                return arrayList;
            } finally {
                cursorM4504.close();
            }
        } finally {
            this.f8346.f8347.m4481();
        }
    }

    public void finalize() {
        this.f8345.m4493();
    }
}
