- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2173 lines
117 KiB
Java
2173 lines
117 KiB
Java
package com.google.android.gms.measurement.internal;
|
|
|
|
import android.content.ContentValues;
|
|
import android.database.Cursor;
|
|
import android.database.sqlite.SQLiteDatabase;
|
|
import android.database.sqlite.SQLiteException;
|
|
import android.os.Bundle;
|
|
import android.os.Parcelable;
|
|
import android.text.TextUtils;
|
|
import android.util.Pair;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import androidx.annotation.WorkerThread;
|
|
import androidx.collection.ArrayMap;
|
|
import androidx.webkit.ProxyConfig;
|
|
import com.facebook.share.internal.ShareConstants;
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
import com.google.android.gms.internal.measurement.zzff;
|
|
import com.google.android.gms.internal.measurement.zzfn;
|
|
import com.google.android.gms.internal.measurement.zzjk;
|
|
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
|
import com.tapjoy.TJAdUnitConstants;
|
|
import java.io.IOException;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes3.dex */
|
|
final class zzan extends zznb {
|
|
private static final String[] zza = {"last_bundled_timestamp", "ALTER TABLE events ADD COLUMN last_bundled_timestamp INTEGER;", "last_bundled_day", "ALTER TABLE events ADD COLUMN last_bundled_day INTEGER;", "last_sampled_complex_event_id", "ALTER TABLE events ADD COLUMN last_sampled_complex_event_id INTEGER;", "last_sampling_rate", "ALTER TABLE events ADD COLUMN last_sampling_rate INTEGER;", "last_exempt_from_sampling", "ALTER TABLE events ADD COLUMN last_exempt_from_sampling INTEGER;", "current_session_count", "ALTER TABLE events ADD COLUMN current_session_count INTEGER;"};
|
|
private static final String[] zzb = {"origin", "ALTER TABLE user_attributes ADD COLUMN origin TEXT;"};
|
|
private static final String[] zzc = {"app_version", "ALTER TABLE apps ADD COLUMN app_version TEXT;", "app_store", "ALTER TABLE apps ADD COLUMN app_store TEXT;", "gmp_version", "ALTER TABLE apps ADD COLUMN gmp_version INTEGER;", "dev_cert_hash", "ALTER TABLE apps ADD COLUMN dev_cert_hash INTEGER;", "measurement_enabled", "ALTER TABLE apps ADD COLUMN measurement_enabled INTEGER;", "last_bundle_start_timestamp", "ALTER TABLE apps ADD COLUMN last_bundle_start_timestamp INTEGER;", "day", "ALTER TABLE apps ADD COLUMN day INTEGER;", "daily_public_events_count", "ALTER TABLE apps ADD COLUMN daily_public_events_count INTEGER;", "daily_events_count", "ALTER TABLE apps ADD COLUMN daily_events_count INTEGER;", "daily_conversions_count", "ALTER TABLE apps ADD COLUMN daily_conversions_count INTEGER;", "remote_config", "ALTER TABLE apps ADD COLUMN remote_config BLOB;", "config_fetched_time", "ALTER TABLE apps ADD COLUMN config_fetched_time INTEGER;", "failed_config_fetch_time", "ALTER TABLE apps ADD COLUMN failed_config_fetch_time INTEGER;", "app_version_int", "ALTER TABLE apps ADD COLUMN app_version_int INTEGER;", "firebase_instance_id", "ALTER TABLE apps ADD COLUMN firebase_instance_id TEXT;", "daily_error_events_count", "ALTER TABLE apps ADD COLUMN daily_error_events_count INTEGER;", "daily_realtime_events_count", "ALTER TABLE apps ADD COLUMN daily_realtime_events_count INTEGER;", "health_monitor_sample", "ALTER TABLE apps ADD COLUMN health_monitor_sample TEXT;", "android_id", "ALTER TABLE apps ADD COLUMN android_id INTEGER;", "adid_reporting_enabled", "ALTER TABLE apps ADD COLUMN adid_reporting_enabled INTEGER;", "ssaid_reporting_enabled", "ALTER TABLE apps ADD COLUMN ssaid_reporting_enabled INTEGER;", "admob_app_id", "ALTER TABLE apps ADD COLUMN admob_app_id TEXT;", "linked_admob_app_id", "ALTER TABLE apps ADD COLUMN linked_admob_app_id TEXT;", "dynamite_version", "ALTER TABLE apps ADD COLUMN dynamite_version INTEGER;", "safelisted_events", "ALTER TABLE apps ADD COLUMN safelisted_events TEXT;", "ga_app_id", "ALTER TABLE apps ADD COLUMN ga_app_id TEXT;", "config_last_modified_time", "ALTER TABLE apps ADD COLUMN config_last_modified_time TEXT;", "e_tag", "ALTER TABLE apps ADD COLUMN e_tag TEXT;", "session_stitching_token", "ALTER TABLE apps ADD COLUMN session_stitching_token TEXT;", "sgtm_upload_enabled", "ALTER TABLE apps ADD COLUMN sgtm_upload_enabled INTEGER;", "target_os_version", "ALTER TABLE apps ADD COLUMN target_os_version INTEGER;", "session_stitching_token_hash", "ALTER TABLE apps ADD COLUMN session_stitching_token_hash INTEGER;", "ad_services_version", "ALTER TABLE apps ADD COLUMN ad_services_version INTEGER;", "unmatched_first_open_without_ad_id", "ALTER TABLE apps ADD COLUMN unmatched_first_open_without_ad_id INTEGER;", "npa_metadata_value", "ALTER TABLE apps ADD COLUMN npa_metadata_value INTEGER;", "attribution_eligibility_status", "ALTER TABLE apps ADD COLUMN attribution_eligibility_status INTEGER;", "sgtm_preview_key", "ALTER TABLE apps ADD COLUMN sgtm_preview_key TEXT;", "dma_consent_state", "ALTER TABLE apps ADD COLUMN dma_consent_state INTEGER;", "daily_realtime_dcu_count", "ALTER TABLE apps ADD COLUMN daily_realtime_dcu_count INTEGER;", "bundle_delivery_index", "ALTER TABLE apps ADD COLUMN bundle_delivery_index INTEGER;", "serialized_npa_metadata", "ALTER TABLE apps ADD COLUMN serialized_npa_metadata TEXT;", "unmatched_pfo", "ALTER TABLE apps ADD COLUMN unmatched_pfo INTEGER;", "unmatched_uwa", "ALTER TABLE apps ADD COLUMN unmatched_uwa INTEGER;"};
|
|
private static final String[] zzd = {"realtime", "ALTER TABLE raw_events ADD COLUMN realtime INTEGER;"};
|
|
private static final String[] zze = {"has_realtime", "ALTER TABLE queue ADD COLUMN has_realtime INTEGER;", "retry_count", "ALTER TABLE queue ADD COLUMN retry_count INTEGER;"};
|
|
private static final String[] zzg = {"session_scoped", "ALTER TABLE event_filters ADD COLUMN session_scoped BOOLEAN;"};
|
|
private static final String[] zzh = {"session_scoped", "ALTER TABLE property_filters ADD COLUMN session_scoped BOOLEAN;"};
|
|
private static final String[] zzi = {"previous_install_count", "ALTER TABLE app2 ADD COLUMN previous_install_count INTEGER;"};
|
|
private static final String[] zzj = {"consent_source", "ALTER TABLE consent_settings ADD COLUMN consent_source INTEGER;", "dma_consent_settings", "ALTER TABLE consent_settings ADD COLUMN dma_consent_settings TEXT;", "storage_consent_at_bundling", "ALTER TABLE consent_settings ADD COLUMN storage_consent_at_bundling TEXT;"};
|
|
private static final String[] zzk = {"idempotent", "CREATE INDEX IF NOT EXISTS trigger_uris_index ON trigger_uris (app_id);"};
|
|
private final zzat zzl;
|
|
private final zzmv zzm;
|
|
|
|
@WorkerThread
|
|
public final int zza(String str, String str2) {
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotEmpty(str2);
|
|
zzt();
|
|
zzak();
|
|
try {
|
|
return e_().delete("conditional_properties", "app_id=? and name=?", new String[]{str, str2});
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error deleting conditional property", zzfw.zza(str), zzi().zzc(str2), e);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.gms.measurement.internal.zznb
|
|
public final boolean zzc() {
|
|
return false;
|
|
}
|
|
|
|
public final long zza(String str) {
|
|
Preconditions.checkNotEmpty(str);
|
|
zzt();
|
|
zzak();
|
|
try {
|
|
return e_().delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", new String[]{str, String.valueOf(Math.max(0, Math.min(1000000, zze().zzb(str, zzbh.zzp))))});
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error deleting over the limit events. appId", zzfw.zza(str), e);
|
|
return 0L;
|
|
}
|
|
}
|
|
|
|
public final long b_() {
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
cursor = e_().rawQuery("select rowid from raw_events order by rowid desc limit 1;", null);
|
|
if (!cursor.moveToFirst()) {
|
|
cursor.close();
|
|
return -1L;
|
|
}
|
|
long j = cursor.getLong(0);
|
|
cursor.close();
|
|
return j;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error querying raw events", e);
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
return -1L;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public final long zza(zzfn.zzj zzjVar) throws IOException {
|
|
zzt();
|
|
zzak();
|
|
Preconditions.checkNotNull(zzjVar);
|
|
Preconditions.checkNotEmpty(zzjVar.zzy());
|
|
byte[] zzbx = zzjVar.zzbx();
|
|
long zza2 = g_().zza(zzbx);
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", zzjVar.zzy());
|
|
contentValues.put("metadata_fingerprint", Long.valueOf(zza2));
|
|
contentValues.put("metadata", zzbx);
|
|
try {
|
|
e_().insertWithOnConflict("raw_events_metadata", null, contentValues, 4);
|
|
return zza2;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing raw event metadata. appId", zzfw.zza(zzjVar.zzy()), e);
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@WorkerThread
|
|
public final long zzb(String str, String str2) {
|
|
long zza2;
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotEmpty(str2);
|
|
zzt();
|
|
zzak();
|
|
SQLiteDatabase e_ = e_();
|
|
e_.beginTransaction();
|
|
long j = 0;
|
|
try {
|
|
try {
|
|
zza2 = zza("select " + str2 + " from app2 where app_id=?", new String[]{str}, -1L);
|
|
if (zza2 == -1) {
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("first_open_count", (Integer) 0);
|
|
contentValues.put("previous_install_count", (Integer) 0);
|
|
if (e_.insertWithOnConflict("app2", null, contentValues, 5) == -1) {
|
|
zzj().zzg().zza("Failed to insert column (got -1). appId", zzfw.zza(str), str2);
|
|
return -1L;
|
|
}
|
|
zza2 = 0;
|
|
}
|
|
} finally {
|
|
e_.endTransaction();
|
|
}
|
|
} catch (SQLiteException e) {
|
|
e = e;
|
|
}
|
|
try {
|
|
ContentValues contentValues2 = new ContentValues();
|
|
contentValues2.put("app_id", str);
|
|
contentValues2.put(str2, Long.valueOf(1 + zza2));
|
|
if (e_.update("app2", contentValues2, "app_id = ?", new String[]{str}) == 0) {
|
|
zzj().zzg().zza("Failed to update column (got 0). appId", zzfw.zza(str), str2);
|
|
return -1L;
|
|
}
|
|
e_.setTransactionSuccessful();
|
|
return zza2;
|
|
} catch (SQLiteException e2) {
|
|
long j2 = zza2;
|
|
e = e2;
|
|
j = j2;
|
|
zzj().zzg().zza("Error inserting column. appId", zzfw.zza(str), str2, e);
|
|
e_.endTransaction();
|
|
return j;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final long zzb(String str) {
|
|
Preconditions.checkNotEmpty(str);
|
|
zzt();
|
|
zzak();
|
|
return zza("select first_open_count from app2 where app_id=?", new String[]{str}, -1L);
|
|
}
|
|
|
|
@WorkerThread
|
|
public final long c_() {
|
|
return zza("select max(bundle_end_timestamp) from queue", (String[]) null, 0L);
|
|
}
|
|
|
|
@WorkerThread
|
|
public final long d_() {
|
|
return zza("select max(timestamp) from raw_events", (String[]) null, 0L);
|
|
}
|
|
|
|
public final long zzc(String str) {
|
|
Preconditions.checkNotEmpty(str);
|
|
return zza("select count(1) from events where app_id=? and name not like '!_%' escape '!'", new String[]{str}, 0L);
|
|
}
|
|
|
|
@WorkerThread
|
|
private final long zzb(String str, String[] strArr) {
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor rawQuery = e_().rawQuery(str, strArr);
|
|
if (rawQuery.moveToFirst()) {
|
|
long j = rawQuery.getLong(0);
|
|
rawQuery.close();
|
|
return j;
|
|
}
|
|
throw new SQLiteException("Database returned empty set");
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Database error", str, e);
|
|
throw e;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
private final long zza(String str, String[] strArr, long j) {
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
cursor = e_().rawQuery(str, strArr);
|
|
if (cursor.moveToFirst()) {
|
|
long j2 = cursor.getLong(0);
|
|
cursor.close();
|
|
return j2;
|
|
}
|
|
cursor.close();
|
|
return j;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Database error", str, e);
|
|
throw e;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@WorkerThread
|
|
public final SQLiteDatabase e_() {
|
|
zzt();
|
|
try {
|
|
return this.zzl.getWritableDatabase();
|
|
} catch (SQLiteException e) {
|
|
zzj().zzu().zza("Error opening database", e);
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Not initialized variable reg: 1, insn: 0x002d: MOVE (r0 I:??[OBJECT, ARRAY]) = (r1 I:??[OBJECT, ARRAY]), block:B:30:0x002d */
|
|
/* JADX WARN: Removed duplicated region for block: B:32:0x0086 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final android.os.Bundle zzd(java.lang.String r6) {
|
|
/*
|
|
r5 = this;
|
|
r5.zzt()
|
|
r5.zzak()
|
|
r0 = 0
|
|
android.database.sqlite.SQLiteDatabase r1 = r5.e_() // Catch: java.lang.Throwable -> L6d android.database.sqlite.SQLiteException -> L6f
|
|
java.lang.String r2 = "select parameters from default_event_params where app_id=?"
|
|
java.lang.String[] r3 = new java.lang.String[]{r6} // Catch: java.lang.Throwable -> L6d android.database.sqlite.SQLiteException -> L6f
|
|
android.database.Cursor r1 = r1.rawQuery(r2, r3) // Catch: java.lang.Throwable -> L6d android.database.sqlite.SQLiteException -> L6f
|
|
boolean r2 = r1.moveToFirst() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
if (r2 != 0) goto L31
|
|
com.google.android.gms.measurement.internal.zzfw r6 = r5.zzj() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
com.google.android.gms.measurement.internal.zzfy r6 = r6.zzp() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
java.lang.String r2 = "Default event parameters not found"
|
|
r6.zza(r2) // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
r1.close()
|
|
return r0
|
|
L2c:
|
|
r6 = move-exception
|
|
r0 = r1
|
|
goto L84
|
|
L2f:
|
|
r6 = move-exception
|
|
goto L71
|
|
L31:
|
|
r2 = 0
|
|
byte[] r2 = r1.getBlob(r2) // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
com.google.android.gms.internal.measurement.zzfn$zze$zza r3 = com.google.android.gms.internal.measurement.zzfn.zze.zze() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f java.io.IOException -> L57
|
|
com.google.android.gms.internal.measurement.zzkt r2 = com.google.android.gms.measurement.internal.zznp.zza(r3, r2) // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f java.io.IOException -> L57
|
|
com.google.android.gms.internal.measurement.zzfn$zze$zza r2 = (com.google.android.gms.internal.measurement.zzfn.zze.zza) r2 // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f java.io.IOException -> L57
|
|
com.google.android.gms.internal.measurement.zzkq r2 = r2.zzag() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f java.io.IOException -> L57
|
|
com.google.android.gms.internal.measurement.zzjk r2 = (com.google.android.gms.internal.measurement.zzjk) r2 // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f java.io.IOException -> L57
|
|
com.google.android.gms.internal.measurement.zzfn$zze r2 = (com.google.android.gms.internal.measurement.zzfn.zze) r2 // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f java.io.IOException -> L57
|
|
r5.g_() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
java.util.List r6 = r2.zzh() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
android.os.Bundle r6 = com.google.android.gms.measurement.internal.zznp.zza(r6) // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
r1.close()
|
|
return r6
|
|
L57:
|
|
r2 = move-exception
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r5.zzj() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
java.lang.String r4 = "Failed to retrieve default event parameters. appId"
|
|
java.lang.Object r6 = com.google.android.gms.measurement.internal.zzfw.zza(r6) // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
r3.zza(r4, r6, r2) // Catch: java.lang.Throwable -> L2c android.database.sqlite.SQLiteException -> L2f
|
|
r1.close()
|
|
return r0
|
|
L6d:
|
|
r6 = move-exception
|
|
goto L84
|
|
L6f:
|
|
r6 = move-exception
|
|
r1 = r0
|
|
L71:
|
|
com.google.android.gms.measurement.internal.zzfw r2 = r5.zzj() // Catch: java.lang.Throwable -> L2c
|
|
com.google.android.gms.measurement.internal.zzfy r2 = r2.zzg() // Catch: java.lang.Throwable -> L2c
|
|
java.lang.String r3 = "Error selecting default event parameters"
|
|
r2.zza(r3, r6) // Catch: java.lang.Throwable -> L2c
|
|
if (r1 == 0) goto L83
|
|
r1.close()
|
|
L83:
|
|
return r0
|
|
L84:
|
|
if (r0 == 0) goto L89
|
|
r0.close()
|
|
L89:
|
|
throw r6
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzd(java.lang.String):android.os.Bundle");
|
|
}
|
|
|
|
/* JADX WARN: Not initialized variable reg: 1, insn: 0x0036: MOVE (r0 I:??[OBJECT, ARRAY]) = (r1 I:??[OBJECT, ARRAY]), block:B:29:0x0036 */
|
|
/* JADX WARN: Removed duplicated region for block: B:31:0x008f */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final android.util.Pair<com.google.android.gms.internal.measurement.zzfn.zze, java.lang.Long> zza(java.lang.String r8, java.lang.Long r9) {
|
|
/*
|
|
r7 = this;
|
|
r7.zzt()
|
|
r7.zzak()
|
|
r0 = 0
|
|
android.database.sqlite.SQLiteDatabase r1 = r7.e_() // Catch: java.lang.Throwable -> L76 android.database.sqlite.SQLiteException -> L78
|
|
java.lang.String r2 = "select main_event, children_to_process from main_event_params where app_id=? and event_id=?"
|
|
r3 = 2
|
|
java.lang.String[] r3 = new java.lang.String[r3] // Catch: java.lang.Throwable -> L76 android.database.sqlite.SQLiteException -> L78
|
|
r4 = 0
|
|
r3[r4] = r8 // Catch: java.lang.Throwable -> L76 android.database.sqlite.SQLiteException -> L78
|
|
java.lang.String r5 = java.lang.String.valueOf(r9) // Catch: java.lang.Throwable -> L76 android.database.sqlite.SQLiteException -> L78
|
|
r6 = 1
|
|
r3[r6] = r5 // Catch: java.lang.Throwable -> L76 android.database.sqlite.SQLiteException -> L78
|
|
android.database.Cursor r1 = r1.rawQuery(r2, r3) // Catch: java.lang.Throwable -> L76 android.database.sqlite.SQLiteException -> L78
|
|
boolean r2 = r1.moveToFirst() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
if (r2 != 0) goto L3a
|
|
com.google.android.gms.measurement.internal.zzfw r8 = r7.zzj() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
com.google.android.gms.measurement.internal.zzfy r8 = r8.zzp() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
java.lang.String r9 = "Main event not found"
|
|
r8.zza(r9) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
r1.close()
|
|
return r0
|
|
L35:
|
|
r8 = move-exception
|
|
r0 = r1
|
|
goto L8d
|
|
L38:
|
|
r8 = move-exception
|
|
goto L7a
|
|
L3a:
|
|
byte[] r2 = r1.getBlob(r4) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
long r3 = r1.getLong(r6) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
java.lang.Long r3 = java.lang.Long.valueOf(r3) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
com.google.android.gms.internal.measurement.zzfn$zze$zza r4 = com.google.android.gms.internal.measurement.zzfn.zze.zze() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38 java.io.IOException -> L60
|
|
com.google.android.gms.internal.measurement.zzkt r2 = com.google.android.gms.measurement.internal.zznp.zza(r4, r2) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38 java.io.IOException -> L60
|
|
com.google.android.gms.internal.measurement.zzfn$zze$zza r2 = (com.google.android.gms.internal.measurement.zzfn.zze.zza) r2 // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38 java.io.IOException -> L60
|
|
com.google.android.gms.internal.measurement.zzkq r2 = r2.zzag() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38 java.io.IOException -> L60
|
|
com.google.android.gms.internal.measurement.zzjk r2 = (com.google.android.gms.internal.measurement.zzjk) r2 // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38 java.io.IOException -> L60
|
|
com.google.android.gms.internal.measurement.zzfn$zze r2 = (com.google.android.gms.internal.measurement.zzfn.zze) r2 // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38 java.io.IOException -> L60
|
|
android.util.Pair r8 = android.util.Pair.create(r2, r3) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
r1.close()
|
|
return r8
|
|
L60:
|
|
r2 = move-exception
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r7.zzj() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
java.lang.String r4 = "Failed to merge main event. appId, eventId"
|
|
java.lang.Object r8 = com.google.android.gms.measurement.internal.zzfw.zza(r8) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
r3.zza(r4, r8, r9, r2) // Catch: java.lang.Throwable -> L35 android.database.sqlite.SQLiteException -> L38
|
|
r1.close()
|
|
return r0
|
|
L76:
|
|
r8 = move-exception
|
|
goto L8d
|
|
L78:
|
|
r8 = move-exception
|
|
r1 = r0
|
|
L7a:
|
|
com.google.android.gms.measurement.internal.zzfw r9 = r7.zzj() // Catch: java.lang.Throwable -> L35
|
|
com.google.android.gms.measurement.internal.zzfy r9 = r9.zzg() // Catch: java.lang.Throwable -> L35
|
|
java.lang.String r2 = "Error selecting main event"
|
|
r9.zza(r2, r8) // Catch: java.lang.Throwable -> L35
|
|
if (r1 == 0) goto L8c
|
|
r1.close()
|
|
L8c:
|
|
return r0
|
|
L8d:
|
|
if (r0 == 0) goto L92
|
|
r0.close()
|
|
L92:
|
|
throw r8
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zza(java.lang.String, java.lang.Long):android.util.Pair");
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:103:0x03f0 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:111:0x041f A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TRY_LEAVE, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:115:0x03a5 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:119:0x028a A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:121:0x0235 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:135:0x0453 */
|
|
/* JADX WARN: Removed duplicated region for block: B:137:? A[SYNTHETIC] */
|
|
/* JADX WARN: Removed duplicated region for block: B:19:0x0181 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:27:0x01e6 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:33:0x0231 */
|
|
/* JADX WARN: Removed duplicated region for block: B:36:0x0269 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:42:0x0287 */
|
|
/* JADX WARN: Removed duplicated region for block: B:45:0x0299 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:48:0x02b1 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:61:0x02f8 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:65:0x030d A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:76:0x0357 A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:81:0x037b A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:92:0x03a3 */
|
|
/* JADX WARN: Removed duplicated region for block: B:95:0x03cb A[Catch: all -> 0x0164, SQLiteException -> 0x0169, TryCatch #1 {SQLiteException -> 0x0169, blocks: (B:5:0x012e, B:10:0x0138, B:12:0x0149, B:14:0x0155, B:17:0x0174, B:19:0x0181, B:21:0x018d, B:25:0x01a6, B:27:0x01e6, B:31:0x01f0, B:34:0x023a, B:36:0x0269, B:40:0x0273, B:43:0x028e, B:45:0x0299, B:46:0x02ab, B:48:0x02b1, B:50:0x02bd, B:52:0x02c9, B:54:0x02cf, B:56:0x02db, B:58:0x02e9, B:59:0x02f2, B:61:0x02f8, B:63:0x0304, B:65:0x030d, B:67:0x0315, B:70:0x031e, B:72:0x0336, B:74:0x033f, B:76:0x0357, B:78:0x0363, B:79:0x0375, B:81:0x037b, B:83:0x0387, B:85:0x038f, B:88:0x0398, B:90:0x039b, B:93:0x03b0, B:95:0x03cb, B:97:0x03d7, B:100:0x03e1, B:101:0x03e4, B:103:0x03f0, B:105:0x03f8, B:106:0x0403, B:108:0x040b, B:109:0x0416, B:111:0x041f, B:115:0x03a5, B:118:0x03ac, B:119:0x028a, B:121:0x0235, B:123:0x019e, B:124:0x016d), top: B:4:0x012e }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:99:0x03df */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final com.google.android.gms.measurement.internal.zzf zze(java.lang.String r27) {
|
|
/*
|
|
Method dump skipped, instructions count: 1111
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zze(java.lang.String):com.google.android.gms.measurement.internal.zzf");
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:34:0x0156 */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final com.google.android.gms.measurement.internal.zzac zzc(java.lang.String r36, java.lang.String r37) {
|
|
/*
|
|
Method dump skipped, instructions count: 346
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzc(java.lang.String, java.lang.String):com.google.android.gms.measurement.internal.zzac");
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:29:0x008e */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final com.google.android.gms.measurement.internal.zzap zzf(java.lang.String r13) {
|
|
/*
|
|
r12 = this;
|
|
com.google.android.gms.common.internal.Preconditions.checkNotEmpty(r13)
|
|
r12.zzt()
|
|
r12.zzak()
|
|
r0 = 0
|
|
android.database.sqlite.SQLiteDatabase r1 = r12.e_() // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
java.lang.String r2 = "apps"
|
|
r3 = 3
|
|
java.lang.String[] r3 = new java.lang.String[r3] // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
java.lang.String r4 = "remote_config"
|
|
r9 = 0
|
|
r3[r9] = r4 // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
java.lang.String r4 = "config_last_modified_time"
|
|
r10 = 1
|
|
r3[r10] = r4 // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
java.lang.String r4 = "e_tag"
|
|
r11 = 2
|
|
r3[r11] = r4 // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
java.lang.String r4 = "app_id=?"
|
|
java.lang.String[] r5 = new java.lang.String[]{r13} // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
r6 = 0
|
|
r7 = 0
|
|
r8 = 0
|
|
android.database.Cursor r1 = r1.query(r2, r3, r4, r5, r6, r7, r8) // Catch: java.lang.Throwable -> L71 android.database.sqlite.SQLiteException -> L73
|
|
boolean r2 = r1.moveToFirst() // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
if (r2 != 0) goto L39
|
|
r1.close()
|
|
return r0
|
|
L39:
|
|
byte[] r2 = r1.getBlob(r9) // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
java.lang.String r3 = r1.getString(r10) // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
java.lang.String r4 = r1.getString(r11) // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
boolean r5 = r1.moveToNext() // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
if (r5 == 0) goto L62
|
|
com.google.android.gms.measurement.internal.zzfw r5 = r12.zzj() // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
com.google.android.gms.measurement.internal.zzfy r5 = r5.zzg() // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
java.lang.String r6 = "Got multiple records for app config, expected one. appId"
|
|
java.lang.Object r7 = com.google.android.gms.measurement.internal.zzfw.zza(r13) // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
r5.zza(r6, r7) // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
goto L62
|
|
L5d:
|
|
r13 = move-exception
|
|
r0 = r1
|
|
goto L8c
|
|
L60:
|
|
r2 = move-exception
|
|
goto L75
|
|
L62:
|
|
if (r2 != 0) goto L68
|
|
r1.close()
|
|
return r0
|
|
L68:
|
|
com.google.android.gms.measurement.internal.zzap r5 = new com.google.android.gms.measurement.internal.zzap // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
r5.<init>(r2, r3, r4) // Catch: java.lang.Throwable -> L5d android.database.sqlite.SQLiteException -> L60
|
|
r1.close()
|
|
return r5
|
|
L71:
|
|
r13 = move-exception
|
|
goto L8c
|
|
L73:
|
|
r2 = move-exception
|
|
r1 = r0
|
|
L75:
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r12.zzj() // Catch: java.lang.Throwable -> L5d
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L5d
|
|
java.lang.String r4 = "Error querying remote config. appId"
|
|
java.lang.Object r13 = com.google.android.gms.measurement.internal.zzfw.zza(r13) // Catch: java.lang.Throwable -> L5d
|
|
r3.zza(r4, r13, r2) // Catch: java.lang.Throwable -> L5d
|
|
if (r1 == 0) goto L8b
|
|
r1.close()
|
|
L8b:
|
|
return r0
|
|
L8c:
|
|
if (r0 == 0) goto L91
|
|
r0.close()
|
|
L91:
|
|
throw r13
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzf(java.lang.String):com.google.android.gms.measurement.internal.zzap");
|
|
}
|
|
|
|
@WorkerThread
|
|
public final zzao zza(long j, String str, boolean z, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
|
|
return zza(j, str, 1L, false, false, z3, false, z5, z6);
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:40:0x0151 */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final com.google.android.gms.measurement.internal.zzao zza(long r23, java.lang.String r25, long r26, boolean r28, boolean r29, boolean r30, boolean r31, boolean r32, boolean r33) {
|
|
/*
|
|
Method dump skipped, instructions count: 341
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zza(long, java.lang.String, long, boolean, boolean, boolean, boolean, boolean, boolean):com.google.android.gms.measurement.internal.zzao");
|
|
}
|
|
|
|
public final zzax zzg(String str) {
|
|
Preconditions.checkNotNull(str);
|
|
zzt();
|
|
zzak();
|
|
return zzax.zza(zza("select dma_consent_settings from consent_settings where app_id=? limit 1;", new String[]{str}, ""));
|
|
}
|
|
|
|
@WorkerThread
|
|
public final zzbb zzd(String str, String str2) {
|
|
return zzc("events", str, str2);
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:53:0x012c */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private final com.google.android.gms.measurement.internal.zzbb zzc(java.lang.String r29, java.lang.String r30, java.lang.String r31) {
|
|
/*
|
|
Method dump skipped, instructions count: 304
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzc(java.lang.String, java.lang.String, java.lang.String):com.google.android.gms.measurement.internal.zzbb");
|
|
}
|
|
|
|
public final zzin zzh(String str) {
|
|
Preconditions.checkNotNull(str);
|
|
zzt();
|
|
zzak();
|
|
return zzin.zzb(zza("select storage_consent_at_bundling from consent_settings where app_id=? limit 1;", new String[]{str}, ""));
|
|
}
|
|
|
|
public final zzin zzi(String str) {
|
|
Preconditions.checkNotNull(str);
|
|
zzt();
|
|
zzak();
|
|
zzin zzinVar = (zzin) zza("select consent_state, consent_source from consent_settings where app_id=? limit 1;", new String[]{str}, new zzaq() { // from class: com.google.android.gms.measurement.internal.zzam
|
|
@Override // com.google.android.gms.measurement.internal.zzaq
|
|
public final Object zza(Cursor cursor) {
|
|
zzin zza2;
|
|
zza2 = zzin.zza(cursor.getString(0), cursor.getInt(1));
|
|
return zza2;
|
|
}
|
|
});
|
|
return zzinVar == null ? zzin.zza : zzinVar;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:29:0x009c */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final com.google.android.gms.measurement.internal.zznq zze(java.lang.String r14, java.lang.String r15) {
|
|
/*
|
|
r13 = this;
|
|
com.google.android.gms.common.internal.Preconditions.checkNotEmpty(r14)
|
|
com.google.android.gms.common.internal.Preconditions.checkNotEmpty(r15)
|
|
r13.zzt()
|
|
r13.zzak()
|
|
r1 = 0
|
|
android.database.sqlite.SQLiteDatabase r2 = r13.e_() // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
java.lang.String r3 = "user_attributes"
|
|
r0 = 3
|
|
java.lang.String[] r4 = new java.lang.String[r0] // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
java.lang.String r0 = "set_timestamp"
|
|
r10 = 0
|
|
r4[r10] = r0 // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
java.lang.String r0 = "value"
|
|
r11 = 1
|
|
r4[r11] = r0 // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
java.lang.String r0 = "origin"
|
|
r12 = 2
|
|
r4[r12] = r0 // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
java.lang.String r5 = "app_id=? and name=?"
|
|
java.lang.String[] r6 = new java.lang.String[]{r14, r15} // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
r7 = 0
|
|
r8 = 0
|
|
r9 = 0
|
|
android.database.Cursor r2 = r2.query(r3, r4, r5, r6, r7, r8, r9) // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
boolean r0 = r2.moveToFirst() // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
if (r0 != 0) goto L3c
|
|
r2.close()
|
|
return r1
|
|
L3c:
|
|
long r7 = r2.getLong(r10) // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
java.lang.Object r9 = r13.zza(r2, r11) // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
if (r9 != 0) goto L4a
|
|
r2.close()
|
|
return r1
|
|
L4a:
|
|
java.lang.String r5 = r2.getString(r12) // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
com.google.android.gms.measurement.internal.zznq r0 = new com.google.android.gms.measurement.internal.zznq // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
r3 = r0
|
|
r4 = r14
|
|
r6 = r15
|
|
r3.<init>(r4, r5, r6, r7, r9) // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
boolean r3 = r2.moveToNext() // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
if (r3 == 0) goto L73
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r13.zzj() // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
java.lang.String r4 = "Got multiple records for user property, expected one. appId"
|
|
java.lang.Object r5 = com.google.android.gms.measurement.internal.zzfw.zza(r14) // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
r3.zza(r4, r5) // Catch: java.lang.Throwable -> L6e android.database.sqlite.SQLiteException -> L71
|
|
goto L73
|
|
L6e:
|
|
r0 = move-exception
|
|
r1 = r2
|
|
goto L9a
|
|
L71:
|
|
r0 = move-exception
|
|
goto L7b
|
|
L73:
|
|
r2.close()
|
|
return r0
|
|
L77:
|
|
r0 = move-exception
|
|
goto L9a
|
|
L79:
|
|
r0 = move-exception
|
|
r2 = r1
|
|
L7b:
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r13.zzj() // Catch: java.lang.Throwable -> L6e
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L6e
|
|
java.lang.String r4 = "Error querying user property. appId"
|
|
java.lang.Object r5 = com.google.android.gms.measurement.internal.zzfw.zza(r14) // Catch: java.lang.Throwable -> L6e
|
|
com.google.android.gms.measurement.internal.zzfv r6 = r13.zzi() // Catch: java.lang.Throwable -> L6e
|
|
java.lang.String r6 = r6.zzc(r15) // Catch: java.lang.Throwable -> L6e
|
|
r3.zza(r4, r5, r6, r0) // Catch: java.lang.Throwable -> L6e
|
|
if (r2 == 0) goto L99
|
|
r2.close()
|
|
L99:
|
|
return r1
|
|
L9a:
|
|
if (r1 == 0) goto L9f
|
|
r1.close()
|
|
L9f:
|
|
throw r0
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zze(java.lang.String, java.lang.String):com.google.android.gms.measurement.internal.zznq");
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@WorkerThread
|
|
private final Object zza(Cursor cursor, int i) {
|
|
int type = cursor.getType(i);
|
|
if (type == 0) {
|
|
zzj().zzg().zza("Loaded invalid null value from database");
|
|
return null;
|
|
}
|
|
if (type == 1) {
|
|
return Long.valueOf(cursor.getLong(i));
|
|
}
|
|
if (type == 2) {
|
|
return Double.valueOf(cursor.getDouble(i));
|
|
}
|
|
if (type == 3) {
|
|
return cursor.getString(i);
|
|
}
|
|
if (type == 4) {
|
|
zzj().zzg().zza("Loaded invalid blob type value, ignoring it");
|
|
return null;
|
|
}
|
|
zzj().zzg().zza("Loaded invalid unknown value type, ignoring it", Integer.valueOf(type));
|
|
return null;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:23:0x0046 */
|
|
/* JADX WARN: Type inference failed for: r0v0 */
|
|
/* JADX WARN: Type inference failed for: r0v1, types: [android.database.Cursor] */
|
|
/* JADX WARN: Type inference failed for: r0v2 */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private final <T> T zza(java.lang.String r3, java.lang.String[] r4, com.google.android.gms.measurement.internal.zzaq<T> r5) {
|
|
/*
|
|
r2 = this;
|
|
r0 = 0
|
|
android.database.sqlite.SQLiteDatabase r1 = r2.e_() // Catch: java.lang.Throwable -> L2d android.database.sqlite.SQLiteException -> L2f
|
|
android.database.Cursor r3 = r1.rawQuery(r3, r4) // Catch: java.lang.Throwable -> L2d android.database.sqlite.SQLiteException -> L2f
|
|
boolean r4 = r3.moveToFirst() // Catch: java.lang.Throwable -> L20 android.database.sqlite.SQLiteException -> L23
|
|
if (r4 != 0) goto L25
|
|
com.google.android.gms.measurement.internal.zzfw r4 = r2.zzj() // Catch: java.lang.Throwable -> L20 android.database.sqlite.SQLiteException -> L23
|
|
com.google.android.gms.measurement.internal.zzfy r4 = r4.zzp() // Catch: java.lang.Throwable -> L20 android.database.sqlite.SQLiteException -> L23
|
|
java.lang.String r5 = "No data found"
|
|
r4.zza(r5) // Catch: java.lang.Throwable -> L20 android.database.sqlite.SQLiteException -> L23
|
|
r3.close()
|
|
return r0
|
|
L20:
|
|
r4 = move-exception
|
|
r0 = r3
|
|
goto L44
|
|
L23:
|
|
r4 = move-exception
|
|
goto L31
|
|
L25:
|
|
java.lang.Object r4 = r5.zza(r3) // Catch: java.lang.Throwable -> L20 android.database.sqlite.SQLiteException -> L23
|
|
r3.close()
|
|
return r4
|
|
L2d:
|
|
r4 = move-exception
|
|
goto L44
|
|
L2f:
|
|
r4 = move-exception
|
|
r3 = r0
|
|
L31:
|
|
com.google.android.gms.measurement.internal.zzfw r5 = r2.zzj() // Catch: java.lang.Throwable -> L20
|
|
com.google.android.gms.measurement.internal.zzfy r5 = r5.zzg() // Catch: java.lang.Throwable -> L20
|
|
java.lang.String r1 = "Error querying database."
|
|
r5.zza(r1, r4) // Catch: java.lang.Throwable -> L20
|
|
if (r3 == 0) goto L43
|
|
r3.close()
|
|
L43:
|
|
return r0
|
|
L44:
|
|
if (r0 == 0) goto L49
|
|
r0.close()
|
|
L49:
|
|
throw r4
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zza(java.lang.String, java.lang.String[], com.google.android.gms.measurement.internal.zzaq):java.lang.Object");
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:23:0x0058 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.lang.String zza(long r5) {
|
|
/*
|
|
r4 = this;
|
|
r4.zzt()
|
|
r4.zzak()
|
|
r0 = 0
|
|
android.database.sqlite.SQLiteDatabase r1 = r4.e_() // Catch: java.lang.Throwable -> L3f android.database.sqlite.SQLiteException -> L41
|
|
java.lang.String r2 = "select app_id from apps where app_id in (select distinct app_id from raw_events) and config_fetched_time < ? order by failed_config_fetch_time limit 1;"
|
|
r3 = 1
|
|
java.lang.String[] r3 = new java.lang.String[r3] // Catch: java.lang.Throwable -> L3f android.database.sqlite.SQLiteException -> L41
|
|
java.lang.String r5 = java.lang.String.valueOf(r5) // Catch: java.lang.Throwable -> L3f android.database.sqlite.SQLiteException -> L41
|
|
r6 = 0
|
|
r3[r6] = r5 // Catch: java.lang.Throwable -> L3f android.database.sqlite.SQLiteException -> L41
|
|
android.database.Cursor r5 = r1.rawQuery(r2, r3) // Catch: java.lang.Throwable -> L3f android.database.sqlite.SQLiteException -> L41
|
|
boolean r1 = r5.moveToFirst() // Catch: java.lang.Throwable -> L32 android.database.sqlite.SQLiteException -> L35
|
|
if (r1 != 0) goto L37
|
|
com.google.android.gms.measurement.internal.zzfw r6 = r4.zzj() // Catch: java.lang.Throwable -> L32 android.database.sqlite.SQLiteException -> L35
|
|
com.google.android.gms.measurement.internal.zzfy r6 = r6.zzp() // Catch: java.lang.Throwable -> L32 android.database.sqlite.SQLiteException -> L35
|
|
java.lang.String r1 = "No expired configs for apps with pending events"
|
|
r6.zza(r1) // Catch: java.lang.Throwable -> L32 android.database.sqlite.SQLiteException -> L35
|
|
r5.close()
|
|
return r0
|
|
L32:
|
|
r6 = move-exception
|
|
r0 = r5
|
|
goto L56
|
|
L35:
|
|
r6 = move-exception
|
|
goto L43
|
|
L37:
|
|
java.lang.String r6 = r5.getString(r6) // Catch: java.lang.Throwable -> L32 android.database.sqlite.SQLiteException -> L35
|
|
r5.close()
|
|
return r6
|
|
L3f:
|
|
r6 = move-exception
|
|
goto L56
|
|
L41:
|
|
r6 = move-exception
|
|
r5 = r0
|
|
L43:
|
|
com.google.android.gms.measurement.internal.zzfw r1 = r4.zzj() // Catch: java.lang.Throwable -> L32
|
|
com.google.android.gms.measurement.internal.zzfy r1 = r1.zzg() // Catch: java.lang.Throwable -> L32
|
|
java.lang.String r2 = "Error selecting expired configs"
|
|
r1.zza(r2, r6) // Catch: java.lang.Throwable -> L32
|
|
if (r5 == 0) goto L55
|
|
r5.close()
|
|
L55:
|
|
return r0
|
|
L56:
|
|
if (r0 == 0) goto L5b
|
|
r0.close()
|
|
L5b:
|
|
throw r6
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zza(long):java.lang.String");
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:22:0x003e */
|
|
/* JADX WARN: Type inference failed for: r0v0, types: [android.database.sqlite.SQLiteDatabase] */
|
|
/* JADX WARN: Type inference failed for: r0v2 */
|
|
/* JADX WARN: Type inference failed for: r0v4, types: [android.database.Cursor] */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.lang.String f_() {
|
|
/*
|
|
r6 = this;
|
|
android.database.sqlite.SQLiteDatabase r0 = r6.e_()
|
|
r1 = 0
|
|
java.lang.String r2 = "select app_id from queue order by has_realtime desc, rowid asc limit 1;"
|
|
android.database.Cursor r0 = r0.rawQuery(r2, r1) // Catch: java.lang.Throwable -> L22 android.database.sqlite.SQLiteException -> L27
|
|
boolean r2 = r0.moveToFirst() // Catch: java.lang.Throwable -> L1a android.database.sqlite.SQLiteException -> L1c
|
|
if (r2 == 0) goto L1e
|
|
r2 = 0
|
|
java.lang.String r1 = r0.getString(r2) // Catch: java.lang.Throwable -> L1a android.database.sqlite.SQLiteException -> L1c
|
|
r0.close()
|
|
return r1
|
|
L1a:
|
|
r1 = move-exception
|
|
goto L3c
|
|
L1c:
|
|
r2 = move-exception
|
|
goto L29
|
|
L1e:
|
|
r0.close()
|
|
return r1
|
|
L22:
|
|
r0 = move-exception
|
|
r5 = r1
|
|
r1 = r0
|
|
r0 = r5
|
|
goto L3c
|
|
L27:
|
|
r2 = move-exception
|
|
r0 = r1
|
|
L29:
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r6.zzj() // Catch: java.lang.Throwable -> L1a
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L1a
|
|
java.lang.String r4 = "Database error getting next bundle app id"
|
|
r3.zza(r4, r2) // Catch: java.lang.Throwable -> L1a
|
|
if (r0 == 0) goto L3b
|
|
r0.close()
|
|
L3b:
|
|
return r1
|
|
L3c:
|
|
if (r0 == 0) goto L41
|
|
r0.close()
|
|
L41:
|
|
throw r1
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.f_():java.lang.String");
|
|
}
|
|
|
|
@WorkerThread
|
|
private final String zza(String str, String[] strArr, String str2) {
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
cursor = e_().rawQuery(str, strArr);
|
|
if (cursor.moveToFirst()) {
|
|
String string = cursor.getString(0);
|
|
cursor.close();
|
|
return string;
|
|
}
|
|
cursor.close();
|
|
return str2;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Database error", str, e);
|
|
throw e;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final List<Pair<zzfn.zzj, Long>> zza(String str, int i, int i2) {
|
|
byte[] zzc2;
|
|
long j;
|
|
long j2;
|
|
zzt();
|
|
zzak();
|
|
int i3 = 1;
|
|
Preconditions.checkArgument(i > 0);
|
|
Preconditions.checkArgument(i2 > 0);
|
|
Preconditions.checkNotEmpty(str);
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor query = e_().query("queue", new String[]{"rowid", "data", "retry_count"}, "app_id=?", new String[]{str}, null, null, "rowid", String.valueOf(i));
|
|
if (!query.moveToFirst()) {
|
|
List<Pair<zzfn.zzj, Long>> emptyList = Collections.emptyList();
|
|
query.close();
|
|
return emptyList;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
int i4 = 0;
|
|
while (true) {
|
|
long j3 = query.getLong(0);
|
|
try {
|
|
zzc2 = g_().zzc(query.getBlob(i3));
|
|
} catch (IOException e) {
|
|
zzj().zzg().zza("Failed to unzip queued bundle. appId", zzfw.zza(str), e);
|
|
}
|
|
if (!arrayList.isEmpty() && zzc2.length + i4 > i2) {
|
|
break;
|
|
}
|
|
try {
|
|
zzfn.zzj.zza zzaVar = (zzfn.zzj.zza) zznp.zza(zzfn.zzj.zzv(), zzc2);
|
|
if (!arrayList.isEmpty()) {
|
|
zzfn.zzj zzjVar = (zzfn.zzj) ((Pair) arrayList.get(0)).first;
|
|
zzfn.zzj zzjVar2 = (zzfn.zzj) ((com.google.android.gms.internal.measurement.zzjk) zzaVar.zzag());
|
|
if (!zzjVar.zzad().equals(zzjVar2.zzad()) || !zzjVar.zzac().equals(zzjVar2.zzac()) || zzjVar.zzat() != zzjVar2.zzat() || !zzjVar.zzae().equals(zzjVar2.zzae())) {
|
|
break;
|
|
}
|
|
Iterator<zzfn.zzn> it = zzjVar.zzar().iterator();
|
|
while (true) {
|
|
j = -1;
|
|
if (!it.hasNext()) {
|
|
j2 = -1;
|
|
break;
|
|
}
|
|
zzfn.zzn next = it.next();
|
|
if ("_npa".equals(next.zzg())) {
|
|
j2 = next.zzc();
|
|
break;
|
|
}
|
|
}
|
|
Iterator<zzfn.zzn> it2 = zzjVar2.zzar().iterator();
|
|
while (true) {
|
|
if (!it2.hasNext()) {
|
|
break;
|
|
}
|
|
zzfn.zzn next2 = it2.next();
|
|
if ("_npa".equals(next2.zzg())) {
|
|
j = next2.zzc();
|
|
break;
|
|
}
|
|
}
|
|
if (j2 != j) {
|
|
break;
|
|
}
|
|
}
|
|
if (!query.isNull(2)) {
|
|
zzaVar.zzi(query.getInt(2));
|
|
}
|
|
i4 += zzc2.length;
|
|
arrayList.add(Pair.create((zzfn.zzj) ((com.google.android.gms.internal.measurement.zzjk) zzaVar.zzag()), Long.valueOf(j3)));
|
|
} catch (IOException e2) {
|
|
zzj().zzg().zza("Failed to merge queued bundle. appId", zzfw.zza(str), e2);
|
|
}
|
|
if (!query.moveToNext() || i4 > i2) {
|
|
break;
|
|
}
|
|
i3 = 1;
|
|
}
|
|
query.close();
|
|
return arrayList;
|
|
} catch (SQLiteException e3) {
|
|
zzj().zzg().zza("Error querying bundles. appId", zzfw.zza(str), e3);
|
|
List<Pair<zzfn.zzj, Long>> emptyList2 = Collections.emptyList();
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
return emptyList2;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final List<zzac> zza(String str, String str2, String str3) {
|
|
Preconditions.checkNotEmpty(str);
|
|
zzt();
|
|
zzak();
|
|
ArrayList arrayList = new ArrayList(3);
|
|
arrayList.add(str);
|
|
StringBuilder sb = new StringBuilder("app_id=?");
|
|
if (!TextUtils.isEmpty(str2)) {
|
|
arrayList.add(str2);
|
|
sb.append(" and origin=?");
|
|
}
|
|
if (!TextUtils.isEmpty(str3)) {
|
|
arrayList.add(str3 + ProxyConfig.MATCH_ALL_SCHEMES);
|
|
sb.append(" and name glob ?");
|
|
}
|
|
return zza(sb.toString(), (String[]) arrayList.toArray(new String[arrayList.size()]));
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:23:0x008a, code lost:
|
|
|
|
zzj().zzg().zza("Read more than the max allowed conditional properties, ignoring extra", 1000);
|
|
*/
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:35:0x016d */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.util.List<com.google.android.gms.measurement.internal.zzac> zza(java.lang.String r40, java.lang.String[] r41) {
|
|
/*
|
|
Method dump skipped, instructions count: 369
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zza(java.lang.String, java.lang.String[]):java.util.List");
|
|
}
|
|
|
|
public final List<zzmu> zzj(String str) {
|
|
Preconditions.checkNotEmpty(str);
|
|
zzt();
|
|
zzak();
|
|
ArrayList arrayList = new ArrayList();
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
cursor = e_().query("trigger_uris", new String[]{"trigger_uri", "timestamp_millis", ShareConstants.FEED_SOURCE_PARAM}, "app_id=?", new String[]{str}, null, null, "rowid", null);
|
|
if (!cursor.moveToFirst()) {
|
|
cursor.close();
|
|
return arrayList;
|
|
}
|
|
do {
|
|
String string = cursor.getString(0);
|
|
if (string == null) {
|
|
string = "";
|
|
}
|
|
arrayList.add(new zzmu(string, cursor.getLong(1), cursor.getInt(2)));
|
|
} while (cursor.moveToNext());
|
|
cursor.close();
|
|
return arrayList;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error querying trigger uris. appId", zzfw.zza(str), e);
|
|
List<zzmu> emptyList = Collections.emptyList();
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
return emptyList;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:36:0x00ad */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.util.List<com.google.android.gms.measurement.internal.zznq> zzk(java.lang.String r16) {
|
|
/*
|
|
r15 = this;
|
|
com.google.android.gms.common.internal.Preconditions.checkNotEmpty(r16)
|
|
r15.zzt()
|
|
r15.zzak()
|
|
java.util.ArrayList r0 = new java.util.ArrayList
|
|
r0.<init>()
|
|
r1 = 0
|
|
android.database.sqlite.SQLiteDatabase r2 = r15.e_() // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r3 = "user_attributes"
|
|
r4 = 4
|
|
java.lang.String[] r4 = new java.lang.String[r4] // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r5 = "name"
|
|
r11 = 0
|
|
r4[r11] = r5 // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r5 = "origin"
|
|
r12 = 1
|
|
r4[r12] = r5 // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r5 = "set_timestamp"
|
|
r13 = 2
|
|
r4[r13] = r5 // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r5 = "value"
|
|
r14 = 3
|
|
r4[r14] = r5 // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r5 = "app_id=?"
|
|
java.lang.String[] r6 = new java.lang.String[]{r16} // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
r7 = 0
|
|
r8 = 0
|
|
java.lang.String r9 = "rowid"
|
|
java.lang.String r10 = "1000"
|
|
android.database.Cursor r1 = r2.query(r3, r4, r5, r6, r7, r8, r9, r10) // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
boolean r2 = r1.moveToFirst() // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
if (r2 != 0) goto L46
|
|
r1.close()
|
|
return r0
|
|
L46:
|
|
java.lang.String r6 = r1.getString(r11) // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
java.lang.String r2 = r1.getString(r12) // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
if (r2 != 0) goto L52
|
|
java.lang.String r2 = ""
|
|
L52:
|
|
r5 = r2
|
|
goto L5a
|
|
L54:
|
|
r0 = move-exception
|
|
r2 = r15
|
|
goto Lab
|
|
L57:
|
|
r0 = move-exception
|
|
r2 = r15
|
|
goto L90
|
|
L5a:
|
|
long r7 = r1.getLong(r13) // Catch: java.lang.Throwable -> L54 android.database.sqlite.SQLiteException -> L57
|
|
r2 = r15
|
|
java.lang.Object r9 = r15.zza(r1, r14) // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
if (r9 != 0) goto L7b
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r15.zzj() // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
java.lang.String r4 = "Read invalid user property value, ignoring it. appId"
|
|
java.lang.Object r5 = com.google.android.gms.measurement.internal.zzfw.zza(r16) // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
r3.zza(r4, r5) // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
goto L86
|
|
L77:
|
|
r0 = move-exception
|
|
goto Lab
|
|
L79:
|
|
r0 = move-exception
|
|
goto L90
|
|
L7b:
|
|
com.google.android.gms.measurement.internal.zznq r10 = new com.google.android.gms.measurement.internal.zznq // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
r3 = r10
|
|
r4 = r16
|
|
r3.<init>(r4, r5, r6, r7, r9) // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
r0.add(r10) // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
L86:
|
|
boolean r3 = r1.moveToNext() // Catch: java.lang.Throwable -> L77 android.database.sqlite.SQLiteException -> L79
|
|
if (r3 != 0) goto L46
|
|
r1.close()
|
|
return r0
|
|
L90:
|
|
com.google.android.gms.measurement.internal.zzfw r3 = r15.zzj() // Catch: java.lang.Throwable -> L77
|
|
com.google.android.gms.measurement.internal.zzfy r3 = r3.zzg() // Catch: java.lang.Throwable -> L77
|
|
java.lang.String r4 = "Error querying user properties. appId"
|
|
java.lang.Object r5 = com.google.android.gms.measurement.internal.zzfw.zza(r16) // Catch: java.lang.Throwable -> L77
|
|
r3.zza(r4, r5, r0) // Catch: java.lang.Throwable -> L77
|
|
java.util.List r0 = java.util.Collections.emptyList() // Catch: java.lang.Throwable -> L77
|
|
if (r1 == 0) goto Laa
|
|
r1.close()
|
|
Laa:
|
|
return r0
|
|
Lab:
|
|
if (r1 == 0) goto Lb0
|
|
r1.close()
|
|
Lb0:
|
|
throw r0
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzk(java.lang.String):java.util.List");
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:61:0x00ab, code lost:
|
|
|
|
zzj().zzg().zza("Read more than the max allowed user properties, ignoring excess", 1000);
|
|
*/
|
|
/* JADX WARN: Removed duplicated region for block: B:40:0x0147 */
|
|
/* JADX WARN: Removed duplicated region for block: B:58:0x014d */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.util.List<com.google.android.gms.measurement.internal.zznq> zzb(java.lang.String r23, java.lang.String r24, java.lang.String r25) {
|
|
/*
|
|
Method dump skipped, instructions count: 337
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzb(java.lang.String, java.lang.String, java.lang.String):java.util.List");
|
|
}
|
|
|
|
public final Map<Integer, zzfn.zzl> zzl(String str) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor query = e_().query("audience_filter_values", new String[]{"audience_id", "current_results"}, "app_id=?", new String[]{str}, null, null, null);
|
|
if (!query.moveToFirst()) {
|
|
Map<Integer, zzfn.zzl> emptyMap = Collections.emptyMap();
|
|
query.close();
|
|
return emptyMap;
|
|
}
|
|
ArrayMap arrayMap = new ArrayMap();
|
|
do {
|
|
int i = query.getInt(0);
|
|
try {
|
|
arrayMap.put(Integer.valueOf(i), (zzfn.zzl) ((com.google.android.gms.internal.measurement.zzjk) ((zzfn.zzl.zza) zznp.zza(zzfn.zzl.zze(), query.getBlob(1))).zzag()));
|
|
} catch (IOException e) {
|
|
zzj().zzg().zza("Failed to merge filter results. appId, audienceId, error", zzfw.zza(str), Integer.valueOf(i), e);
|
|
}
|
|
} while (query.moveToNext());
|
|
query.close();
|
|
return arrayMap;
|
|
} catch (SQLiteException e2) {
|
|
zzj().zzg().zza("Database error querying filter results. appId", zzfw.zza(str), e2);
|
|
Map<Integer, zzfn.zzl> emptyMap2 = Collections.emptyMap();
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
return emptyMap2;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public final Map<Integer, List<zzff.zzb>> zzm(String str) {
|
|
Preconditions.checkNotEmpty(str);
|
|
ArrayMap arrayMap = new ArrayMap();
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor query = e_().query("event_filters", new String[]{"audience_id", "data"}, "app_id=?", new String[]{str}, null, null, null);
|
|
if (!query.moveToFirst()) {
|
|
Map<Integer, List<zzff.zzb>> emptyMap = Collections.emptyMap();
|
|
query.close();
|
|
return emptyMap;
|
|
}
|
|
do {
|
|
try {
|
|
zzff.zzb zzbVar = (zzff.zzb) ((com.google.android.gms.internal.measurement.zzjk) ((zzff.zzb.zza) zznp.zza(zzff.zzb.zzc(), query.getBlob(1))).zzag());
|
|
if (zzbVar.zzk()) {
|
|
int i = query.getInt(0);
|
|
List list = (List) arrayMap.get(Integer.valueOf(i));
|
|
if (list == null) {
|
|
list = new ArrayList();
|
|
arrayMap.put(Integer.valueOf(i), list);
|
|
}
|
|
list.add(zzbVar);
|
|
}
|
|
} catch (IOException e) {
|
|
zzj().zzg().zza("Failed to merge filter. appId", zzfw.zza(str), e);
|
|
}
|
|
} while (query.moveToNext());
|
|
query.close();
|
|
return arrayMap;
|
|
} catch (SQLiteException e2) {
|
|
zzj().zzg().zza("Database error querying filters. appId", zzfw.zza(str), e2);
|
|
Map<Integer, List<zzff.zzb>> emptyMap2 = Collections.emptyMap();
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
return emptyMap2;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public final Map<Integer, List<zzff.zzb>> zzf(String str, String str2) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotEmpty(str2);
|
|
ArrayMap arrayMap = new ArrayMap();
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor query = e_().query("event_filters", new String[]{"audience_id", "data"}, "app_id=? AND event_name=?", new String[]{str, str2}, null, null, null);
|
|
if (!query.moveToFirst()) {
|
|
Map<Integer, List<zzff.zzb>> emptyMap = Collections.emptyMap();
|
|
query.close();
|
|
return emptyMap;
|
|
}
|
|
do {
|
|
try {
|
|
zzff.zzb zzbVar = (zzff.zzb) ((com.google.android.gms.internal.measurement.zzjk) ((zzff.zzb.zza) zznp.zza(zzff.zzb.zzc(), query.getBlob(1))).zzag());
|
|
int i = query.getInt(0);
|
|
List list = (List) arrayMap.get(Integer.valueOf(i));
|
|
if (list == null) {
|
|
list = new ArrayList();
|
|
arrayMap.put(Integer.valueOf(i), list);
|
|
}
|
|
list.add(zzbVar);
|
|
} catch (IOException e) {
|
|
zzj().zzg().zza("Failed to merge filter. appId", zzfw.zza(str), e);
|
|
}
|
|
} while (query.moveToNext());
|
|
query.close();
|
|
return arrayMap;
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
} catch (SQLiteException e2) {
|
|
zzj().zzg().zza("Database error querying filters. appId", zzfw.zza(str), e2);
|
|
Map<Integer, List<zzff.zzb>> emptyMap2 = Collections.emptyMap();
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
return emptyMap2;
|
|
}
|
|
}
|
|
|
|
public final Map<Integer, List<zzff.zze>> zzg(String str, String str2) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotEmpty(str2);
|
|
ArrayMap arrayMap = new ArrayMap();
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor query = e_().query("property_filters", new String[]{"audience_id", "data"}, "app_id=? AND property_name=?", new String[]{str, str2}, null, null, null);
|
|
if (!query.moveToFirst()) {
|
|
Map<Integer, List<zzff.zze>> emptyMap = Collections.emptyMap();
|
|
query.close();
|
|
return emptyMap;
|
|
}
|
|
do {
|
|
try {
|
|
zzff.zze zzeVar = (zzff.zze) ((com.google.android.gms.internal.measurement.zzjk) ((zzff.zze.zza) zznp.zza(zzff.zze.zzc(), query.getBlob(1))).zzag());
|
|
int i = query.getInt(0);
|
|
List list = (List) arrayMap.get(Integer.valueOf(i));
|
|
if (list == null) {
|
|
list = new ArrayList();
|
|
arrayMap.put(Integer.valueOf(i), list);
|
|
}
|
|
list.add(zzeVar);
|
|
} catch (IOException e) {
|
|
zzj().zzg().zza("Failed to merge filter", zzfw.zza(str), e);
|
|
}
|
|
} while (query.moveToNext());
|
|
query.close();
|
|
return arrayMap;
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
} catch (SQLiteException e2) {
|
|
zzj().zzg().zza("Database error querying filters. appId", zzfw.zza(str), e2);
|
|
Map<Integer, List<zzff.zze>> emptyMap2 = Collections.emptyMap();
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
return emptyMap2;
|
|
}
|
|
}
|
|
|
|
public final Map<Integer, List<Integer>> zzn(String str) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
ArrayMap arrayMap = new ArrayMap();
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
Cursor rawQuery = e_().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[]{str, str});
|
|
if (!rawQuery.moveToFirst()) {
|
|
Map<Integer, List<Integer>> emptyMap = Collections.emptyMap();
|
|
rawQuery.close();
|
|
return emptyMap;
|
|
}
|
|
do {
|
|
int i = rawQuery.getInt(0);
|
|
List list = (List) arrayMap.get(Integer.valueOf(i));
|
|
if (list == null) {
|
|
list = new ArrayList();
|
|
arrayMap.put(Integer.valueOf(i), list);
|
|
}
|
|
list.add(Integer.valueOf(rawQuery.getInt(1)));
|
|
} while (rawQuery.moveToNext());
|
|
rawQuery.close();
|
|
return arrayMap;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Database error querying scoped filters. appId", zzfw.zza(str), e);
|
|
Map<Integer, List<Integer>> emptyMap2 = Collections.emptyMap();
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
return emptyMap2;
|
|
}
|
|
} catch (Throwable th) {
|
|
if (0 != 0) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public zzan(zznc zzncVar) {
|
|
super(zzncVar);
|
|
this.zzm = new zzmv(zzb());
|
|
this.zzl = new zzat(this, zza(), "google_app_measurement.db");
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zzp() {
|
|
zzak();
|
|
e_().beginTransaction();
|
|
}
|
|
|
|
private final void zzi(String str, String str2) {
|
|
Preconditions.checkNotEmpty(str2);
|
|
zzt();
|
|
zzak();
|
|
try {
|
|
e_().delete(str, "app_id=?", new String[]{str2});
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error deleting snapshot. appId", zzfw.zza(str2), e);
|
|
}
|
|
}
|
|
|
|
public final void zzo(String str) {
|
|
zzbb zzd2;
|
|
zzi("events_snapshot", str);
|
|
Cursor cursor = null;
|
|
try {
|
|
try {
|
|
cursor = e_().query("events", (String[]) Collections.singletonList("name").toArray(new String[0]), "app_id=?", new String[]{str}, null, null, null);
|
|
if (!cursor.moveToFirst()) {
|
|
cursor.close();
|
|
return;
|
|
}
|
|
do {
|
|
String string = cursor.getString(0);
|
|
if (string != null && (zzd2 = zzd(str, string)) != null) {
|
|
zza("events_snapshot", zzd2);
|
|
}
|
|
} while (cursor.moveToNext());
|
|
cursor.close();
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error creating snapshot. appId", zzfw.zza(str), e);
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
}
|
|
} catch (Throwable th) {
|
|
if (cursor != null) {
|
|
cursor.close();
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zzu() {
|
|
zzak();
|
|
e_().endTransaction();
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@WorkerThread
|
|
public final void zza(List<Long> list) {
|
|
zzt();
|
|
zzak();
|
|
Preconditions.checkNotNull(list);
|
|
Preconditions.checkNotZero(list.size());
|
|
if (zzan()) {
|
|
String str = "(" + TextUtils.join(",", list) + ")";
|
|
if (zzb("SELECT COUNT(1) FROM queue WHERE rowid IN " + str + " AND retry_count = 2147483647 LIMIT 1", (String[]) null) > 0) {
|
|
zzj().zzu().zza("The number of upload retries exceeds the limit. Will remain unchanged.");
|
|
}
|
|
try {
|
|
e_().execSQL("UPDATE queue SET retry_count = IFNULL(retry_count, 0) + 1 WHERE rowid IN " + str + " AND (retry_count IS NULL OR retry_count < 2147483647)");
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error incrementing retry count. error", e);
|
|
}
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zzv() {
|
|
int delete;
|
|
zzt();
|
|
zzak();
|
|
if (zzan()) {
|
|
long zza2 = zzn().zza.zza();
|
|
long elapsedRealtime = zzb().elapsedRealtime();
|
|
if (Math.abs(elapsedRealtime - zza2) > zzbh.zzy.zza(null).longValue()) {
|
|
zzn().zza.zza(elapsedRealtime);
|
|
zzt();
|
|
zzak();
|
|
if (!zzan() || (delete = e_().delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", new String[]{String.valueOf(zzb().currentTimeMillis()), String.valueOf(zzae.zzm())})) <= 0) {
|
|
return;
|
|
}
|
|
zzj().zzp().zza("Deleted stale rows. rowsDeleted", Integer.valueOf(delete));
|
|
}
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zzh(String str, String str2) {
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotEmpty(str2);
|
|
zzt();
|
|
zzak();
|
|
try {
|
|
e_().delete("user_attributes", "app_id=? and name=?", new String[]{str, str2});
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error deleting user property. appId", zzfw.zza(str), zzi().zzc(str2), e);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:56:0x00cb */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final void zzp(java.lang.String r20) {
|
|
/*
|
|
Method dump skipped, instructions count: 226
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zzp(java.lang.String):void");
|
|
}
|
|
|
|
@WorkerThread
|
|
private static void zza(ContentValues contentValues, String str, Object obj) {
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotNull(obj);
|
|
if (obj instanceof String) {
|
|
contentValues.put(str, (String) obj);
|
|
} else if (obj instanceof Long) {
|
|
contentValues.put(str, (Long) obj);
|
|
} else {
|
|
if (obj instanceof Double) {
|
|
contentValues.put(str, (Double) obj);
|
|
return;
|
|
}
|
|
throw new IllegalArgumentException("Invalid value type");
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zza(String str, List<zzff.zza> list) {
|
|
boolean z;
|
|
boolean z2;
|
|
Preconditions.checkNotNull(list);
|
|
for (int i = 0; i < list.size(); i++) {
|
|
zzff.zza.C0119zza zzca = list.get(i).zzca();
|
|
if (zzca.zza() != 0) {
|
|
for (int i2 = 0; i2 < zzca.zza(); i2++) {
|
|
zzff.zzb.zza zzca2 = zzca.zza(i2).zzca();
|
|
zzff.zzb.zza zzaVar = (zzff.zzb.zza) ((zzjk.zza) zzca2.clone());
|
|
String zzb2 = zzir.zzb(zzca2.zzb());
|
|
if (zzb2 != null) {
|
|
zzaVar.zza(zzb2);
|
|
z2 = true;
|
|
} else {
|
|
z2 = false;
|
|
}
|
|
for (int i3 = 0; i3 < zzca2.zza(); i3++) {
|
|
zzff.zzc zza2 = zzca2.zza(i3);
|
|
String zza3 = zzit.zza(zza2.zze());
|
|
if (zza3 != null) {
|
|
zzaVar.zza(i3, (zzff.zzc) ((com.google.android.gms.internal.measurement.zzjk) zza2.zzca().zza(zza3).zzag()));
|
|
z2 = true;
|
|
}
|
|
}
|
|
if (z2) {
|
|
zzff.zza.C0119zza zza4 = zzca.zza(i2, zzaVar);
|
|
list.set(i, (zzff.zza) ((com.google.android.gms.internal.measurement.zzjk) zza4.zzag()));
|
|
zzca = zza4;
|
|
}
|
|
}
|
|
}
|
|
if (zzca.zzb() != 0) {
|
|
for (int i4 = 0; i4 < zzca.zzb(); i4++) {
|
|
zzff.zze zzb3 = zzca.zzb(i4);
|
|
String zza5 = zzis.zza(zzb3.zze());
|
|
if (zza5 != null) {
|
|
zzca = zzca.zza(i4, zzb3.zzca().zza(zza5));
|
|
list.set(i, (zzff.zza) ((com.google.android.gms.internal.measurement.zzjk) zzca.zzag()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotNull(list);
|
|
SQLiteDatabase e_ = e_();
|
|
e_.beginTransaction();
|
|
try {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
SQLiteDatabase e_2 = e_();
|
|
e_2.delete("property_filters", "app_id=?", new String[]{str});
|
|
e_2.delete("event_filters", "app_id=?", new String[]{str});
|
|
for (zzff.zza zzaVar2 : list) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotNull(zzaVar2);
|
|
if (!zzaVar2.zzg()) {
|
|
zzj().zzu().zza("Audience with no ID. appId", zzfw.zza(str));
|
|
} else {
|
|
int zza6 = zzaVar2.zza();
|
|
Iterator<zzff.zzb> it = zzaVar2.zze().iterator();
|
|
while (true) {
|
|
if (it.hasNext()) {
|
|
if (!it.next().zzl()) {
|
|
zzj().zzu().zza("Event filter with no ID. Audience definition ignored. appId, audienceId", zzfw.zza(str), Integer.valueOf(zza6));
|
|
break;
|
|
}
|
|
} else {
|
|
Iterator<zzff.zze> it2 = zzaVar2.zzf().iterator();
|
|
while (true) {
|
|
if (it2.hasNext()) {
|
|
if (!it2.next().zzi()) {
|
|
zzj().zzu().zza("Property filter with no ID. Audience definition ignored. appId, audienceId", zzfw.zza(str), Integer.valueOf(zza6));
|
|
break;
|
|
}
|
|
} else {
|
|
Iterator<zzff.zzb> it3 = zzaVar2.zze().iterator();
|
|
while (true) {
|
|
if (it3.hasNext()) {
|
|
if (!zza(str, zza6, it3.next())) {
|
|
z = false;
|
|
break;
|
|
}
|
|
} else {
|
|
z = true;
|
|
break;
|
|
}
|
|
}
|
|
if (z) {
|
|
Iterator<zzff.zze> it4 = zzaVar2.zzf().iterator();
|
|
while (it4.hasNext()) {
|
|
if (!zza(str, zza6, it4.next())) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (!z) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
SQLiteDatabase e_3 = e_();
|
|
e_3.delete("property_filters", "app_id=? and audience_id=?", new String[]{str, String.valueOf(zza6)});
|
|
e_3.delete("event_filters", "app_id=? and audience_id=?", new String[]{str, String.valueOf(zza6)});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (zzff.zza zzaVar3 : list) {
|
|
arrayList.add(zzaVar3.zzg() ? Integer.valueOf(zzaVar3.zza()) : null);
|
|
}
|
|
zzb(str, arrayList);
|
|
e_.setTransactionSuccessful();
|
|
e_.endTransaction();
|
|
} catch (Throwable th) {
|
|
e_.endTransaction();
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zzw() {
|
|
zzak();
|
|
e_().setTransactionSuccessful();
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:79:0x0043, code lost:
|
|
|
|
if (r7.zzf.zzb(r0).zza(com.google.android.gms.measurement.internal.zzin.zza.ANALYTICS_STORAGE) != false) goto L10;
|
|
*/
|
|
/* JADX WARN: Removed duplicated region for block: B:35:0x0254 */
|
|
/* JADX WARN: Removed duplicated region for block: B:48:0x02b9 */
|
|
/* JADX WARN: Removed duplicated region for block: B:61:0x02fd */
|
|
@androidx.annotation.WorkerThread
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final void zza(com.google.android.gms.measurement.internal.zzf r8, boolean r9, boolean r10) {
|
|
/*
|
|
Method dump skipped, instructions count: 854
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzan.zza(com.google.android.gms.measurement.internal.zzf, boolean, boolean):void");
|
|
}
|
|
|
|
public final void zza(String str, zzax zzaxVar) {
|
|
Preconditions.checkNotNull(str);
|
|
Preconditions.checkNotNull(zzaxVar);
|
|
zzt();
|
|
zzak();
|
|
if (zze().zza(zzbh.zzck)) {
|
|
zzin zzi2 = zzi(str);
|
|
zzin zzinVar = zzin.zza;
|
|
if (zzi2 == zzinVar) {
|
|
zzb(str, zzinVar);
|
|
}
|
|
}
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("dma_consent_settings", zzaxVar.zzf());
|
|
zza("consent_settings", "app_id", contentValues);
|
|
}
|
|
|
|
@WorkerThread
|
|
public final void zza(zzbb zzbbVar) {
|
|
zza("events", zzbbVar);
|
|
}
|
|
|
|
@WorkerThread
|
|
private final void zza(String str, zzbb zzbbVar) {
|
|
Preconditions.checkNotNull(zzbbVar);
|
|
zzt();
|
|
zzak();
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", zzbbVar.zza);
|
|
contentValues.put("name", zzbbVar.zzb);
|
|
contentValues.put("lifetime_count", Long.valueOf(zzbbVar.zzc));
|
|
contentValues.put("current_bundle_count", Long.valueOf(zzbbVar.zzd));
|
|
contentValues.put("last_fire_timestamp", Long.valueOf(zzbbVar.zzf));
|
|
contentValues.put("last_bundled_timestamp", Long.valueOf(zzbbVar.zzg));
|
|
contentValues.put("last_bundled_day", zzbbVar.zzh);
|
|
contentValues.put("last_sampled_complex_event_id", zzbbVar.zzi);
|
|
contentValues.put("last_sampling_rate", zzbbVar.zzj);
|
|
contentValues.put("current_session_count", Long.valueOf(zzbbVar.zze));
|
|
Boolean bool = zzbbVar.zzk;
|
|
contentValues.put("last_exempt_from_sampling", (bool == null || !bool.booleanValue()) ? null : 1L);
|
|
try {
|
|
if (e_().insertWithOnConflict(str, null, contentValues, 5) == -1) {
|
|
zzj().zzg().zza("Failed to insert/update event aggregates (got -1). appId", zzfw.zza(zzbbVar.zza));
|
|
}
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing event aggregates. appId", zzfw.zza(zzbbVar.zza), e);
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
private final void zza(String str, String str2, ContentValues contentValues) {
|
|
try {
|
|
SQLiteDatabase e_ = e_();
|
|
if (contentValues.getAsString(str2) == null) {
|
|
zzj().zzh().zza("Value of the primary key is not set.", zzfw.zza(str2));
|
|
return;
|
|
}
|
|
if (e_.update(str, contentValues, str2 + " = ?", new String[]{r1}) == 0 && e_.insertWithOnConflict(str, null, contentValues, 5) == -1) {
|
|
zzj().zzg().zza("Failed to insert/update table (got -1). key", zzfw.zza(str), zzfw.zza(str2));
|
|
}
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing into table. key", zzfw.zza(str), zzfw.zza(str2), e);
|
|
}
|
|
}
|
|
|
|
public final void zza(String str, zzin zzinVar) {
|
|
Preconditions.checkNotNull(str);
|
|
Preconditions.checkNotNull(zzinVar);
|
|
zzt();
|
|
zzak();
|
|
zzb(str, zzi(str));
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("storage_consent_at_bundling", zzinVar.zzh());
|
|
zza("consent_settings", "app_id", contentValues);
|
|
}
|
|
|
|
public final void zzb(String str, zzin zzinVar) {
|
|
Preconditions.checkNotNull(str);
|
|
Preconditions.checkNotNull(zzinVar);
|
|
zzt();
|
|
zzak();
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("consent_state", zzinVar.zzh());
|
|
contentValues.put("consent_source", Integer.valueOf(zzinVar.zza()));
|
|
zza("consent_settings", "app_id", contentValues);
|
|
}
|
|
|
|
private final boolean zzb(String str, List<Integer> list) {
|
|
Preconditions.checkNotEmpty(str);
|
|
zzak();
|
|
zzt();
|
|
SQLiteDatabase e_ = e_();
|
|
try {
|
|
long zzb2 = zzb("select count(1) from audience_filter_values where app_id=?", new String[]{str});
|
|
int max = Math.max(0, Math.min(2000, zze().zzb(str, zzbh.zzaf)));
|
|
if (zzb2 <= max) {
|
|
return false;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (int i = 0; i < list.size(); i++) {
|
|
Integer num = list.get(i);
|
|
if (num == null) {
|
|
return false;
|
|
}
|
|
arrayList.add(Integer.toString(num.intValue()));
|
|
}
|
|
String str2 = "(" + TextUtils.join(",", arrayList) + ")";
|
|
StringBuilder sb = new StringBuilder("audience_id in (select audience_id from audience_filter_values where app_id=? and audience_id not in ");
|
|
sb.append(str2);
|
|
sb.append(" order by rowid desc limit -1 offset ?)");
|
|
return e_.delete("audience_filter_values", sb.toString(), new String[]{str, Integer.toString(max)}) > 0;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Database error querying filters. appId", zzfw.zza(str), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public final boolean zzx() {
|
|
return zzb("select count(1) > 0 from raw_events", (String[]) null) != 0;
|
|
}
|
|
|
|
public final boolean zzy() {
|
|
return zzb("select count(1) > 0 from queue where has_realtime = 1", (String[]) null) != 0;
|
|
}
|
|
|
|
public final boolean zzz() {
|
|
return zzb("select count(1) > 0 from raw_events where realtime = 1", (String[]) null) != 0;
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean zza(zzfn.zzj zzjVar, boolean z) {
|
|
zzt();
|
|
zzak();
|
|
Preconditions.checkNotNull(zzjVar);
|
|
Preconditions.checkNotEmpty(zzjVar.zzy());
|
|
Preconditions.checkState(zzjVar.zzbg());
|
|
zzv();
|
|
long currentTimeMillis = zzb().currentTimeMillis();
|
|
if (zzjVar.zzm() < currentTimeMillis - zzae.zzm() || zzjVar.zzm() > zzae.zzm() + currentTimeMillis) {
|
|
zzj().zzu().zza("Storing bundle outside of the max uploading time span. appId, now, timestamp", zzfw.zza(zzjVar.zzy()), Long.valueOf(currentTimeMillis), Long.valueOf(zzjVar.zzm()));
|
|
}
|
|
try {
|
|
byte[] zzb2 = g_().zzb(zzjVar.zzbx());
|
|
zzj().zzp().zza("Saving bundle, size", Integer.valueOf(zzb2.length));
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", zzjVar.zzy());
|
|
contentValues.put("bundle_end_timestamp", Long.valueOf(zzjVar.zzm()));
|
|
contentValues.put("data", zzb2);
|
|
contentValues.put("has_realtime", Integer.valueOf(z ? 1 : 0));
|
|
if (zzjVar.zzbn()) {
|
|
contentValues.put("retry_count", Integer.valueOf(zzjVar.zzg()));
|
|
}
|
|
try {
|
|
if (e_().insert("queue", null, contentValues) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert bundle (got -1). appId", zzfw.zza(zzjVar.zzy()));
|
|
return false;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing bundle. appId", zzfw.zza(zzjVar.zzy()), e);
|
|
return false;
|
|
}
|
|
} catch (IOException e2) {
|
|
zzj().zzg().zza("Data loss. Failed to serialize bundle. appId", zzfw.zza(zzjVar.zzy()), e2);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
private final boolean zza(String str, int i, zzff.zzb zzbVar) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotNull(zzbVar);
|
|
if (zzbVar.zzf().isEmpty()) {
|
|
zzj().zzu().zza("Event filter had no event name. Audience definition ignored. appId, audienceId, filterId", zzfw.zza(str), Integer.valueOf(i), String.valueOf(zzbVar.zzl() ? Integer.valueOf(zzbVar.zzb()) : null));
|
|
return false;
|
|
}
|
|
byte[] zzbx = zzbVar.zzbx();
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("audience_id", Integer.valueOf(i));
|
|
contentValues.put("filter_id", zzbVar.zzl() ? Integer.valueOf(zzbVar.zzb()) : null);
|
|
contentValues.put(TJAdUnitConstants.PARAM_PLACEMENT_NAME, zzbVar.zzf());
|
|
contentValues.put("session_scoped", zzbVar.zzm() ? Boolean.valueOf(zzbVar.zzj()) : null);
|
|
contentValues.put("data", zzbx);
|
|
try {
|
|
if (e_().insertWithOnConflict("event_filters", null, contentValues, 5) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert event filter (got -1). appId", zzfw.zza(str));
|
|
return true;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing event filter. appId", zzfw.zza(str), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
private final boolean zza(String str, int i, zzff.zze zzeVar) {
|
|
zzak();
|
|
zzt();
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotNull(zzeVar);
|
|
if (zzeVar.zze().isEmpty()) {
|
|
zzj().zzu().zza("Property filter had no property name. Audience definition ignored. appId, audienceId, filterId", zzfw.zza(str), Integer.valueOf(i), String.valueOf(zzeVar.zzi() ? Integer.valueOf(zzeVar.zza()) : null));
|
|
return false;
|
|
}
|
|
byte[] zzbx = zzeVar.zzbx();
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("audience_id", Integer.valueOf(i));
|
|
contentValues.put("filter_id", zzeVar.zzi() ? Integer.valueOf(zzeVar.zza()) : null);
|
|
contentValues.put("property_name", zzeVar.zze());
|
|
contentValues.put("session_scoped", zzeVar.zzj() ? Boolean.valueOf(zzeVar.zzh()) : null);
|
|
contentValues.put("data", zzbx);
|
|
try {
|
|
if (e_().insertWithOnConflict("property_filters", null, contentValues, 5) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert property filter (got -1). appId", zzfw.zza(str));
|
|
return false;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing property filter. appId", zzfw.zza(str), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public final boolean zza(zzay zzayVar, long j, boolean z) {
|
|
zzt();
|
|
zzak();
|
|
Preconditions.checkNotNull(zzayVar);
|
|
Preconditions.checkNotEmpty(zzayVar.zza);
|
|
byte[] zzbx = g_().zza(zzayVar).zzbx();
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", zzayVar.zza);
|
|
contentValues.put("name", zzayVar.zzb);
|
|
contentValues.put("timestamp", Long.valueOf(zzayVar.zzc));
|
|
contentValues.put("metadata_fingerprint", Long.valueOf(j));
|
|
contentValues.put("data", zzbx);
|
|
contentValues.put("realtime", Integer.valueOf(z ? 1 : 0));
|
|
try {
|
|
if (e_().insert("raw_events", null, contentValues) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert raw event (got -1). appId", zzfw.zza(zzayVar.zza));
|
|
return false;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing raw event. appId", zzfw.zza(zzayVar.zza), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean zza(String str, zzmu zzmuVar) {
|
|
zzt();
|
|
zzak();
|
|
Preconditions.checkNotNull(zzmuVar);
|
|
Preconditions.checkNotEmpty(str);
|
|
long currentTimeMillis = zzb().currentTimeMillis();
|
|
if (zzmuVar.zzb < currentTimeMillis - zzae.zzm() || zzmuVar.zzb > zzae.zzm() + currentTimeMillis) {
|
|
zzj().zzu().zza("Storing trigger URI outside of the max retention time span. appId, now, timestamp", zzfw.zza(str), Long.valueOf(currentTimeMillis), Long.valueOf(zzmuVar.zzb));
|
|
}
|
|
zzj().zzp().zza("Saving trigger URI");
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("trigger_uri", zzmuVar.zza);
|
|
contentValues.put(ShareConstants.FEED_SOURCE_PARAM, Integer.valueOf(zzmuVar.zzc));
|
|
contentValues.put("timestamp_millis", Long.valueOf(zzmuVar.zzb));
|
|
try {
|
|
if (e_().insert("trigger_uris", null, contentValues) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert trigger URI (got -1). appId", zzfw.zza(str));
|
|
return false;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing trigger URI. appId", zzfw.zza(str), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@VisibleForTesting
|
|
private final boolean zzan() {
|
|
return zza().getDatabasePath("google_app_measurement.db").exists();
|
|
}
|
|
|
|
public final boolean zza(String str, Long l, long j, zzfn.zze zzeVar) {
|
|
zzt();
|
|
zzak();
|
|
Preconditions.checkNotNull(zzeVar);
|
|
Preconditions.checkNotEmpty(str);
|
|
Preconditions.checkNotNull(l);
|
|
byte[] zzbx = zzeVar.zzbx();
|
|
zzj().zzp().zza("Saving complex main event, appId, data size", zzi().zza(str), Integer.valueOf(zzbx.length));
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("event_id", l);
|
|
contentValues.put("children_to_process", Long.valueOf(j));
|
|
contentValues.put("main_event", zzbx);
|
|
try {
|
|
if (e_().insertWithOnConflict("main_event_params", null, contentValues, 5) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert complex main event (got -1). appId", zzfw.zza(str));
|
|
return false;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing complex main event. appId", zzfw.zza(str), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean zza(zzac zzacVar) {
|
|
Preconditions.checkNotNull(zzacVar);
|
|
zzt();
|
|
zzak();
|
|
String str = zzacVar.zza;
|
|
Preconditions.checkNotNull(str);
|
|
if (zze(str, zzacVar.zzc.zza) == null && zzb("SELECT COUNT(1) FROM conditional_properties WHERE app_id=?", new String[]{str}) >= 1000) {
|
|
return false;
|
|
}
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("origin", zzacVar.zzb);
|
|
contentValues.put("name", zzacVar.zzc.zza);
|
|
zza(contentValues, "value", Preconditions.checkNotNull(zzacVar.zzc.zza()));
|
|
contentValues.put(AppMeasurementSdk.ConditionalUserProperty.ACTIVE, Boolean.valueOf(zzacVar.zze));
|
|
contentValues.put(AppMeasurementSdk.ConditionalUserProperty.TRIGGER_EVENT_NAME, zzacVar.zzf);
|
|
contentValues.put(AppMeasurementSdk.ConditionalUserProperty.TRIGGER_TIMEOUT, Long.valueOf(zzacVar.zzh));
|
|
zzq();
|
|
contentValues.put("timed_out_event", zznt.zza((Parcelable) zzacVar.zzg));
|
|
contentValues.put(AppMeasurementSdk.ConditionalUserProperty.CREATION_TIMESTAMP, Long.valueOf(zzacVar.zzd));
|
|
zzq();
|
|
contentValues.put("triggered_event", zznt.zza((Parcelable) zzacVar.zzi));
|
|
contentValues.put(AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_TIMESTAMP, Long.valueOf(zzacVar.zzc.zzb));
|
|
contentValues.put(AppMeasurementSdk.ConditionalUserProperty.TIME_TO_LIVE, Long.valueOf(zzacVar.zzj));
|
|
zzq();
|
|
contentValues.put("expired_event", zznt.zza((Parcelable) zzacVar.zzk));
|
|
try {
|
|
if (e_().insertWithOnConflict("conditional_properties", null, contentValues, 5) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert/update conditional user property (got -1)", zzfw.zza(str));
|
|
return true;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing conditional user property", zzfw.zza(str), e);
|
|
return true;
|
|
}
|
|
}
|
|
|
|
public final boolean zza(String str, Bundle bundle) {
|
|
zzt();
|
|
zzak();
|
|
byte[] zzbx = g_().zza(new zzay(this.zzu, "", str, "dep", 0L, 0L, bundle)).zzbx();
|
|
zzj().zzp().zza("Saving default event parameters, appId, data size", zzi().zza(str), Integer.valueOf(zzbx.length));
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", str);
|
|
contentValues.put("parameters", zzbx);
|
|
try {
|
|
if (e_().insertWithOnConflict("default_event_params", null, contentValues, 5) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert default event parameters (got -1). appId", zzfw.zza(str));
|
|
return false;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing default event parameters. appId", zzfw.zza(str), e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean zza(zznq zznqVar) {
|
|
Preconditions.checkNotNull(zznqVar);
|
|
zzt();
|
|
zzak();
|
|
if (zze(zznqVar.zza, zznqVar.zzc) == null) {
|
|
if (zznt.zzh(zznqVar.zzc)) {
|
|
if (zzb("select count(1) from user_attributes where app_id=? and name not like '!_%' escape '!'", new String[]{zznqVar.zza}) >= zze().zza(zznqVar.zza, zzbh.zzag, 25, 100)) {
|
|
return false;
|
|
}
|
|
} else if (!"_npa".equals(zznqVar.zzc) && zzb("select count(1) from user_attributes where app_id=? and origin=? AND name like '!_%' escape '!'", new String[]{zznqVar.zza, zznqVar.zzb}) >= 25) {
|
|
return false;
|
|
}
|
|
}
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("app_id", zznqVar.zza);
|
|
contentValues.put("origin", zznqVar.zzb);
|
|
contentValues.put("name", zznqVar.zzc);
|
|
contentValues.put("set_timestamp", Long.valueOf(zznqVar.zzd));
|
|
zza(contentValues, "value", zznqVar.zze);
|
|
try {
|
|
if (e_().insertWithOnConflict("user_attributes", null, contentValues, 5) != -1) {
|
|
return true;
|
|
}
|
|
zzj().zzg().zza("Failed to insert/update user property (got -1). appId", zzfw.zza(zznqVar.zza));
|
|
return true;
|
|
} catch (SQLiteException e) {
|
|
zzj().zzg().zza("Error storing user property. appId", zzfw.zza(zznqVar.zza), e);
|
|
return true;
|
|
}
|
|
}
|
|
}
|