discord-jadx/app/src/main/java/c/i/a/f/i/b/ba.java

893 lines
44 KiB
Java

package c.i.a.f.i.b;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteException;
import androidx.annotation.WorkerThread;
import androidx.collection.ArrayMap;
import c.i.a.f.h.l.a1;
import c.i.a.f.h.l.f9;
import c.i.a.f.h.l.g1;
import c.i.a.f.h.l.h1;
import c.i.a.f.h.l.i1;
import c.i.a.f.h.l.l0;
import c.i.a.f.h.l.l9;
import c.i.a.f.h.l.o0;
import c.i.a.f.h.l.u4;
import c.i.a.f.h.l.y0;
import c.i.a.f.h.l.z0;
import com.airbnb.lottie.parser.AnimatableValueParser;
import java.io.IOException;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
/* compiled from: com.google.android.gms:play-services-measurement@@18.0.0 */
public final class ba extends i9 {
public String d;
public Set<Integer> e;
public Map<Integer, da> f;
public Long g;
public Long h;
public ba(k9 k9Var) {
super(k9Var);
}
@Override // c.i.a.f.i.b.i9
public final boolean p() {
return false;
}
public final da s(int i) {
if (this.f.containsKey(Integer.valueOf(i))) {
return this.f.get(Integer.valueOf(i));
}
da daVar = new da(this, this.d, null);
this.f.put(Integer.valueOf(i), daVar);
return daVar;
}
/* JADX WARNING: Code restructure failed: missing block: B:140:0x0314, code lost:
r0 = th;
*/
/* JADX WARNING: Code restructure failed: missing block: B:141:0x0315, code lost:
r7 = null;
*/
/* JADX WARNING: Code restructure failed: missing block: B:203:0x0472, code lost:
r7.close();
*/
/* JADX WARNING: Code restructure failed: missing block: B:293:0x0711, code lost:
if (r62.a.h.u(r62.d, c.i.a.f.i.b.p.F0) == false) goto L_0x0716;
*/
/* JADX WARNING: Removed duplicated region for block: B:105:0x0262 */
/* JADX WARNING: Removed duplicated region for block: B:109:0x026d */
/* JADX WARNING: Removed duplicated region for block: B:140:0x0314 A[ExcHandler: all (th java.lang.Throwable), Splitter:B:119:0x02ba] */
/* JADX WARNING: Removed duplicated region for block: B:146:0x0332 A[Catch:{ all -> 0x046e }] */
/* JADX WARNING: Removed duplicated region for block: B:152:0x034a */
/* JADX WARNING: Removed duplicated region for block: B:157:0x035c */
/* JADX WARNING: Removed duplicated region for block: B:203:0x0472 */
/* JADX WARNING: Removed duplicated region for block: B:211:0x0487 */
/* JADX WARNING: Removed duplicated region for block: B:251:0x0577 */
/* JADX WARNING: Removed duplicated region for block: B:279:0x0639 */
/* JADX WARNING: Removed duplicated region for block: B:319:0x07d8 */
/* JADX WARNING: Removed duplicated region for block: B:368:0x0959 */
/* JADX WARNING: Removed duplicated region for block: B:384:0x09e0 */
/* JADX WARNING: Removed duplicated region for block: B:422:0x057e A[SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:59:0x017c */
/* JADX WARNING: Removed duplicated region for block: B:63:0x0184 */
/* JADX WARNING: Removed duplicated region for block: B:72:0x01bb A[Catch:{ SQLiteException -> 0x022c }] */
/* JADX WARNING: Removed duplicated region for block: B:79:0x01db */
@WorkerThread
public final List<y0> t(String str, List<a1> list, List<i1> list2, Long l, Long l2) {
int i;
int i2;
boolean z2;
ArrayMap arrayMap;
g q;
String str2;
Cursor cursor;
Throwable th;
ArrayMap arrayMap2;
String str3;
SQLiteException e;
ArrayMap arrayMap3;
String str4;
o0 next;
Integer num;
l lVar;
ca caVar;
Iterator<Integer> it;
ArrayMap arrayMap4;
Iterator<a1> it2;
String str5;
ArrayMap arrayMap5;
Iterator it3;
List<l0> list3;
boolean z3;
ArrayMap arrayMap6;
Iterator it4;
Map map;
Iterator it5;
Cursor cursor2;
SQLiteException e2;
Map map2;
Cursor cursor3;
SQLiteException e3;
ArrayMap arrayMap7;
Cursor cursor4;
Throwable th2;
Cursor cursor5;
SQLiteException e4;
AnimatableValueParser.w(str);
Objects.requireNonNull(list, "null reference");
Objects.requireNonNull(list2, "null reference");
this.d = str;
this.e = new HashSet();
this.f = new ArrayMap();
this.g = l;
this.h = l2;
Iterator<a1> it6 = list.iterator();
while (true) {
i = 1;
i2 = 0;
if (it6.hasNext()) {
if ("_s".equals(it6.next().F())) {
z2 = true;
break;
}
} else {
z2 = false;
break;
}
}
boolean z4 = f9.b() && this.a.h.u(this.d, p.f1177c0);
boolean z5 = f9.b() && this.a.h.u(this.d, p.f1175b0);
if (z2) {
g q2 = q();
String str6 = this.d;
q2.n();
q2.b();
AnimatableValueParser.w(str6);
ContentValues contentValues = new ContentValues();
contentValues.put("current_session_count", (Integer) 0);
try {
q2.t().update("events", contentValues, "app_id = ?", new String[]{str6});
} catch (SQLiteException e5) {
q2.g().f.c("Error resetting session-scoped event counts. appId", q3.s(str6), e5);
}
}
Map emptyMap = Collections.emptyMap();
if (z5 && z4) {
g q3 = q();
String str7 = this.d;
Objects.requireNonNull(q3);
AnimatableValueParser.w(str7);
ArrayMap arrayMap8 = new ArrayMap();
try {
cursor5 = q3.t().query("event_filters", new String[]{"audience_id", "data"}, "app_id=?", new String[]{str7}, null, null, null);
try {
} catch (SQLiteException e6) {
e4 = e6;
try {
q3.g().f.c("Database error querying filters. appId", q3.s(str7), e4);
emptyMap = Collections.emptyMap();
if (cursor5 != null) {
}
arrayMap = emptyMap;
q = q();
str2 = this.d;
q.n();
q.b();
AnimatableValueParser.w(str2);
cursor3 = q.t().query("audience_filter_values", new String[]{"audience_id", "current_results"}, "app_id=?", new String[]{str2}, null, null, null);
if (!cursor3.moveToFirst()) {
}
} catch (Throwable th3) {
th2 = th3;
cursor4 = cursor5;
if (cursor4 != null) {
cursor4.close();
}
throw th2;
}
}
} catch (SQLiteException e7) {
e4 = e7;
cursor5 = null;
q3.g().f.c("Database error querying filters. appId", q3.s(str7), e4);
emptyMap = Collections.emptyMap();
if (cursor5 != null) {
cursor5.close();
}
arrayMap = emptyMap;
q = q();
str2 = this.d;
q.n();
q.b();
AnimatableValueParser.w(str2);
cursor3 = q.t().query("audience_filter_values", new String[]{"audience_id", "current_results"}, "app_id=?", new String[]{str2}, null, null, null);
if (!cursor3.moveToFirst()) {
}
} catch (Throwable th4) {
th2 = th4;
cursor4 = null;
if (cursor4 != null) {
}
throw th2;
}
if (!cursor5.moveToFirst()) {
emptyMap = Collections.emptyMap();
cursor5.close();
} else {
while (true) {
try {
l0 l0Var = (l0) ((u4) ((l0.a) q9.x(l0.I(), cursor5.getBlob(1))).p());
if (l0Var.C()) {
int i3 = cursor5.getInt(i2);
List list4 = arrayMap8.get(Integer.valueOf(i3));
if (list4 == null) {
list4 = new ArrayList();
arrayMap8.put(Integer.valueOf(i3), list4);
}
list4.add(l0Var);
}
} catch (IOException e8) {
q3.g().f.c("Failed to merge filter. appId", q3.s(str7), e8);
}
if (!cursor5.moveToNext()) {
break;
}
i2 = 0;
}
cursor5.close();
arrayMap = arrayMap8;
q = q();
str2 = this.d;
q.n();
q.b();
AnimatableValueParser.w(str2);
cursor3 = q.t().query("audience_filter_values", new String[]{"audience_id", "current_results"}, "app_id=?", new String[]{str2}, null, null, null);
if (!cursor3.moveToFirst()) {
ArrayMap arrayMap9 = new ArrayMap();
int i4 = 0;
while (true) {
int i5 = cursor3.getInt(i4);
try {
arrayMap9.put(Integer.valueOf(i5), (g1) ((u4) ((g1.a) q9.x(g1.M(), cursor3.getBlob(i))).p()));
arrayMap7 = arrayMap9;
} catch (IOException e9) {
arrayMap7 = arrayMap9;
q.g().f.d("Failed to merge filter results. appId, audienceId, error", q3.s(str2), Integer.valueOf(i5), e9);
}
if (!cursor3.moveToNext()) {
break;
}
arrayMap9 = arrayMap7;
i4 = 0;
i = 1;
}
cursor3.close();
arrayMap2 = arrayMap7;
if (l9.b()) {
}
str3 = "audience_id";
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
} else if (!l9.b() || !q.a.h.u(str2, p.F0)) {
cursor3.close();
arrayMap2 = null;
if (((l9.b() || !this.a.h.u(this.d, p.F0)) && arrayMap2 == null) || arrayMap2.isEmpty()) {
str3 = "audience_id";
} else {
HashSet hashSet = new HashSet(arrayMap2.keySet());
if (z2) {
String str9 = this.d;
AnimatableValueParser.w(str9);
ArrayMap arrayMap10 = new ArrayMap();
if (!arrayMap2.isEmpty()) {
g q4 = q();
q4.n();
q4.b();
AnimatableValueParser.w(str9);
Map arrayMap11 = new ArrayMap();
str5 = "audience_id";
try {
cursor2 = q4.t().rawQuery("select audience_id, filter_id from event_filters where app_id = ? and session_scoped = 1 UNION select audience_id, filter_id from property_filters where app_id = ? and session_scoped = 1;", new String[]{str9, str9});
try {
if (!cursor2.moveToFirst()) {
arrayMap11 = Collections.emptyMap();
cursor2.close();
} else {
while (true) {
int i6 = cursor2.getInt(0);
List list5 = (List) arrayMap11.get(Integer.valueOf(i6));
if (list5 == null) {
list5 = new ArrayList();
arrayMap11.put(Integer.valueOf(i6), list5);
}
try {
list5.add(Integer.valueOf(cursor2.getInt(1)));
if (!cursor2.moveToNext()) {
break;
}
} catch (SQLiteException e10) {
e2 = e10;
try {
q4.g().f.c("Database error querying scoped filters. appId", q3.s(str9), e2);
if (l9.b()) {
}
if (cursor2 != null) {
}
arrayMap11 = null;
it4 = arrayMap2.keySet().iterator();
while (it4.hasNext()) {
}
arrayMap5 = arrayMap10;
it3 = hashSet.iterator();
while (it3.hasNext()) {
}
str3 = str5;
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
} catch (Throwable th5) {
Throwable th6 = th5;
Cursor cursor6 = cursor2;
if (cursor6 != null) {
}
throw th6;
}
}
}
cursor2.close();
}
} catch (SQLiteException e11) {
e2 = e11;
q4.g().f.c("Database error querying scoped filters. appId", q3.s(str9), e2);
if (l9.b()) {
}
if (cursor2 != null) {
}
arrayMap11 = null;
it4 = arrayMap2.keySet().iterator();
while (it4.hasNext()) {
}
arrayMap5 = arrayMap10;
it3 = hashSet.iterator();
while (it3.hasNext()) {
}
str3 = str5;
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
}
} catch (SQLiteException e12) {
e2 = e12;
cursor2 = null;
q4.g().f.c("Database error querying scoped filters. appId", q3.s(str9), e2);
if (l9.b() || !q4.a.h.u(str9, p.F0)) {
if (cursor2 != null) {
cursor2.close();
}
arrayMap11 = null;
it4 = arrayMap2.keySet().iterator();
while (it4.hasNext()) {
}
arrayMap5 = arrayMap10;
it3 = hashSet.iterator();
while (it3.hasNext()) {
}
str3 = str5;
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
}
arrayMap11 = Collections.emptyMap();
if (cursor2 != null) {
cursor2.close();
}
it4 = arrayMap2.keySet().iterator();
while (it4.hasNext()) {
}
arrayMap5 = arrayMap10;
it3 = hashSet.iterator();
while (it3.hasNext()) {
}
str3 = str5;
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
} catch (Throwable th7) {
}
it4 = arrayMap2.keySet().iterator();
while (it4.hasNext()) {
int intValue = ((Integer) it4.next()).intValue();
g1 g1Var = arrayMap2.get(Integer.valueOf(intValue));
List<Integer> list6 = (List) arrayMap11.get(Integer.valueOf(intValue));
if (list6 == null || list6.isEmpty()) {
map = arrayMap11;
it5 = it4;
arrayMap10.put(Integer.valueOf(intValue), g1Var);
} else {
List<Long> C = m().C(g1Var.E(), list6);
if (!C.isEmpty()) {
g1.a t = g1Var.t();
map = arrayMap11;
if (t.k) {
t.n();
it5 = it4;
t.k = false;
} else {
it5 = it4;
}
g1.B((g1) t.j);
if (t.k) {
t.n();
t.k = false;
}
g1.D((g1) t.j, C);
List<Long> C2 = m().C(g1Var.v(), list6);
if (t.k) {
t.n();
t.k = false;
}
g1.w((g1) t.j);
if (t.k) {
t.n();
t.k = false;
}
g1.y((g1) t.j, C2);
for (int i7 = 0; i7 < g1Var.J(); i7++) {
if (list6.contains(Integer.valueOf(g1Var.u(i7).x()))) {
if (t.k) {
t.n();
t.k = false;
}
g1.x((g1) t.j, i7);
}
}
for (int i8 = 0; i8 < g1Var.L(); i8++) {
if (list6.contains(Integer.valueOf(g1Var.A(i8).y()))) {
if (t.k) {
t.n();
t.k = false;
}
g1.C((g1) t.j, i8);
}
}
arrayMap10.put(Integer.valueOf(intValue), (g1) ((u4) t.p()));
}
}
it4 = it5;
arrayMap11 = map;
}
} else {
str5 = "audience_id";
}
arrayMap5 = arrayMap10;
} else {
str5 = "audience_id";
arrayMap5 = arrayMap2;
}
it3 = hashSet.iterator();
while (it3.hasNext()) {
int intValue2 = ((Integer) it3.next()).intValue();
g1 g1Var2 = (g1) arrayMap5.get(Integer.valueOf(intValue2));
BitSet bitSet = new BitSet();
BitSet bitSet2 = new BitSet();
ArrayMap arrayMap12 = new ArrayMap();
if (!(g1Var2 == null || g1Var2.J() == 0)) {
for (z0 z0Var : g1Var2.I()) {
if (z0Var.w()) {
arrayMap12.put(Integer.valueOf(z0Var.x()), z0Var.y() ? Long.valueOf(z0Var.z()) : null);
}
}
}
ArrayMap arrayMap13 = new ArrayMap();
if (!(g1Var2 == null || g1Var2.L() == 0)) {
for (h1 h1Var : g1Var2.K()) {
if (!h1Var.x() || h1Var.A() <= 0) {
arrayMap6 = arrayMap5;
} else {
arrayMap6 = arrayMap5;
arrayMap13.put(Integer.valueOf(h1Var.y()), Long.valueOf(h1Var.u(h1Var.A() - 1)));
}
arrayMap5 = arrayMap6;
}
}
if (g1Var2 != null) {
for (int i9 = 0; i9 < (g1Var2.z() << 6); i9++) {
if (q9.Q(g1Var2.v(), i9)) {
g().n.c("Filter already evaluated. audience ID, filter ID", Integer.valueOf(intValue2), Integer.valueOf(i9));
bitSet2.set(i9);
if (q9.Q(g1Var2.E(), i9)) {
bitSet.set(i9);
z3 = true;
if (z3) {
arrayMap12.remove(Integer.valueOf(i9));
}
}
}
z3 = false;
if (z3) {
}
}
}
g1 g1Var3 = (g1) arrayMap2.get(Integer.valueOf(intValue2));
if (!(!z5 || !z4 || (list3 = (List) arrayMap.get(Integer.valueOf(intValue2))) == null || this.h == null || this.g == null)) {
for (l0 l0Var2 : list3) {
int y2 = l0Var2.y();
long longValue = this.h.longValue() / 1000;
if (l0Var2.F()) {
longValue = this.g.longValue() / 1000;
}
if (arrayMap12.containsKey(Integer.valueOf(y2))) {
arrayMap12.put(Integer.valueOf(y2), Long.valueOf(longValue));
}
if (arrayMap13.containsKey(Integer.valueOf(y2))) {
arrayMap13.put(Integer.valueOf(y2), Long.valueOf(longValue));
}
}
}
this.f.put(Integer.valueOf(intValue2), new da(this, this.d, g1Var3, bitSet, bitSet2, arrayMap12, arrayMap13, null));
str5 = str5;
arrayMap = arrayMap;
arrayMap5 = arrayMap5;
}
str3 = str5;
}
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
ca caVar2 = new ca(this, null);
ArrayMap arrayMap14 = new ArrayMap();
Iterator<a1> it7 = list.iterator();
while (it7.hasNext()) {
a1 next2 = it7.next();
a1 a = caVar2.a(this.d, next2);
if (a != null) {
g q5 = q();
String str10 = this.d;
String F = a.F();
l z6 = q5.z(str10, next2.F());
if (z6 == null) {
q5.g().i.c("Event aggregate wasn't created during raw event logging. appId, event", q3.s(str10), q5.d().u(F));
lVar = new l(str10, next2.F(), 1, 1, 1, next2.H(), 0, null, null, null, null);
} else {
lVar = new l(z6.a, z6.b, z6.f1169c + 1, z6.d + 1, z6.e + 1, z6.f, z6.g, z6.h, z6.i, z6.j, z6.k);
}
q().H(lVar);
long j = lVar.f1169c;
String F2 = a.F();
V v = arrayMap14.get(F2);
if (v == null) {
v = q().c0(this.d, F2);
if (l9.b()) {
caVar = caVar2;
} else {
caVar = caVar2;
}
if (v == null) {
v = new ArrayMap();
}
arrayMap14.put(F2, v);
} else {
caVar = caVar2;
}
Iterator<Integer> it8 = v.keySet().iterator();
while (it8.hasNext()) {
int intValue3 = it8.next().intValue();
if (this.e.contains(Integer.valueOf(intValue3))) {
g().n.b(str8, Integer.valueOf(intValue3));
} else {
Iterator<l0> it9 = v.get(Integer.valueOf(intValue3)).iterator();
boolean z7 = true;
while (true) {
if (!it9.hasNext()) {
it = it8;
arrayMap4 = arrayMap14;
it2 = it7;
break;
}
l0 next3 = it9.next();
it = it8;
arrayMap4 = arrayMap14;
fa faVar = new fa(this, this.d, intValue3, next3);
it2 = it7;
z7 = faVar.i(this.g, this.h, a, j, lVar, u(intValue3, next3.y()));
if (!z7) {
this.e.add(Integer.valueOf(intValue3));
break;
}
s(intValue3).b(faVar);
it8 = it;
arrayMap14 = arrayMap4;
it7 = it2;
}
if (!z7) {
this.e.add(Integer.valueOf(intValue3));
}
it8 = it;
arrayMap14 = arrayMap4;
it7 = it2;
}
}
caVar2 = caVar;
}
}
}
if (!list2.isEmpty()) {
ArrayMap arrayMap15 = new ArrayMap();
for (i1 i1Var : list2) {
String D = i1Var.D();
V v2 = arrayMap15.get(D);
if (v2 == null) {
v2 = q().d0(this.d, D);
if ((!l9.b() || !this.a.h.u(this.d, p.F0)) && v2 == null) {
v2 = new ArrayMap<>();
}
arrayMap15.put(D, v2);
}
Iterator<Integer> it10 = v2.keySet().iterator();
while (true) {
if (!it10.hasNext()) {
break;
}
int intValue4 = it10.next().intValue();
if (this.e.contains(Integer.valueOf(intValue4))) {
g().n.b(str8, Integer.valueOf(intValue4));
break;
}
Iterator<o0> it11 = v2.get(Integer.valueOf(intValue4)).iterator();
boolean z8 = true;
while (true) {
if (!it11.hasNext()) {
arrayMap3 = arrayMap15;
str4 = str8;
break;
}
next = it11.next();
if (g().x(2)) {
s3 s3Var = g().n;
Integer valueOf = Integer.valueOf(intValue4);
if (next.v()) {
arrayMap3 = arrayMap15;
num = Integer.valueOf(next.w());
} else {
arrayMap3 = arrayMap15;
num = null;
}
str4 = str8;
s3Var.d("Evaluating filter. audience, filter, property", valueOf, num, d().y(next.x()));
g().n.b("Filter definition", m().y(next));
} else {
arrayMap3 = arrayMap15;
str4 = str8;
}
if (!next.v() || next.w() > 256) {
break;
}
ha haVar = new ha(this, this.d, intValue4, next);
z8 = haVar.i(this.g, this.h, i1Var, u(intValue4, next.w()));
if (!z8) {
this.e.add(Integer.valueOf(intValue4));
break;
}
s(intValue4).b(haVar);
arrayMap15 = arrayMap3;
str8 = str4;
}
g().i.c("Invalid property filter ID. appId, id", q3.s(this.d), String.valueOf(next.v() ? Integer.valueOf(next.w()) : null));
z8 = false;
if (!z8) {
this.e.add(Integer.valueOf(intValue4));
}
arrayMap15 = arrayMap3;
str8 = str4;
}
}
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
for (Integer num2 : keySet) {
int intValue5 = num2.intValue();
y0 a2 = this.f.get(Integer.valueOf(intValue5)).a(intValue5);
arrayList.add(a2);
g q6 = q();
String str11 = this.d;
g1 A = a2.A();
q6.n();
q6.b();
AnimatableValueParser.w(str11);
Objects.requireNonNull(A, "null reference");
byte[] d = A.d();
ContentValues contentValues2 = new ContentValues();
contentValues2.put("app_id", str11);
contentValues2.put(str3, Integer.valueOf(intValue5));
contentValues2.put("current_results", d);
try {
try {
if (q6.t().insertWithOnConflict("audience_filter_values", null, contentValues2, 5) == -1) {
q6.g().f.b("Failed to insert filter results (got -1). appId", q3.s(str11));
}
} catch (SQLiteException e13) {
e = e13;
q6.g().f.c("Error storing filter results. appId", q3.s(str11), e);
}
} catch (SQLiteException e14) {
e = e14;
q6.g().f.c("Error storing filter results. appId", q3.s(str11), e);
}
}
return arrayList;
} else {
map2 = Collections.emptyMap();
cursor3.close();
arrayMap2 = map2;
if (l9.b()) {
}
str3 = "audience_id";
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
}
}
}
arrayMap = emptyMap;
q = q();
str2 = this.d;
q.n();
q.b();
AnimatableValueParser.w(str2);
try {
cursor3 = q.t().query("audience_filter_values", new String[]{"audience_id", "current_results"}, "app_id=?", new String[]{str2}, null, null, null);
try {
if (!cursor3.moveToFirst()) {
}
} catch (SQLiteException e15) {
e3 = e15;
try {
q.g().f.c("Database error querying filter results. appId", q3.s(str2), e3);
if (l9.b()) {
}
if (cursor3 != null) {
}
arrayMap2 = null;
if (l9.b()) {
}
str3 = "audience_id";
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
} catch (Throwable th8) {
th = th8;
cursor = cursor3;
if (cursor != null) {
}
throw th;
}
}
} catch (SQLiteException e16) {
e3 = e16;
cursor3 = null;
q.g().f.c("Database error querying filter results. appId", q3.s(str2), e3);
if (l9.b() || !q.a.h.u(str2, p.F0)) {
if (cursor3 != null) {
cursor3.close();
}
arrayMap2 = null;
if (l9.b()) {
}
str3 = "audience_id";
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
}
map2 = Collections.emptyMap();
if (cursor3 != null) {
cursor3.close();
}
arrayMap2 = map2;
if (l9.b()) {
}
str3 = "audience_id";
String str8 = "Skipping failed audience ID";
if (!list.isEmpty()) {
}
if (!list2.isEmpty()) {
}
ArrayList arrayList = new ArrayList();
Set<Integer> keySet = this.f.keySet();
keySet.removeAll(this.e);
while (r2.hasNext()) {
}
return arrayList;
} catch (Throwable th9) {
th = th9;
cursor = null;
if (cursor != null) {
cursor.close();
}
throw th;
}
}
public final boolean u(int i, int i2) {
if (this.f.get(Integer.valueOf(i)) == null) {
return false;
}
return this.f.get(Integer.valueOf(i)).d.get(i2);
}
}