Info Call to SQLite query API

Description

Improper SQL query construction could lead to SQL injection. An SQL injection attack consists of injecting of an SQL query via the input data from the client to the application

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method com.google.android.gms.tagmanager.zzcg.zzh() calling method android.database.sqlite.SQLiteDatabase.update()


    private void zzh(long p8, long p10)
    {
        String v0_1 = this.zzhh("Error opening database for getNumStoredHits.");
        if (v0_1 != null) {
            String v1_3 = new android.content.ContentValues();
            v1_3.put("hit_first_send_time", Long.valueOf(p10));
            try {
                String[] v4_1 = new String[1];
                v4_1[0] = String.valueOf(p8);
                v0_1.update("gtm_hits", v1_3, "hit_id=?", v4_1);
            } catch (String v0) {
                com.google.android.gms.tagmanager.zzbo.zzbe(new StringBuilder(69).append("Error setting HIT_FIRST_DISPATCH_TIME for hitId: ").append(p8).toString());
                this.zzu(p8);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zzd() calling method android.database.sqlite.SQLiteDatabase.update()


    public void zzd(String p7, byte[] p8)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p7);
        this.zzmq();
        this.zznA();
        com.google.android.gms.internal.zzati$zza v0_7 = new android.content.ContentValues();
        v0_7.put("remote_config", p8);
        try {
            String v1_4 = this.getWritableDatabase();
            String[] v4_1 = new String[1];
            v4_1[0] = p7;
        } catch (com.google.android.gms.internal.zzati$zza v0_5) {
            this.zzJt().zzLa().zze("Error storing remote config. appId", com.google.android.gms.internal.zzati.zzfI(p7), v0_5);
            return;
        }
        if (((long) v1_4.update("apps", v0_7, "app_id = ?", v4_1)) != 0) {
            return;
        } else {
            this.zzJt().zzLa().zzj("Failed to update remote config (got 0). appId", com.google.android.gms.internal.zzati.zzfI(p7));
            return;
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.update()


    public com.google.android.gms.internal.zzasu$zza zza(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p14);
        this.zzmq();
        this.zznA();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzasu$zza v8_1 = new com.google.android.gms.internal.zzasu$zza();
        try {
            com.google.android.gms.internal.zzasu$zza v0_1 = this.getWritableDatabase();
            android.content.ContentValues v2_5 = new String[6];
            v2_5[0] = "day";
            v2_5[1] = "daily_events_count";
            v2_5[2] = "daily_public_events_count";
            v2_5[3] = "daily_conversions_count";
            v2_5[4] = "daily_error_events_count";
            v2_5[5] = "daily_realtime_events_count";
            String v4_20 = new String[1];
            v4_20[0] = p14;
            int v1_1 = v0_1.query("apps", v2_5, "app_id=?", v4_20, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzasu$zza v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.zzbqw = v1_1.getLong(1);
                        v8_1.zzbqv = v1_1.getLong(2);
                        v8_1.zzbqx = v1_1.getLong(3);
                        v8_1.zzbqy = v1_1.getLong(4);
                        v8_1.zzbqz = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.zzbqw = (v8_1.zzbqw + 1);
                    }
                    if (p16) {
                        v8_1.zzbqv = (v8_1.zzbqv + 1);
                    }
                    if (p17) {
                        v8_1.zzbqx = (v8_1.zzbqx + 1);
                    }
                    if (p18) {
                        v8_1.zzbqy = (v8_1.zzbqy + 1);
                    }
                    if (p19) {
                        v8_1.zzbqz = (v8_1.zzbqz + 1);
                    }
                    android.content.ContentValues v2_3 = new android.content.ContentValues();
                    v2_3.put("day", Long.valueOf(p12));
                    v2_3.put("daily_public_events_count", Long.valueOf(v8_1.zzbqv));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.zzbqw));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.zzbqx));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.zzbqy));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.zzbqz));
                    v0_1.update("apps", v2_3, "app_id=?", v10);
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                } else {
                    this.zzJt().zzLc().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzati.zzfI(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzasu$zza v0_0) {
                this.zzJt().zzLa().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzati.zzfI(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzasu$zza v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzasu$zza v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzasu$zza v0_3) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzU() calling method android.database.sqlite.SQLiteDatabase.update()


    protected long zzU(String p13, String p14)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p13);
        com.google.android.gms.common.internal.zzac.zzdv(p14);
        this.zzmq();
        this.zznA();
        android.database.sqlite.SQLiteDatabase v6 = this.getWritableDatabase();
        v6.beginTransaction();
        try {
            android.database.sqlite.SQLiteException v0_7 = new StringBuilder((String.valueOf(p14).length() + 32)).append("select ").append(p14).append(" from app2 where app_id=?").toString();
            String v1_7 = new String[1];
            v1_7[0] = p13;
            android.database.sqlite.SQLiteException v0_0 = this.zza(v0_7, v1_7, -1);
        } catch (android.database.sqlite.SQLiteException v0_14) {
            v6.endTransaction();
            throw v0_14;
        } catch (android.database.sqlite.SQLiteException v0_12) {
            android.database.sqlite.SQLiteException v2_1 = v0_12;
            v0_0 = 0;
            this.zzJt().zzLa().zzd("Error inserting column. appId", com.google.android.gms.internal.zzati.zzfI(p13), p14, v2_1);
            v6.endTransaction();
            return v0_0;
        }
        if (v0_0 == -1) {
            android.database.sqlite.SQLiteException v0_9 = new android.content.ContentValues();
            v0_9.put("app_id", p13);
            v0_9.put("first_open_count", Integer.valueOf(0));
            v0_9.put("previous_install_count", Integer.valueOf(0));
            if (v6.insertWithOnConflict("app2", 0, v0_9, 5) != -1) {
                v0_0 = 0;
            } else {
                this.zzJt().zzLa().zze("Failed to insert column (got -1). appId", com.google.android.gms.internal.zzati.zzfI(p13), p14);
                v6.endTransaction();
                v0_0 = -1;
                return v0_0;
            }
        }
        try {
            Object v7_10 = new android.content.ContentValues();
            v7_10.put("app_id", p13);
            v7_10.put(p14, Long.valueOf((1 + v0_0)));
            String[] v10_1 = new String[1];
            v10_1[0] = p13;
        } catch (android.database.sqlite.SQLiteException v2_1) {
        }
        if (((long) v6.update("app2", v7_10, "app_id = ?", v10_1)) != 0) {
            v6.setTransactionSuccessful();
            v6.endTransaction();
            return v0_0;
        } else {
            this.zzJt().zzLa().zze("Failed to update column (got 0). appId", com.google.android.gms.internal.zzati.zzfI(p13), p14);
            v6.endTransaction();
            v0_0 = -1;
            return v0_0;
        }
    }

Method com.j256.ormlite.android.compat.JellyBeanApiCompatibility.rawQuery() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public android.database.Cursor rawQuery(android.database.sqlite.SQLiteDatabase p2, String p3, String[] p4, com.j256.ormlite.android.compat.ApiCompatibility$CancellationHook p5)
    {
        android.database.Cursor v0_1;
        if (p5 != null) {
            v0_1 = p2.rawQuery(p3, p4, com.j256.ormlite.android.compat.JellyBeanApiCompatibility$JellyBeanCancellationHook.access$000(((com.j256.ormlite.android.compat.JellyBeanApiCompatibility$JellyBeanCancellationHook) p5)));
        } else {
            v0_1 = p2.rawQuery(p3, p4);
        }
        return v0_1;
    }

Method com.j256.ormlite.android.compat.BasicApiCompatibility.rawQuery() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public android.database.Cursor rawQuery(android.database.sqlite.SQLiteDatabase p2, String p3, String[] p4, com.j256.ormlite.android.compat.ApiCompatibility$CancellationHook p5)
    {
        return p2.rawQuery(p3, p4);
    }

Method com.j256.ormlite.android.AndroidDatabaseConnection.queryForOne() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public Object queryForOne(String p7, Object[] p8, com.j256.ormlite.field.FieldType[] p9, com.j256.ormlite.stmt.GenericRowMapper p10, com.j256.ormlite.dao.ObjectCache p11)
    {
        Object v0_0 = 0;
        try {
            Throwable v2_0 = this.db.rawQuery(p7, this.toStrings(p8));
            try {
                Throwable v1_1 = new com.j256.ormlite.android.AndroidDatabaseResults(v2_0, p11, 1);
                try {
                    com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: queried for one result: {}", this, p7);
                } catch (Object v0_2) {
                    throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("queryForOne from database failed: ").append(p7).toString(), v0_2);
                }
                if (v1_1.first()) {
                    v0_0 = p10.mapRow(v1_1);
                    if (!v1_1.next()) {
                        com.j256.ormlite.misc.IOUtils.closeQuietly(v1_1);
                        this.closeQuietly(v2_0);
                    } else {
                        v0_0 = com.j256.ormlite.android.AndroidDatabaseConnection.MORE_THAN_ONE;
                        com.j256.ormlite.misc.IOUtils.closeQuietly(v1_1);
                        this.closeQuietly(v2_0);
                    }
                } else {
                    com.j256.ormlite.misc.IOUtils.closeQuietly(v1_1);
                    this.closeQuietly(v2_0);
                }
                return v0_0;
            } catch (Throwable v1_5) {
                v1_1 = 0;
                Object v0_1 = v1_5;
                com.j256.ormlite.misc.IOUtils.closeQuietly(v1_1);
                this.closeQuietly(v2_0);
                throw v0_1;
            } catch (Throwable v1_4) {
                v1_1 = 0;
                v0_2 = v1_4;
            }
        } catch (Throwable v1_2) {
            v2_0 = 0;
            v0_1 = v1_2;
            v1_1 = 0;
        } catch (Throwable v1_6) {
            v2_0 = 0;
            v0_2 = v1_6;
            v1_1 = 0;
        } catch (Object v0_1) {
        }
    }

Method com.j256.ormlite.android.AndroidDatabaseConnection.queryForLong() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public long queryForLong(String p8, Object[] p9, com.j256.ormlite.field.FieldType[] p10)
    {
        String v2_0 = 0;
        try {
            String v3_5 = this.db.rawQuery(p8, this.toStrings(p9));
            try {
                String v1_1 = new com.j256.ormlite.android.AndroidDatabaseResults(v3_5, 0, 0);
                try {
                    long v4_1;
                    if (!v1_1.first()) {
                        v4_1 = 0;
                    } else {
                        v4_1 = v1_1.getLong(0);
                    }
                } catch (com.j256.ormlite.logger.Logger v0_3) {
                    v2_0 = v3_5;
                    this.closeQuietly(v2_0);
                    com.j256.ormlite.misc.IOUtils.closeQuietly(v1_1);
                    throw v0_3;
                } catch (com.j256.ormlite.logger.Logger v0_2) {
                    v2_0 = v3_5;
                    try {
                        throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("queryForLong from database failed: ").append(p8).toString(), v0_2);
                    } catch (com.j256.ormlite.logger.Logger v0_3) {
                    }
                }
                com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: query for long raw query returned {}: {}", this, Long.valueOf(v4_1), p8);
                this.closeQuietly(v3_5);
                com.j256.ormlite.misc.IOUtils.closeQuietly(v1_1);
                return v4_1;
            } catch (com.j256.ormlite.logger.Logger v0_3) {
                v1_1 = 0;
                v2_0 = v3_5;
            } catch (com.j256.ormlite.logger.Logger v0_2) {
                v1_1 = 0;
                v2_0 = v3_5;
            }
        } catch (com.j256.ormlite.logger.Logger v0_3) {
            v1_1 = 0;
        } catch (com.j256.ormlite.logger.Logger v0_2) {
            v1_1 = 0;
        }
    }

Method com.j256.ormlite.android.AndroidDatabaseConnection.isTableExists() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public boolean isTableExists(String p6)
    {
        android.database.Cursor v1_3 = this.db.rawQuery(new StringBuilder().append("SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name = \'").append(p6).append("\'").toString(), 0);
        try {
            int v0_2;
            if (v1_3.getCount() <= 0) {
                v0_2 = 0;
            } else {
                v0_2 = 1;
            }
        } catch (int v0_3) {
            v1_3.close();
            throw v0_3;
        }
        com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: isTableExists \'{}\' returned {}", this, p6, Boolean.valueOf(v0_2));
        v1_3.close();
        return v0_2;
    }

Method com.google.android.gms.tagmanager.zzx.zzOX() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private int zzOX()
    {
        int v0_0 = 0;
        String v2_5 = this.zzhh("Error opening database for getNumStoredEntries.");
        if (v2_5 != null) {
            try {
                android.database.Cursor v1 = v2_5.rawQuery("SELECT COUNT(*) from datalayer", 0);
            } catch (String v2) {
                com.google.android.gms.tagmanager.zzbo.zzbe("Error getting numStoredEntries");
                if (v1 != null) {
                    v1.close();
                }
            } catch (int v0_1) {
                if (v1 != null) {
                    v1.close();
                }
                throw v0_1;
            }
            if (v1.moveToFirst()) {
                v0_0 = ((int) v1.getLong(0));
            }
            if (v1 != null) {
                v1.close();
            }
        }
        return v0_0;
    }

Method com.google.android.gms.tagmanager.zzx$zza.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public void onOpen(android.database.sqlite.SQLiteDatabase p3)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_5 = p3.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_5.moveToFirst();
                v0_5.close();
            } catch (Throwable v1_2) {
                v0_5.close();
                throw v1_2;
            }
        }
        if (this.zza("datalayer", p3)) {
            this.zzc(p3);
        } else {
            p3.execSQL(com.google.android.gms.tagmanager.zzx.zzOZ());
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzx$zza.zzc() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private void zzc(android.database.sqlite.SQLiteDatabase p6)
    {
        String v1_1 = p6.rawQuery("SELECT * FROM datalayer WHERE 0", 0);
        java.util.HashSet v2_1 = new java.util.HashSet();
        try {
            String[] v3 = v1_1.getColumnNames();
            android.database.sqlite.SQLiteException v0_15 = 0;
        } catch (android.database.sqlite.SQLiteException v0_1) {
            v1_1.close();
            throw v0_1;
        }
        while (v0_15 < v3.length) {
            v2_1.add(v3[v0_15]);
            v0_15++;
        }
        v1_1.close();
        if ((v2_1.remove("key")) && ((v2_1.remove("value")) && ((v2_1.remove("ID")) && (v2_1.remove("expires"))))) {
            if (v2_1.isEmpty()) {
                return;
            } else {
                throw new android.database.sqlite.SQLiteException("Database has extra columns");
            }
        } else {
            throw new android.database.sqlite.SQLiteException("Database column missing");
        }
    }

Method com.google.android.gms.tagmanager.zzcg.zzPw() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    int zzPw()
    {
        int v0_0 = 0;
        String v2_5 = this.zzhh("Error opening database for getNumStoredHits.");
        if (v2_5 != null) {
            try {
                android.database.Cursor v1 = v2_5.rawQuery("SELECT COUNT(*) from gtm_hits", 0);
            } catch (String v2) {
                com.google.android.gms.tagmanager.zzbo.zzbe("Error getting numStoredHits");
                if (v1 != null) {
                    v1.close();
                }
            } catch (int v0_1) {
                if (v1 != null) {
                    v1.close();
                }
                throw v0_1;
            }
            if (v1.moveToFirst()) {
                v0_0 = ((int) v1.getLong(0));
            }
            if (v1 != null) {
                v1.close();
            }
        }
        return v0_0;
    }

Method com.google.android.gms.tagmanager.zzcg$zzb.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public void onOpen(android.database.sqlite.SQLiteDatabase p3)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_5 = p3.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_5.moveToFirst();
                v0_5.close();
            } catch (Throwable v1_2) {
                v0_5.close();
                throw v1_2;
            }
        }
        if (this.zza("gtm_hits", p3)) {
            this.zzc(p3);
        } else {
            p3.execSQL(com.google.android.gms.tagmanager.zzcg.zzPy());
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzcg$zzb.zzc() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private void zzc(android.database.sqlite.SQLiteDatabase p6)
    {
        String v1_1 = p6.rawQuery("SELECT * FROM gtm_hits WHERE 0", 0);
        java.util.HashSet v2_1 = new java.util.HashSet();
        try {
            String[] v3 = v1_1.getColumnNames();
            android.database.sqlite.SQLiteException v0_15 = 0;
        } catch (android.database.sqlite.SQLiteException v0_1) {
            v1_1.close();
            throw v0_1;
        }
        while (v0_15 < v3.length) {
            v2_1.add(v3[v0_15]);
            v0_15++;
        }
        v1_1.close();
        if ((v2_1.remove("hit_id")) && ((v2_1.remove("hit_url")) && ((v2_1.remove("hit_time")) && (v2_1.remove("hit_first_send_time"))))) {
            if (v2_1.isEmpty()) {
                return;
            } else {
                throw new android.database.sqlite.SQLiteException("Database has extra columns");
            }
        } else {
            throw new android.database.sqlite.SQLiteException("Database column missing");
        }
    }

Method com.google.android.gms.internal.zzsa.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private long zzb(String p5, String[] p6)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p5, p6);
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzd("Database error", p5, v0_2);
            throw v0_2;
        } catch (android.database.sqlite.SQLiteException v0_3) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_3;
        }
        if (!v1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            String v2_1 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v2_1;
        }
    }

Method com.google.android.gms.internal.zzsa.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private long zza(String p4, String[] p5, long p6)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p4, p5);
        } catch (int v0_4) {
            this.zzd("Database error", p4, v0_4);
            throw v0_4;
        } catch (int v0_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_1;
        }
        if (!v1.moveToFirst()) {
            if (v1 != null) {
                v1.close();
            }
        } else {
            p6 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
        }
        return p6;
    }

Method com.google.android.gms.internal.zzsa$zza.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public void onOpen(android.database.sqlite.SQLiteDatabase p3)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_8 = p3.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_8.moveToFirst();
                v0_8.close();
            } catch (Throwable v1_2) {
                v0_8.close();
                throw v1_2;
            }
        }
        if (this.zza(p3, "hits2")) {
            this.zza(p3);
        } else {
            p3.execSQL(com.google.android.gms.internal.zzsa.zznW());
        }
        if (this.zza(p3, "properties")) {
            this.zzb(p3);
        } else {
            p3.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
        }
        return;
    }

Method com.google.android.gms.internal.zzsa$zza.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private java.util.Set zzb(android.database.sqlite.SQLiteDatabase p6, String p7)
    {
        java.util.HashSet v1_1 = new java.util.HashSet();
        android.database.Cursor v2_2 = p6.rawQuery(new StringBuilder((String.valueOf(p7).length() + 22)).append("SELECT * FROM ").append(p7).append(" LIMIT 0").toString(), 0);
        try {
            String[] v3 = v2_2.getColumnNames();
            int v0_5 = 0;
        } catch (int v0_6) {
            v2_2.close();
            throw v0_6;
        }
        while (v0_5 < v3.length) {
            v1_1.add(v3[v0_5]);
            v0_5++;
        }
        v2_2.close();
        return v1_1;
    }

Method com.google.android.gms.internal.zzatg.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private boolean zza(int p13, byte[] p14)
    {
        int v0_3;
        this.zzJe();
        this.zzmq();
        if (!this.zzbrE) {
            android.content.ContentValues v6_1 = new android.content.ContentValues();
            v6_1.put("type", Integer.valueOf(p13));
            v6_1.put("entry", p14);
            this.zzJv().zzKt();
            int v3 = 0;
            int v0_1 = 5;
            while (v3 < 5) {
                try {
                    android.database.sqlite.SQLiteDatabase v2 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzati$zza v1_1) {
                    this.zzJt().zzLa().zzj("Error writing entry to local database", v1_1);
                    this.zzbrE = 1;
                    if (v2 == null) {
                        v3++;
                    } else {
                        v2.close();
                    }
                    v2.insertOrThrow("messages", 0, v6_1);
                    v2.setTransactionSuccessful();
                    v2.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    v0_3 = 1;
                } catch (com.google.android.gms.internal.zzati$zza v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v2 != null) {
                            if (v2.inTransaction()) {
                                v2.endTransaction();
                            }
                        }
                        this.zzJt().zzLa().zzj("Error writing entry to local database", v1_20);
                        this.zzbrE = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 == null) {
                    } else {
                        v2.close();
                    }
                } catch (int v0_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    throw v0_2;
                }
                if (v2 != null) {
                    v2.beginTransaction();
                    Long v4_4 = 0;
                    com.google.android.gms.internal.zzati$zza v1_10 = v2.rawQuery("select count(1) from messages", 0);
                    if ((v1_10 != null) && (v1_10.moveToFirst())) {
                        v4_4 = v1_10.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzJt().zzLa().log("Data loss, local db full");
                        Long v4_7 = ((100000 - v4_4) + 1);
                        long v8_4 = new String[1];
                        v8_4[0] = Long.toString(v4_7);
                        long v8_5 = ((long) v2.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v8_4));
                        if (v8_5 != v4_7) {
                            this.zzJt().zzLa().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_7), Long.valueOf(v8_5), Long.valueOf((v4_7 - v8_5)));
                        }
                    }
                } else {
                    this.zzbrE = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzJt().zzLc().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method com.google.android.gms.internal.zzatg$zza.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public void onOpen(android.database.sqlite.SQLiteDatabase p7)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.zzati v0_4 = p7.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_4.moveToFirst();
                v0_4.close();
            } catch (Throwable v1_2) {
                v0_4.close();
                throw v1_2;
            }
        }
        com.google.android.gms.internal.zzasu.zza(this.zzbrF.zzJt(), p7, "messages", "create table if not exists messages ( type INTEGER NOT NULL, entry BLOB NOT NULL)", "type,entry", 0);
        return;
    }

Method com.google.android.gms.internal.zzasu.zzam() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public String zzam(long p8)
    {
        String v0_0 = 0;
        this.zzmq();
        this.zznA();
        try {
            int v1_4 = this.getWritableDatabase();
            String v3_4 = new String[1];
            v3_4[0] = String.valueOf(p8);
            Throwable v2_0 = v1_4.rawQuery("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;", v3_4);
            try {
                if (v2_0.moveToFirst()) {
                    v0_0 = v2_0.getString(0);
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                } else {
                    this.zzJt().zzLg().log("No expired configs for apps with pending events");
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                }
            } catch (int v1_0) {
                this.zzJt().zzLa().zzj("Error selecting expired configs", v1_0);
                if (v2_0 == null) {
                    return v0_0;
                } else {
                    v2_0.close();
                    return v0_0;
                }
            }
        } catch (int v1_1) {
            v2_0 = 0;
            String v0_1 = v1_1;
            if (v2_0 != null) {
                v2_0.close();
            }
            throw v0_1;
        } catch (int v1_0) {
            v2_0 = 0;
        } catch (String v0_1) {
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public void zza(String p15, long p16, long p18, com.google.android.gms.internal.zzasu$zzb p20)
    {
        com.google.android.gms.common.internal.zzac.zzw(p20);
        this.zzmq();
        this.zznA();
        android.database.Cursor v3_19 = 0;
        try {
            String v12;
            boolean v2_19 = this.getWritableDatabase();
        } catch (boolean v2_2) {
            if (v3_19 != null) {
                v3_19.close();
            }
            throw v2_2;
        } catch (boolean v2_1) {
            this.zzJt().zzLa().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzati.zzfI(p15), v2_1);
            if (v3_19 == null) {
                return;
            } else {
                v3_19.close();
                return;
            }
        }
        if (!android.text.TextUtils.isEmpty(p15)) {
            String v5_4;
            if (p18 == -1) {
                com.google.android.gms.internal.zzati$zza v4_10 = new String[1];
                v4_10[0] = p15;
                v5_4 = v4_10;
            } else {
                com.google.android.gms.internal.zzati$zza v4_16 = new String[2];
                v4_16[0] = p15;
                v4_16[1] = String.valueOf(p18);
                v5_4 = v4_16;
            }
            com.google.android.gms.internal.zzati$zza v4_27;
            if (p18 == -1) {
                v4_27 = "";
            } else {
                v4_27 = " and rowid <= ?";
            }
            android.database.Cursor v3_22 = v2_19.rawQuery(new StringBuilder((String.valueOf(v4_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v4_27).append(" order by rowid limit 1;").toString(), v5_4);
            if (v3_22.moveToFirst()) {
                com.google.android.gms.internal.zzati$zza v4_34 = v3_22.getString(0);
                v3_22.close();
                v12 = v4_34;
            } else {
                if (v3_22 == null) {
                    return;
                } else {
                    v3_22.close();
                    return;
                }
            }
        } else {
            String v5_13;
            if (p18 == -1) {
                com.google.android.gms.internal.zzati$zza v4_38 = new String[1];
                v4_38[0] = String.valueOf(p16);
                v5_13 = v4_38;
            } else {
                com.google.android.gms.internal.zzati$zza v4_41 = new String[2];
                v4_41[0] = String.valueOf(p18);
                v4_41[1] = String.valueOf(p16);
                v5_13 = v4_41;
            }
            com.google.android.gms.internal.zzati$zza v4_43;
            if (p18 == -1) {
                v4_43 = "";
            } else {
                v4_43 = "rowid <= ? and ";
            }
            android.database.Cursor v3_0 = v2_19.rawQuery(new StringBuilder((String.valueOf(v4_43).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v4_43).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v5_13);
            if (v3_0.moveToFirst()) {
                p15 = v3_0.getString(0);
                com.google.android.gms.internal.zzati$zza v4_6 = v3_0.getString(1);
                v3_0.close();
                v12 = v4_6;
            } else {
                if (v3_0 == null) {
                    return;
                } else {
                    v3_0.close();
                    return;
                }
            }
        }
        try {
            com.google.android.gms.internal.zzati$zza v4_9 = new String[1];
            v4_9[0] = "metadata";
            Object v6_2 = new String[2];
            v6_2[0] = p15;
            v6_2[1] = v12;
            boolean v11 = v2_19.query("raw_events_metadata", v4_9, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
        } catch (boolean v2_2) {
            v3_19 = v11;
        } catch (boolean v2_1) {
            v3_19 = v11;
        }
        if (v11.moveToFirst()) {
            android.database.Cursor v3_5 = com.google.android.gms.internal.zzbul.zzad(v11.getBlob(0));
            com.google.android.gms.internal.zzati$zza v4_12 = new com.google.android.gms.internal.zzauh$zze();
            try {
                v4_12.zzb(v3_5);
            } catch (boolean v2_0) {
                this.zzJt().zzLa().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzati.zzfI(p15), v2_0);
                if (!v11) {
                    return;
                } else {
                    v11.close();
                    return;
                }
            }
            if (v11.moveToNext()) {
                this.zzJt().zzLc().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzati.zzfI(p15));
            }
            String v5_6;
            Object v6_4;
            v11.close();
            p20.zzb(v4_12);
            if (p18 == -1) {
                v5_6 = "app_id = ? and metadata_fingerprint = ?";
                v6_4 = new String[2];
                v6_4[0] = p15;
                v6_4[1] = v12;
            } else {
                v5_6 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                v6_4 = new String[3];
                v6_4[0] = p15;
                v6_4[1] = v12;
                v6_4[2] = String.valueOf(p18);
            }
            com.google.android.gms.internal.zzati$zza v4_19 = new String[4];
            v4_19[0] = "rowid";
            v4_19[1] = "name";
            v4_19[2] = "timestamp";
            v4_19[3] = "data";
            v3_19 = v2_19.query("raw_events", v4_19, v5_6, v6_4, 0, 0, "rowid", 0);
            if (!v3_19.moveToFirst()) {
                this.zzJt().zzLc().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzati.zzfI(p15));
                if (v3_19 == null) {
                    return;
                } else {
                    v3_19.close();
                    return;
                }
            }
            do {
                com.google.android.gms.internal.zzati$zza v4_20 = v3_19.getLong(0);
                boolean v2_7 = com.google.android.gms.internal.zzbul.zzad(v3_19.getBlob(3));
                Object v6_7 = new com.google.android.gms.internal.zzauh$zzb();
                v6_7.zzb(v2_7);
                v6_7.name = v3_19.getString(1);
                v6_7.zzbvW = Long.valueOf(v3_19.getLong(2));
                if (p20.zza(v4_20, v6_7)) {
                } else {
                    if (v3_19 == null) {
                        return;
                    } else {
                        v3_19.close();
                        return;
                    }
                }
            } while(v3_19.moveToNext());
            if (v3_19 == null) {
                return;
            } else {
                v3_19.close();
                return;
            }
        } else {
            this.zzJt().zzLa().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzati.zzfI(p15));
            if (!v11) {
                return;
            } else {
                v11.close();
                return;
            }
        }
    }

Method com.google.android.gms.internal.zzasu.zzKO() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public long zzKO()
    {
        long v0_0 = -1;
        try {
            android.database.Cursor v3 = this.getWritableDatabase().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
        } catch (int v2_1) {
            this.zzJt().zzLa().zzj("Error querying raw events", v2_1);
            if (v3 == null) {
                return v0_0;
            } else {
                v3.close();
                return v0_0;
            }
        } catch (long v0_1) {
            if (v3 != null) {
                v3.close();
            }
            throw v0_1;
        }
        if (v3.moveToFirst()) {
            v0_0 = v3.getLong(0);
            if (v3 == null) {
                return v0_0;
            } else {
                v3.close();
                return v0_0;
            }
        } else {
            if (v3 == null) {
                return v0_0;
            } else {
                v3.close();
                return v0_0;
            }
        }
    }

Method com.google.android.gms.internal.zzasu.zzKG() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public String zzKG()
    {
        String v0_0 = 0;
        try {
            Throwable v2_0 = this.getWritableDatabase().rawQuery("select app_id from queue where app_id not in (select app_id from apps where measurement_enabled=0) order by has_realtime desc, rowid asc limit 1;", 0);
            try {
                if (!v2_0.moveToFirst()) {
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                } else {
                    v0_0 = v2_0.getString(0);
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                }
            } catch (int v1_1) {
                this.zzJt().zzLa().zzj("Database error getting next bundle app id", v1_1);
                if (v2_0 == null) {
                    return v0_0;
                } else {
                    v2_0.close();
                    return v0_0;
                }
            }
        } catch (int v1_4) {
            v2_0 = 0;
            String v0_1 = v1_4;
            if (v2_0 != null) {
                v2_0.close();
            }
            throw v0_1;
        } catch (int v1_1) {
            v2_0 = 0;
        } catch (String v0_1) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    static java.util.Set zzb(android.database.sqlite.SQLiteDatabase p3, String p4)
    {
        Throwable v0_1 = new java.util.HashSet();
        android.database.Cursor v1_5 = p3.rawQuery(new StringBuilder((String.valueOf(p4).length() + 22)).append("SELECT * FROM ").append(p4).append(" LIMIT 0").toString(), 0);
        try {
            java.util.Collections.addAll(v0_1, v1_5.getColumnNames());
            v1_5.close();
            return v0_1;
        } catch (Throwable v0_2) {
            v1_5.close();
            throw v0_2;
        }
    }

Method com.google.android.gms.internal.zzasu.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private long zzb(String p5, String[] p6)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p5, p6);
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzJt().zzLa().zze("Database error", p5, v0_2);
            throw v0_2;
        } catch (android.database.sqlite.SQLiteException v0_3) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_3;
        }
        if (!v1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            com.google.android.gms.internal.zzati$zza v2_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v2_2;
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private long zza(String p6, String[] p7, long p8)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p6, p7);
        } catch (int v0_4) {
            this.zzJt().zzLa().zze("Database error", p6, v0_4);
            throw v0_4;
        } catch (int v0_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_1;
        }
        if (!v1.moveToFirst()) {
            if (v1 != null) {
                v1.close();
            }
        } else {
            p8 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
        }
        return p8;
    }

Method com.google.android.gms.internal.zzasu$zzc.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public void onOpen(android.database.sqlite.SQLiteDatabase p13)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.zzati v0_11 = p13.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_11.moveToFirst();
                v0_11.close();
            } catch (Throwable v1_7) {
                v0_11.close();
                throw v1_7;
            }
        }
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "events", "CREATE TABLE IF NOT EXISTS events ( app_id TEXT NOT NULL, name TEXT NOT NULL, lifetime_count INTEGER NOT NULL, current_bundle_count INTEGER NOT NULL, last_fire_timestamp INTEGER NOT NULL, PRIMARY KEY (app_id, name)) ;", "app_id,name,lifetime_count,current_bundle_count,last_fire_timestamp", 0);
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "user_attributes", "CREATE TABLE IF NOT EXISTS user_attributes ( app_id TEXT NOT NULL, name TEXT NOT NULL, set_timestamp INTEGER NOT NULL, value BLOB NOT NULL, PRIMARY KEY (app_id, name)) ;", "app_id,name,set_timestamp,value", 0);
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "apps", "CREATE TABLE IF NOT EXISTS apps ( app_id TEXT NOT NULL, app_instance_id TEXT, gmp_app_id TEXT, resettable_device_id_hash TEXT, last_bundle_index INTEGER NOT NULL, last_bundle_end_timestamp INTEGER NOT NULL, PRIMARY KEY (app_id)) ;", "app_id,app_instance_id,gmp_app_id,resettable_device_id_hash,last_bundle_index,last_bundle_end_timestamp", com.google.android.gms.internal.zzasu.zzKQ());
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "queue", "CREATE TABLE IF NOT EXISTS queue ( app_id TEXT NOT NULL, bundle_end_timestamp INTEGER NOT NULL, data BLOB NOT NULL);", "app_id,bundle_end_timestamp,data", com.google.android.gms.internal.zzasu.zzKR());
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "raw_events_metadata", "CREATE TABLE IF NOT EXISTS raw_events_metadata ( app_id TEXT NOT NULL, metadata_fingerprint INTEGER NOT NULL, metadata BLOB NOT NULL, PRIMARY KEY (app_id, metadata_fingerprint));", "app_id,metadata_fingerprint,metadata", 0);
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "raw_events", "CREATE TABLE IF NOT EXISTS raw_events ( app_id TEXT NOT NULL, name TEXT NOT NULL, timestamp INTEGER NOT NULL, metadata_fingerprint INTEGER NOT NULL, data BLOB NOT NULL);", "app_id,name,timestamp,metadata_fingerprint,data", com.google.android.gms.internal.zzasu.zzKS());
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "event_filters", "CREATE TABLE IF NOT EXISTS event_filters ( app_id TEXT NOT NULL, audience_id INTEGER NOT NULL, filter_id INTEGER NOT NULL, event_name TEXT NOT NULL, data BLOB NOT NULL, PRIMARY KEY (app_id, event_name, audience_id, filter_id));", "app_id,audience_id,filter_id,event_name,data", 0);
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "property_filters", "CREATE TABLE IF NOT EXISTS property_filters ( app_id TEXT NOT NULL, audience_id INTEGER NOT NULL, filter_id INTEGER NOT NULL, property_name TEXT NOT NULL, data BLOB NOT NULL, PRIMARY KEY (app_id, property_name, audience_id, filter_id));", "app_id,audience_id,filter_id,property_name,data", 0);
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "audience_filter_values", "CREATE TABLE IF NOT EXISTS audience_filter_values ( app_id TEXT NOT NULL, audience_id INTEGER NOT NULL, current_results BLOB, PRIMARY KEY (app_id, audience_id));", "app_id,audience_id,current_results", 0);
        com.google.android.gms.internal.zzasu.zza(this.zzbqA.zzJt(), p13, "app2", "CREATE TABLE IF NOT EXISTS app2 ( app_id TEXT NOT NULL, first_open_count INTEGER NOT NULL, PRIMARY KEY (app_id));", "app_id,first_open_count", com.google.android.gms.internal.zzasu.zzKT());
        return;
    }

Method com.facebook.stetho.inspector.database.SqliteDatabaseDriver.getTableNames() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public java.util.List getTableNames(String p6)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.openDatabase(p6);
        try {
            android.database.Cursor v2_2 = new String[2];
            v2_2[0] = "table";
            v2_2[1] = "view";
            android.database.Cursor v2_0 = v1.rawQuery("SELECT name FROM sqlite_master WHERE type IN (?, ?)", v2_2);
            try {
                Throwable v0_1 = new java.util.ArrayList();
            } catch (Throwable v0_2) {
                v2_0.close();
                throw v0_2;
            }
            while (v2_0.moveToNext()) {
                v0_1.add(v2_0.getString(0));
            }
            v2_0.close();
            v1.close();
            return v0_1;
        } catch (Throwable v0_4) {
            v1.close();
            throw v0_4;
        }
    }

Method com.facebook.stetho.inspector.database.SqliteDatabaseDriver.executeSelect() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private Object executeSelect(android.database.sqlite.SQLiteDatabase p3, String p4, com.facebook.stetho.inspector.protocol.module.Database$DatabaseDriver$ExecuteResultHandler p5)
    {
        android.database.Cursor v0_1 = p3.rawQuery(p4, 0);
        try {
            Throwable v1_0 = p5.handleSelect(v0_1);
            v0_1.close();
            return v1_0;
        } catch (Throwable v1_1) {
            v0_1.close();
            throw v1_1;
        }
    }

Method io.fabric.sdk.android.d.openOrCreateDatabase() calling method android.database.sqlite.SQLiteDatabase.openOrCreateDatabase()


    public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(String p2, int p3, android.database.sqlite.SQLiteDatabase$CursorFactory p4, android.database.DatabaseErrorHandler p5)
    {
        return android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(this.getDatabasePath(p2).getPath(), p4, p5);
    }

Method io.fabric.sdk.android.d.openOrCreateDatabase() calling method android.database.sqlite.SQLiteDatabase.openOrCreateDatabase()


    public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(String p2, int p3, android.database.sqlite.SQLiteDatabase$CursorFactory p4)
    {
        return android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(this.getDatabasePath(p2), p4);
    }

Method com.facebook.stetho.inspector.database.SqliteDatabaseDriver.openDatabase() calling method android.database.sqlite.SQLiteDatabase.openDatabase()


    private android.database.sqlite.SQLiteDatabase openDatabase(String p4)
    {
        com.facebook.stetho.common.Util.throwIfNull(p4);
        return android.database.sqlite.SQLiteDatabase.openDatabase(this.mContext.getDatabasePath(p4).getAbsolutePath(), 0, 0);
    }

Method com.google.android.gms.internal.zzatg.zza() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    private boolean zza(int p13, byte[] p14)
    {
        int v0_3;
        this.zzJe();
        this.zzmq();
        if (!this.zzbrE) {
            android.content.ContentValues v6_1 = new android.content.ContentValues();
            v6_1.put("type", Integer.valueOf(p13));
            v6_1.put("entry", p14);
            this.zzJv().zzKt();
            int v3 = 0;
            int v0_1 = 5;
            while (v3 < 5) {
                try {
                    android.database.sqlite.SQLiteDatabase v2 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzati$zza v1_1) {
                    this.zzJt().zzLa().zzj("Error writing entry to local database", v1_1);
                    this.zzbrE = 1;
                    if (v2 == null) {
                        v3++;
                    } else {
                        v2.close();
                    }
                    v2.insertOrThrow("messages", 0, v6_1);
                    v2.setTransactionSuccessful();
                    v2.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    v0_3 = 1;
                } catch (com.google.android.gms.internal.zzati$zza v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v2 != null) {
                            if (v2.inTransaction()) {
                                v2.endTransaction();
                            }
                        }
                        this.zzJt().zzLa().zzj("Error writing entry to local database", v1_20);
                        this.zzbrE = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 == null) {
                    } else {
                        v2.close();
                    }
                } catch (int v0_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    throw v0_2;
                }
                if (v2 != null) {
                    v2.beginTransaction();
                    Long v4_4 = 0;
                    com.google.android.gms.internal.zzati$zza v1_10 = v2.rawQuery("select count(1) from messages", 0);
                    if ((v1_10 != null) && (v1_10.moveToFirst())) {
                        v4_4 = v1_10.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzJt().zzLa().log("Data loss, local db full");
                        Long v4_7 = ((100000 - v4_4) + 1);
                        long v8_4 = new String[1];
                        v8_4[0] = Long.toString(v4_7);
                        long v8_5 = ((long) v2.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v8_4));
                        if (v8_5 != v4_7) {
                            this.zzJt().zzLa().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_7), Long.valueOf(v8_5), Long.valueOf((v4_7 - v8_5)));
                        }
                    }
                } else {
                    this.zzbrE = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzJt().zzLc().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method com.google.android.gms.tagmanager.zzx.zzc() calling method android.database.sqlite.SQLiteDatabase.insert()


    private void zzc(java.util.List p7, long p8)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.zzhh("Error opening database for writeEntryToDatabase.");
        if (v1 != null) {
            java.util.Iterator v2 = p7.iterator();
            while (v2.hasNext()) {
                String v0_2 = ((com.google.android.gms.tagmanager.zzx$zzb) v2.next());
                android.content.ContentValues v3_1 = new android.content.ContentValues();
                v3_1.put("expires", Long.valueOf(p8));
                v3_1.put("key", v0_2.zzAH);
                v3_1.put("value", v0_2.zzbDS);
                v1.insert("datalayer", 0, v3_1);
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzcg.zzh() calling method android.database.sqlite.SQLiteDatabase.insert()


    private void zzh(long p6, String p8)
    {
        String v0_3 = this.zzhh("Error opening database for putHit");
        if (v0_3 != null) {
            int v1_2 = new android.content.ContentValues();
            v1_2.put("hit_time", Long.valueOf(p6));
            v1_2.put("hit_url", p8);
            v1_2.put("hit_first_send_time", Integer.valueOf(0));
            try {
                v0_3.insert("gtm_hits", 0, v1_2);
                this.zzbES.zzaM(0);
            } catch (String v0) {
                com.google.android.gms.tagmanager.zzbo.zzbe("Error storing hit");
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzsa.zzc() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void zzc(com.google.android.gms.internal.zzst p7)
    {
        com.google.android.gms.common.internal.zzac.zzw(p7);
        this.zzmq();
        this.zznA();
        Long v0_5 = com.google.android.gms.internal.zzsa.zze(p7);
        if (v0_5.length() <= 8192) {
            this.zznU();
            String v1_0 = this.getWritableDatabase();
            String v2_1 = new android.content.ContentValues();
            v2_1.put("hit_string", v0_5);
            v2_1.put("hit_time", Long.valueOf(p7.zzpq()));
            v2_1.put("hit_app_id", Integer.valueOf(p7.zzpo()));
            v2_1.put("hit_url", this.zzd(p7));
            try {
                Long v0_4 = v1_0.insert("hits2", 0, v2_1);
            } catch (Long v0_7) {
                this.zze("Error storing a hit", v0_7);
            }
            if (v0_4 != -1) {
                this.zzb("Hit saved to database. db-id, hit", Long.valueOf(v0_4), p7);
            } else {
                this.zzbS("Failed to insert a hit (got -1)");
            }
        } else {
            this.zznr().zza(p7, "Hit length exceeds the maximum allowed size");
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void zza(com.google.android.gms.internal.zzauh$zze p7, boolean p8)
    {
        this.zzmq();
        this.zznA();
        com.google.android.gms.common.internal.zzac.zzw(p7);
        com.google.android.gms.common.internal.zzac.zzdv(p7.zzaR);
        com.google.android.gms.common.internal.zzac.zzw(p7.zzbwh);
        this.zzKI();
        com.google.android.gms.internal.zzati$zza v0_3 = this.zznq().currentTimeMillis();
        if ((p7.zzbwh.longValue() < (v0_3 - this.zzJv().zzKn())) || (p7.zzbwh.longValue() > (this.zzJv().zzKn() + v0_3))) {
            this.zzJt().zzLc().zzd("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.internal.zzati.zzfI(p7.zzaR), Long.valueOf(v0_3), p7.zzbwh);
        }
        try {
            com.google.android.gms.internal.zzati$zza v0_11;
            com.google.android.gms.internal.zzati$zza v0_7 = new byte[p7.zzacZ()];
            String v1_4 = com.google.android.gms.internal.zzbum.zzae(v0_7);
            p7.zza(v1_4);
            v1_4.zzacM();
            com.google.android.gms.internal.zzati$zza v0_9 = this.zzJp().zzk(v0_7);
            this.zzJt().zzLg().zzj("Saving bundle, size", Integer.valueOf(v0_9.length));
            String v1_9 = new android.content.ContentValues();
            v1_9.put("app_id", p7.zzaR);
            v1_9.put("bundle_end_timestamp", p7.zzbwh);
            v1_9.put("data", v0_9);
        } catch (com.google.android.gms.internal.zzati$zza v0_10) {
            this.zzJt().zzLa().zze("Data loss. Failed to serialize bundle. appId", com.google.android.gms.internal.zzati.zzfI(p7.zzaR), v0_10);
            return;
        }
        if (!p8) {
            v0_11 = 0;
        } else {
            v0_11 = 1;
        }
        v1_9.put("has_realtime", Integer.valueOf(v0_11));
        try {
            if (this.getWritableDatabase().insert("queue", 0, v1_9) != -1) {
                return;
            } else {
                this.zzJt().zzLa().zzj("Failed to insert bundle (got -1). appId", com.google.android.gms.internal.zzati.zzfI(p7.zzaR));
                return;
            }
        } catch (com.google.android.gms.internal.zzati$zza v0_2) {
            this.zzJt().zzLa().zze("Error storing bundle. appId", com.google.android.gms.internal.zzati.zzfI(p7.zzaR), v0_2);
            return;
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void zza(com.google.android.gms.internal.zzasx p9, long p10, boolean p12)
    {
        Object v2_0 = 0;
        this.zzmq();
        this.zznA();
        com.google.android.gms.common.internal.zzac.zzw(p9);
        com.google.android.gms.common.internal.zzac.zzdv(p9.zzVQ);
        Long v4_7 = new com.google.android.gms.internal.zzauh$zzb();
        v4_7.zzbvX = Long.valueOf(p9.zzbqH);
        com.google.android.gms.internal.zzati$zza v0_6 = new com.google.android.gms.internal.zzauh$zzc[p9.zzbqI.size()];
        v4_7.zzbvV = v0_6;
        Integer v5_0 = p9.zzbqI.iterator();
        String v1_2 = 0;
        while (v5_0.hasNext()) {
            com.google.android.gms.internal.zzati$zza v0_2 = ((String) v5_0.next());
            com.google.android.gms.internal.zzauh$zzc v6_1 = new com.google.android.gms.internal.zzauh$zzc();
            Object v3_2 = (v1_2 + 1);
            v4_7.zzbvV[v1_2] = v6_1;
            v6_1.name = v0_2;
            this.zzJp().zza(v6_1, p9.zzbqI.get(v0_2));
            v1_2 = v3_2;
        }
        try {
            com.google.android.gms.internal.zzati$zza v0_10 = new byte[v4_7.zzacZ()];
            String v1_3 = com.google.android.gms.internal.zzbum.zzae(v0_10);
            v4_7.zza(v1_3);
            v1_3.zzacM();
            this.zzJt().zzLg().zze("Saving event, name, data size", p9.mName, Integer.valueOf(v0_10.length));
            String v1_7 = new android.content.ContentValues();
            v1_7.put("app_id", p9.zzVQ);
            v1_7.put("name", p9.mName);
            v1_7.put("timestamp", Long.valueOf(p9.zzavX));
            v1_7.put("metadata_fingerprint", Long.valueOf(p10));
            v1_7.put("data", v0_10);
        } catch (com.google.android.gms.internal.zzati$zza v0_13) {
            this.zzJt().zzLa().zze("Data loss. Failed to serialize event params/data. appId", com.google.android.gms.internal.zzati.zzfI(p9.zzVQ), v0_13);
            return;
        }
        if (p12) {
            v2_0 = 1;
        }
        v1_7.put("realtime", Integer.valueOf(v2_0));
        try {
            if (this.getWritableDatabase().insert("raw_events", 0, v1_7) != -1) {
                return;
            } else {
                this.zzJt().zzLa().zzj("Failed to insert raw event (got -1). appId", com.google.android.gms.internal.zzati.zzfI(p9.zzVQ));
                return;
            }
        } catch (com.google.android.gms.internal.zzati$zza v0_20) {
            this.zzJt().zzLa().zze("Error storing raw event. appId", com.google.android.gms.internal.zzati.zzfI(p9.zzVQ), v0_20);
            return;
        }
    }

Method com.j256.ormlite.android.AndroidCompiledStatement.execSql() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static int execSql(android.database.sqlite.SQLiteDatabase p5, String p6, String p7, Object[] p8)
    {
        try {
            p5.execSQL(p7, p8);
            try {
                com.j256.ormlite.logger.Logger v1_4 = p5.compileStatement("SELECT CHANGES()");
                try {
                    android.database.SQLException v0_4 = ((int) v1_4.simpleQueryForLong());
                } catch (android.database.SQLException v0_3) {
                    if (v1_4 != null) {
                        v1_4.close();
                    }
                    throw v0_3;
                } catch (android.database.SQLException v0) {
                    v0_4 = 1;
                    if (v1_4 == null) {
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                        return v0_4;
                    } else {
                        v1_4.close();
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                        return v0_4;
                    }
                }
                if (v1_4 == null) {
                    com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                    return v0_4;
                } else {
                    v1_4.close();
                    com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                    return v0_4;
                }
            } catch (com.j256.ormlite.logger.Logger v1_5) {
                v1_4 = 0;
                v0_3 = v1_5;
            } catch (com.j256.ormlite.logger.Logger v1) {
                v1_4 = 0;
            }
        } catch (android.database.SQLException v0_2) {
            throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("Problems executing ").append(p6).append(" Android statement: ").append(p7).toString(), v0_2);
        }
    }

Method com.google.android.gms.tagmanager.zzx$zza.onOpen() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onOpen(android.database.sqlite.SQLiteDatabase p3)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_5 = p3.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_5.moveToFirst();
                v0_5.close();
            } catch (Throwable v1_2) {
                v0_5.close();
                throw v1_2;
            }
        }
        if (this.zza("datalayer", p3)) {
            this.zzc(p3);
        } else {
            p3.execSQL(com.google.android.gms.tagmanager.zzx.zzOZ());
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzcg$zzb.onOpen() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onOpen(android.database.sqlite.SQLiteDatabase p3)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_5 = p3.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_5.moveToFirst();
                v0_5.close();
            } catch (Throwable v1_2) {
                v0_5.close();
                throw v1_2;
            }
        }
        if (this.zza("gtm_hits", p3)) {
            this.zzc(p3);
        } else {
            p3.execSQL(com.google.android.gms.tagmanager.zzcg.zzPy());
        }
        return;
    }

Method com.google.android.gms.internal.zzsa$zza.onOpen() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onOpen(android.database.sqlite.SQLiteDatabase p3)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_8 = p3.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_8.moveToFirst();
                v0_8.close();
            } catch (Throwable v1_2) {
                v0_8.close();
                throw v1_2;
            }
        }
        if (this.zza(p3, "hits2")) {
            this.zza(p3);
        } else {
            p3.execSQL(com.google.android.gms.internal.zzsa.zznW());
        }
        if (this.zza(p3, "properties")) {
            this.zzb(p3);
        } else {
            p3.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
        }
        return;
    }

Method com.google.android.gms.internal.zzsa$zza.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void zza(android.database.sqlite.SQLiteDatabase p9)
    {
        String v0_0 = 1;
        int v3_1 = this.zzb(p9, "hits2");
        String[] v4 = new String[4];
        v4[0] = "hit_id";
        v4[1] = "hit_string";
        v4[2] = "hit_time";
        v4[3] = "hit_url";
        int v2_2 = 0;
        while (v2_2 < 4) {
            String v5_2 = v4[v2_2];
            if (v3_1.remove(v5_2)) {
                v2_2++;
            } else {
                String v0_6;
                String v0_4 = String.valueOf(v5_2);
                if (v0_4.length() == 0) {
                    v0_6 = new String("Database hits2 is missing required column: ");
                } else {
                    v0_6 = "Database hits2 is missing required column: ".concat(v0_4);
                }
                throw new android.database.sqlite.SQLiteException(v0_6);
            }
        }
        if (v3_1.remove("hit_app_id")) {
            v0_0 = 0;
        }
        if (v3_1.isEmpty()) {
            if (v0_0 != null) {
                p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
            }
            return;
        } else {
            throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
        }
    }

Method com.google.android.gms.internal.zzasu.zzz() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void zzz(String p6, int p7)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p6);
        this.zzmq();
        this.zznA();
        try {
            android.database.sqlite.SQLiteException v0_1 = this.getWritableDatabase();
            String v2_2 = new String[3];
            v2_2[0] = p6;
            v2_2[1] = p6;
            v2_2[2] = String.valueOf(p7);
            v0_1.execSQL("delete from user_attributes where app_id=? and name in (select name from user_attributes where app_id=? and name like \'_ltv_%\' order by set_timestamp desc limit ?,10);", v2_2);
        } catch (android.database.sqlite.SQLiteException v0_0) {
            this.zzJt().zzLa().zze("Error pruning currencies. appId", com.google.android.gms.internal.zzati.zzfI(p6), v0_0);
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zzfF() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void zzfF(String p5)
    {
        android.database.sqlite.SQLiteException v0_0 = this.getWritableDatabase();
        try {
            String v2_2 = new String[2];
            v2_2[0] = p5;
            v2_2[1] = p5;
            v0_0.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v2_2);
        } catch (android.database.sqlite.SQLiteException v0_1) {
            this.zzJt().zzLa().zze("Failed to remove unused event metadata. appId", com.google.android.gms.internal.zzati.zzfI(p5), v0_1);
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void zza(com.google.android.gms.internal.zzati p6, android.database.sqlite.SQLiteDatabase p7, String p8, String p9, java.util.Map p10)
    {
        if (p6 != null) {
            String v1_0 = com.google.android.gms.internal.zzasu.zzb(p7, p8);
            String v2_3 = p9.split(",");
            String v0_9 = 0;
            while (v0_9 < v2_3.length) {
                String v4 = v2_3[v0_9];
                if (v1_0.remove(v4)) {
                    v0_9++;
                } else {
                    throw new android.database.sqlite.SQLiteException(new StringBuilder(((String.valueOf(p8).length() + 35) + String.valueOf(v4).length())).append("Table ").append(p8).append(" is missing required column: ").append(v4).toString());
                }
            }
            if (p10 != null) {
                String v2_0 = p10.entrySet().iterator();
                while (v2_0.hasNext()) {
                    String v0_6 = ((java.util.Map$Entry) v2_0.next());
                    if (!v1_0.remove(v0_6.getKey())) {
                        p7.execSQL(((String) v0_6.getValue()));
                    }
                }
            }
            if (!v1_0.isEmpty()) {
                p6.zzLc().zze("Table has extra columns. table, columns", p8, android.text.TextUtils.join(", ", v1_0));
            }
            return;
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void zza(com.google.android.gms.internal.zzati p3, android.database.sqlite.SQLiteDatabase p4, String p5, String p6, String p7, java.util.Map p8)
    {
        if (p3 != null) {
            if (!com.google.android.gms.internal.zzasu.zza(p3, p4, p5)) {
                p4.execSQL(p6);
            }
            try {
                com.google.android.gms.internal.zzasu.zza(p3, p4, p5, p7, p8);
                return;
            } catch (android.database.sqlite.SQLiteException v0_3) {
                p3.zzLa().zzj("Failed to verify columns on table that was just created", p5);
                throw v0_3;
            }
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }

Method com.facebook.stetho.inspector.database.SqliteDatabaseDriver.executeRawQuery() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private Object executeRawQuery(android.database.sqlite.SQLiteDatabase p2, String p3, com.facebook.stetho.inspector.protocol.module.Database$DatabaseDriver$ExecuteResultHandler p4)
    {
        p2.execSQL(p3);
        return p4.handleRawQuery();
    }

Method com.google.android.gms.tagmanager.zzx.zzhg() calling method android.database.sqlite.SQLiteDatabase.delete()


    private void zzhg(String p8)
    {
        String v0_2 = this.zzhh("Error opening database for clearKeysWithPrefix.");
        if (v0_2 != null) {
            try {
                int v3_3 = new String[2];
                v3_3[0] = p8;
                v3_3[1] = String.valueOf(p8).concat(".%");
                com.google.android.gms.tagmanager.zzbo.v(new StringBuilder(25).append("Cleared ").append(v0_2.delete("datalayer", "key = ? OR key LIKE ?", v3_3)).append(" items").toString());
                this.zzOY();
            } catch (String v0_11) {
                this.zzOY();
                throw v0_11;
            } catch (String v0_6) {
                String v0_7 = String.valueOf(v0_6);
                com.google.android.gms.tagmanager.zzbo.zzbe(new StringBuilder(((String.valueOf(p8).length() + 44) + String.valueOf(v0_7).length())).append("Error deleting entries with key prefix: ").append(p8).append(" (").append(v0_7).append(").").toString());
                this.zzOY();
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzx.zzg() calling method android.database.sqlite.SQLiteDatabase.delete()


    private void zzg(String[] p8)
    {
        if ((p8 != null) && (p8.length != 0)) {
            String v0_6 = this.zzhh("Error opening database for deleteEntries.");
            if (v0_6 != null) {
                int v2_3 = new Object[2];
                v2_3[0] = "ID";
                v2_3[1] = android.text.TextUtils.join(",", java.util.Collections.nCopies(p8.length, "?"));
                try {
                    v0_6.delete("datalayer", String.format("%s in (%s)", v2_3), p8);
                } catch (String v0) {
                    String v0_3 = String.valueOf(java.util.Arrays.toString(p8));
                    if (v0_3.length() == 0) {
                        String v0_5 = new String("Error deleting entries ");
                    } else {
                        v0_5 = "Error deleting entries ".concat(v0_3);
                    }
                    com.google.android.gms.tagmanager.zzbo.zzbe(v0_5);
                }
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzx.zzaw() calling method android.database.sqlite.SQLiteDatabase.delete()


    private void zzaw(long p8)
    {
        String v0_2 = this.zzhh("Error opening database for deleteOlderThan.");
        if (v0_2 != null) {
            try {
                String[] v3_1 = new String[1];
                v3_1[0] = Long.toString(p8);
                com.google.android.gms.tagmanager.zzbo.v(new StringBuilder(33).append("Deleted ").append(v0_2.delete("datalayer", "expires <= ?", v3_1)).append(" expired items").toString());
            } catch (String v0) {
                com.google.android.gms.tagmanager.zzbo.zzbe("Error deleting old entries.");
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzcg.zznS() calling method android.database.sqlite.SQLiteDatabase.delete()


    int zznS()
    {
        int v0 = 1;
        int v1 = 0;
        int v2_4 = this.zzuI.currentTimeMillis();
        if (v2_4 > (this.zzbEU + 86400000)) {
            this.zzbEU = v2_4;
            int v2_1 = this.zzhh("Error opening database for deleteStaleHits.");
            if (v2_1 != 0) {
                String[] v7 = new String[1];
                v7[0] = Long.toString((this.zzuI.currentTimeMillis() - 1.280618154e-314));
                int v2_3 = v2_1.delete("gtm_hits", "HIT_TIME < ?", v7);
                if (this.zzPw() != 0) {
                    v0 = 0;
                }
                this.zzbES.zzaM(v0);
                v1 = v2_3;
            }
        }
        return v1;
    }

Method com.google.android.gms.tagmanager.zzcg.zzh() calling method android.database.sqlite.SQLiteDatabase.delete()


    void zzh(String[] p9)
    {
        int v0_0 = 1;
        if ((p9 != null) && (p9.length != 0)) {
            com.google.android.gms.tagmanager.zzax v2_3 = this.zzhh("Error opening database for deleteHits.");
            if (v2_3 != null) {
                String v4_0 = new Object[1];
                v4_0[0] = android.text.TextUtils.join(",", java.util.Collections.nCopies(p9.length, "?"));
                try {
                    v2_3.delete("gtm_hits", String.format("HIT_ID in (%s)", v4_0), p9);
                } catch (int v0) {
                    com.google.android.gms.tagmanager.zzbo.zzbe("Error deleting hits");
                }
                if (this.zzPw() != 0) {
                    v0_0 = 0;
                }
                this.zzbES.zzaM(v0_0);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzsa.zzr() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zzr(java.util.List p9)
    {
        com.google.android.gms.common.internal.zzac.zzw(p9);
        this.zzmq();
        this.zznA();
        if (!p9.isEmpty()) {
            String v2_5 = new StringBuilder("hit_id");
            v2_5.append(" in (");
            int v1_0 = 0;
            while (v1_0 < p9.size()) {
                int v0_7 = ((Long) p9.get(v1_0));
                if ((v0_7 != 0) && (v0_7.longValue() != 0)) {
                    if (v1_0 > 0) {
                        v2_5.append(",");
                    }
                    v2_5.append(v0_7);
                    v1_0++;
                } else {
                    throw new android.database.sqlite.SQLiteException("Invalid hit id");
                }
            }
            v2_5.append(")");
            int v0_3 = v2_5.toString();
            try {
                int v1_1 = this.getWritableDatabase();
                this.zza("Deleting dispatched hits. count", Integer.valueOf(p9.size()));
                int v1_2 = v1_1.delete("hits2", v0_3, 0);
            } catch (int v0_4) {
                this.zze("Error deleting hits", v0_4);
                throw v0_4;
            }
            if (v1_2 != p9.size()) {
                this.zzb("Deleted fewer hits then expected", Integer.valueOf(p9.size()), Integer.valueOf(v1_2), v0_3);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzsa.zznS() calling method android.database.sqlite.SQLiteDatabase.delete()


    public int zznS()
    {
        int v0 = 0;
        this.zzmq();
        this.zznA();
        if (this.zzadw.zzz(86400000)) {
            this.zzadw.start();
            this.zzbO("Deleting stale hits (if any)");
            String v1_1 = this.getWritableDatabase();
            String[] v6_1 = new String[1];
            v6_1[0] = Long.toString((this.zznq().currentTimeMillis() - 1.280618154e-314));
            v0 = v1_1.delete("hits2", "hit_time < ?", v6_1);
            this.zza("Deleted stale hits, count", Integer.valueOf(v0));
        }
        return v0;
    }

Method com.google.android.gms.internal.zzsa.zznR() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zznR()
    {
        this.zzmq();
        this.zznA();
        this.getWritableDatabase().delete("properties", 0, 0);
        return;
    }

Method com.google.android.gms.internal.zzsa.zznQ() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zznQ()
    {
        this.zzmq();
        this.zznA();
        this.getWritableDatabase().delete("hits2", 0, 0);
        return;
    }

Method com.google.android.gms.internal.zzsa.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zza(long p8, String p10)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p10);
        this.zznA();
        this.zzmq();
        Integer v0_2 = this.getWritableDatabase();
        String[] v3_1 = new String[2];
        v3_1[0] = String.valueOf(p8);
        v3_1[1] = p10;
        Integer v0_0 = v0_2.delete("properties", "app_uid=? AND cid<>?", v3_1);
        if (v0_0 > null) {
            this.zza("Deleted property records", Integer.valueOf(v0_0));
        }
        return;
    }

Method com.google.android.gms.internal.zzatg.zzls() calling method android.database.sqlite.SQLiteDatabase.delete()


    public java.util.List zzls(int p14)
    {
        java.util.ArrayList v0_12;
        this.zzmq();
        this.zzJe();
        if (android.os.Build$VERSION.SDK_INT >= 11) {
            if (!this.zzbrE) {
                java.util.ArrayList v10_1 = new java.util.ArrayList();
                if (this.zzKP()) {
                    int v9 = 5;
                    int v11 = 0;
                    while (v11 < 5) {
                        String v1_18 = 0;
                        try {
                            java.util.ArrayList v0_13 = this.getWritableDatabase();
                            try {
                                if (v0_13 != null) {
                                    v0_13.beginTransaction();
                                    String v2_12 = new String[3];
                                    v2_12[0] = "rowid";
                                    v2_12[1] = "type";
                                    v2_12[2] = "entry";
                                    int v6_1 = v0_13.query("messages", v2_12, 0, 0, 0, 0, "rowid asc", Integer.toString(p14));
                                    String v2_2 = -1;
                                    while (v6_1.moveToNext()) {
                                        String v4_5 = v6_1.getLong(0);
                                        String v1_32 = v6_1.getInt(1);
                                        String v3_9 = v6_1.getBlob(2);
                                        if (v1_32 != null) {
                                            if (v1_32 != 1) {
                                                this.zzJt().zzLa().log("Unknown record type in local database");
                                            } else {
                                                android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                try {
                                                    v7_0.unmarshall(v3_9, 0, v3_9.length);
                                                    v7_0.setDataPosition(0);
                                                    String v1_4 = ((com.google.android.gms.internal.zzaub) com.google.android.gms.internal.zzaub.CREATOR.createFromParcel(v7_0));
                                                } catch (String v1) {
                                                    this.zzJt().zzLa().log("Failed to load user property from local database");
                                                    v7_0.recycle();
                                                    v1_4 = 0;
                                                    if (v1_4 != null) {
                                                        v10_1.add(v1_4);
                                                    }
                                                }
                                                v7_0.recycle();
                                            }
                                        } else {
                                            String v2_1 = android.os.Parcel.obtain();
                                            try {
                                                v2_1.unmarshall(v3_9, 0, v3_9.length);
                                                v2_1.setDataPosition(0);
                                                String v1_12 = ((com.google.android.gms.internal.zzatb) com.google.android.gms.internal.zzatb.CREATOR.createFromParcel(v2_1));
                                            } catch (String v1) {
                                                this.zzJt().zzLa().log("Failed to load event from local database");
                                                v2_1.recycle();
                                                v2_2 = v4_5;
                                            }
                                            v2_1.recycle();
                                            if (v1_12 != null) {
                                                v10_1.add(v1_12);
                                            }
                                        }
                                        v2_2 = v4_5;
                                    }
                                    v6_1.close();
                                    String[] v5_2 = new String[1];
                                    v5_2[0] = Long.toString(v2_2);
                                    if (v0_13.delete("messages", "rowid <= ?", v5_2) < v10_1.size()) {
                                        this.zzJt().zzLa().log("Fewer entries removed from local database than expected");
                                    }
                                    v0_13.setTransactionSuccessful();
                                    v0_13.endTransaction();
                                    if (v0_13 != null) {
                                        v0_13.close();
                                    }
                                    v0_12 = v10_1;
                                } else {
                                    this.zzbrE = 1;
                                    if (v0_13 != null) {
                                        v0_13.close();
                                    }
                                    v0_12 = 0;
                                }
                            } catch (String v1_21) {
                                v1_18 = v0_13;
                                java.util.ArrayList v0_9 = v1_21;
                                if (v1_18 != null) {
                                    v1_18.close();
                                }
                                throw v0_9;
                            } catch (String v1_19) {
                                v1_18 = v0_13;
                                java.util.ArrayList v0_7 = v1_19;
                                this.zzJt().zzLa().zzj("Error reading entries from local database", v0_7);
                                this.zzbrE = 1;
                                if (v1_18 == null) {
                                    java.util.ArrayList v0_5 = v9;
                                    v11++;
                                    v9 = v0_5;
                                } else {
                                    v1_18.close();
                                    v0_5 = v9;
                                }
                            } catch (String v1_17) {
                                v1_18 = v0_13;
                                java.util.ArrayList v0_3 = v1_17;
                                if (android.os.Build$VERSION.SDK_INT < 11) {
                                    if (v1_18 != null) {
                                        if (v1_18.inTransaction()) {
                                            v1_18.endTransaction();
                                        }
                                    }
                                    this.zzJt().zzLa().zzj("Error reading entries from local database", v0_3);
                                    this.zzbrE = 1;
                                    v0_5 = v9;
                                } else {
                                    if (!(v0_3 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                    } else {
                                        android.os.SystemClock.sleep(((long) v9));
                                        v0_5 = (v9 + 20);
                                    }
                                }
                                if (v1_18 == null) {
                                } else {
                                    v1_18.close();
                                }
                            }
                        } catch (java.util.ArrayList v0_9) {
                        } catch (java.util.ArrayList v0_7) {
                        } catch (java.util.ArrayList v0_3) {
                        }
                    }
                    this.zzJt().zzLc().log("Failed to read events from database in reasonable time");
                    v0_12 = 0;
                } else {
                    v0_12 = v10_1;
                }
            } else {
                v0_12 = 0;
            }
        } else {
            v0_12 = 0;
        }
        return v0_12;
    }

Method com.google.android.gms.internal.zzatg.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    private boolean zza(int p13, byte[] p14)
    {
        int v0_3;
        this.zzJe();
        this.zzmq();
        if (!this.zzbrE) {
            android.content.ContentValues v6_1 = new android.content.ContentValues();
            v6_1.put("type", Integer.valueOf(p13));
            v6_1.put("entry", p14);
            this.zzJv().zzKt();
            int v3 = 0;
            int v0_1 = 5;
            while (v3 < 5) {
                try {
                    android.database.sqlite.SQLiteDatabase v2 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzati$zza v1_1) {
                    this.zzJt().zzLa().zzj("Error writing entry to local database", v1_1);
                    this.zzbrE = 1;
                    if (v2 == null) {
                        v3++;
                    } else {
                        v2.close();
                    }
                    v2.insertOrThrow("messages", 0, v6_1);
                    v2.setTransactionSuccessful();
                    v2.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    v0_3 = 1;
                } catch (com.google.android.gms.internal.zzati$zza v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v2 != null) {
                            if (v2.inTransaction()) {
                                v2.endTransaction();
                            }
                        }
                        this.zzJt().zzLa().zzj("Error writing entry to local database", v1_20);
                        this.zzbrE = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 == null) {
                    } else {
                        v2.close();
                    }
                } catch (int v0_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    throw v0_2;
                }
                if (v2 != null) {
                    v2.beginTransaction();
                    Long v4_4 = 0;
                    com.google.android.gms.internal.zzati$zza v1_10 = v2.rawQuery("select count(1) from messages", 0);
                    if ((v1_10 != null) && (v1_10.moveToFirst())) {
                        v4_4 = v1_10.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzJt().zzLa().log("Data loss, local db full");
                        Long v4_7 = ((100000 - v4_4) + 1);
                        long v8_4 = new String[1];
                        v8_4[0] = Long.toString(v4_7);
                        long v8_5 = ((long) v2.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v8_4));
                        if (v8_5 != v4_7) {
                            this.zzJt().zzLa().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_7), Long.valueOf(v8_5), Long.valueOf((v4_7 - v8_5)));
                        }
                    }
                } else {
                    this.zzbrE = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzJt().zzLc().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method com.google.android.gms.internal.zzasu.zzfz() calling method android.database.sqlite.SQLiteDatabase.delete()


    public long zzfz(String p7)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p7);
        this.zzmq();
        this.zznA();
        try {
            long v0_3 = this.getWritableDatabase();
            com.google.android.gms.internal.zzati$zza v1_0 = String.valueOf(this.zzJv().zzfw(p7));
            String[] v4_1 = new String[2];
            v4_1[0] = p7;
            v4_1[1] = v1_0;
            long v0_1 = ((long) v0_3.delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", v4_1));
        } catch (long v0_2) {
            this.zzJt().zzLa().zze("Error deleting over the limit events. appId", com.google.android.gms.internal.zzati.zzfI(p7), v0_2);
            v0_1 = 0;
        }
        return v0_1;
    }

Method com.google.android.gms.internal.zzasu.zzfD() calling method android.database.sqlite.SQLiteDatabase.delete()


    void zzfD(String p6)
    {
        this.zznA();
        this.zzmq();
        com.google.android.gms.common.internal.zzac.zzdv(p6);
        try {
            Integer v0_0 = this.getWritableDatabase();
            com.google.android.gms.internal.zzati$zza v1_3 = new String[1];
            v1_3[0] = p6;
            Integer v0_2 = (v0_0.delete("audience_filter_values", "app_id=?", v1_3) + (((((((v0_0.delete("events", "app_id=?", v1_3) + 0) + v0_0.delete("user_attributes", "app_id=?", v1_3)) + v0_0.delete("apps", "app_id=?", v1_3)) + v0_0.delete("raw_events", "app_id=?", v1_3)) + v0_0.delete("raw_events_metadata", "app_id=?", v1_3)) + v0_0.delete("event_filters", "app_id=?", v1_3)) + v0_0.delete("property_filters", "app_id=?", v1_3)));
        } catch (Integer v0_4) {
            this.zzJt().zzLa().zze("Error deleting application data. appId, error", com.google.android.gms.internal.zzati.zzfI(p6), v0_4);
            return;
        }
        if (v0_2 <= null) {
            return;
        } else {
            this.zzJt().zzLg().zze("Deleted application data. app, records", p6, Integer.valueOf(v0_2));
            return;
        }
    }

Method com.google.android.gms.internal.zzasu.zzfB() calling method android.database.sqlite.SQLiteDatabase.delete()


    void zzfB(String p7)
    {
        this.zznA();
        this.zzmq();
        com.google.android.gms.common.internal.zzac.zzdv(p7);
        android.database.sqlite.SQLiteDatabase v0 = this.getWritableDatabase();
        String[] v3_1 = new String[1];
        v3_1[0] = p7;
        v0.delete("property_filters", "app_id=?", v3_1);
        String[] v3_0 = new String[1];
        v3_0[0] = p7;
        v0.delete("event_filters", "app_id=?", v3_0);
        return;
    }

Method com.google.android.gms.internal.zzasu.zzc() calling method android.database.sqlite.SQLiteDatabase.delete()


    boolean zzc(String p9, java.util.List p10)
    {
        String v2 = 0;
        com.google.android.gms.common.internal.zzac.zzdv(p9);
        this.zznA();
        this.zzmq();
        Object v4_1 = this.getWritableDatabase();
        try {
            int v1_9 = new String[1];
            v1_9[0] = p9;
            int v0_0 = this.zzb("select count(1) from audience_filter_values where app_id=?", v1_9);
            String v5_2 = this.zzJv().zzfs(p9);
        } catch (int v0_2) {
            this.zzJt().zzLa().zze("Database error querying filters. appId", com.google.android.gms.internal.zzati.zzfI(p9), v0_2);
            return v2;
        }
        if (v0_0 > ((long) v5_2)) {
            String[] v6_2 = new java.util.ArrayList();
            if (p10 != null) {
                int v1_2 = 0;
                while (v1_2 < p10.size()) {
                    int v0_16 = ((Integer) p10.get(v1_2));
                    if ((v0_16 == 0) || (!(v0_16 instanceof Integer))) {
                        return v2;
                    } else {
                        v6_2.add(Integer.toString(v0_16.intValue()));
                        v1_2++;
                    }
                }
            }
            int v0_6 = String.valueOf(android.text.TextUtils.join(",", v6_2));
            int v0_9 = new StringBuilder((String.valueOf(v0_6).length() + 2)).append("(").append(v0_6).append(")").toString();
            int v0_13 = new StringBuilder((String.valueOf(v0_9).length() + 140)).append("audience_id in (select audience_id from audience_filter_values where app_id=? and audience_id not in ").append(v0_9).append(" order by rowid desc limit -1 offset ?)").toString();
            String[] v6_12 = new String[2];
            v6_12[0] = p9;
            v6_12[1] = Integer.toString(v5_2);
            if (v4_1.delete("audience_filter_values", v0_13, v6_12) <= 0) {
                return v2;
            } else {
                v2 = 1;
                return v2;
            }
        } else {
            return v2;
        }
    }

Method com.google.android.gms.internal.zzasu.zzal() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zzal(long p6)
    {
        this.zzmq();
        this.zznA();
        com.google.android.gms.internal.zzati$zza v0_3 = this.getWritableDatabase();
        String v1_1 = new String[1];
        v1_1[0] = String.valueOf(p6);
        if (v0_3.delete("queue", "rowid=?", v1_1) != 1) {
            this.zzJt().zzLa().log("Deleted fewer rows from queue than expected");
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zzQ() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zzQ(String p6, String p7)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p6);
        com.google.android.gms.common.internal.zzac.zzdv(p7);
        this.zzmq();
        this.zznA();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.getWritableDatabase();
            Object v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.zzJt().zzLg().zzj("Deleted user attribute rows:", Integer.valueOf(v0_3.delete("user_attributes", "app_id=? and name=?", v3_2)));
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzJt().zzLa().zzd("Error deleting user attribute. appId", com.google.android.gms.internal.zzati.zzfI(p6), p7, v0_2);
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zzKJ() calling method android.database.sqlite.SQLiteDatabase.delete()


    void zzKJ()
    {
        this.zzmq();
        this.zznA();
        if (this.zzKP()) {
            Integer v0_3 = this.getWritableDatabase();
            com.google.android.gms.internal.zzati$zza v1_3 = new String[2];
            v1_3[0] = String.valueOf(this.zznq().currentTimeMillis());
            v1_3[1] = String.valueOf(this.zzJv().zzKn());
            Integer v0_0 = v0_3.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_3);
            if (v0_0 > null) {
                this.zzJt().zzLg().zzj("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_0));
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zzG() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void zzG(java.util.List p7)
    {
        com.google.android.gms.common.internal.zzac.zzw(p7);
        this.zzmq();
        this.zznA();
        String v2_3 = new StringBuilder("rowid in (");
        com.google.android.gms.internal.zzati$zza v1_4 = 0;
        while (v1_4 < p7.size()) {
            if (v1_4 != null) {
                v2_3.append(",");
            }
            v2_3.append(((Long) p7.get(v1_4)).longValue());
            v1_4++;
        }
        v2_3.append(")");
        Integer v0_2 = this.getWritableDatabase().delete("raw_events", v2_3.toString(), 0);
        if (v0_2 != p7.size()) {
            this.zzJt().zzLa().zze("Deleted fewer rows from raw events table than expected", Integer.valueOf(v0_2), Integer.valueOf(p7.size()));
        }
        return;
    }

Method com.google.android.gms.internal.zzasu.zzA() calling method android.database.sqlite.SQLiteDatabase.delete()


    void zzA(String p9, int p10)
    {
        this.zznA();
        this.zzmq();
        com.google.android.gms.common.internal.zzac.zzdv(p9);
        android.database.sqlite.SQLiteDatabase v0 = this.getWritableDatabase();
        String[] v3_0 = new String[2];
        v3_0[0] = p9;
        v3_0[1] = String.valueOf(p10);
        v0.delete("property_filters", "app_id=? and audience_id=?", v3_0);
        String[] v3_1 = new String[2];
        v3_1[0] = p9;
        v3_1[1] = String.valueOf(p10);
        v0.delete("event_filters", "app_id=? and audience_id=?", v3_1);
        return;
    }

Method com.j256.ormlite.android.AndroidDatabaseConnection.queryForLong() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    public long queryForLong(String p7)
    {
        try {
            android.database.sqlite.SQLiteStatement v1 = this.db.compileStatement(p7);
            String v2_5 = v1.simpleQueryForLong();
            com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: query for long simple query returned {}: {}", this, Long.valueOf(v2_5), p7);
            this.closeQuietly(v1);
            return v2_5;
        } catch (java.sql.SQLException v0_3) {
            this.closeQuietly(v1);
            throw v0_3;
        } catch (java.sql.SQLException v0_1) {
            throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("queryForLong from database failed: ").append(p7).toString(), v0_1);
        }
    }

Method com.j256.ormlite.android.AndroidDatabaseConnection.insert() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    public int insert(String p6, Object[] p7, com.j256.ormlite.field.FieldType[] p8, com.j256.ormlite.support.GeneratedKeyHolder p9)
    {
        try {
            android.database.sqlite.SQLiteStatement v1 = this.db.compileStatement(p6);
            this.bindArgs(v1, p7, p8);
            String v2_6 = v1.executeInsert();
        } catch (java.sql.SQLException v0_3) {
            this.closeQuietly(v1);
            throw v0_3;
        } catch (java.sql.SQLException v0_1) {
            throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("inserting to database failed: ").append(p6).toString(), v0_1);
        }
        if (p9 != null) {
            p9.addKey(Long.valueOf(v2_6));
        }
        com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: insert statement is compiled and executed, changed {}: {}", this, Integer.valueOf(1), p6);
        this.closeQuietly(v1);
        return 1;
    }

Method com.j256.ormlite.android.AndroidDatabaseConnection.update() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    private int update(String p5, Object[] p6, com.j256.ormlite.field.FieldType[] p7, String p8)
    {
        try {
            com.j256.ormlite.logger.Logger v1_1 = this.db.compileStatement(p5);
            try {
                this.bindArgs(v1_1, p6, p7);
                v1_1.execute();
                this.closeQuietly(v1_1);
                try {
                    String v2_6 = this.db.compileStatement("SELECT CHANGES()");
                    int v0_6 = ((int) v2_6.simpleQueryForLong());
                    this.closeQuietly(v2_6);
                } catch (int v0_7) {
                    this.closeQuietly(v2_6);
                    throw v0_7;
                } catch (int v0) {
                    v0_6 = 1;
                    this.closeQuietly(v2_6);
                }
                com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{} statement is compiled and executed, changed {}: {}", p8, Integer.valueOf(v0_6), p5);
                return v0_6;
            } catch (int v0_1) {
                throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("updating database failed: ").append(p5).toString(), v0_1);
            }
        } catch (int v0_3) {
            v1_1 = 0;
            this.closeQuietly(v1_1);
            throw v0_3;
        } catch (int v0_1) {
            v1_1 = 0;
        } catch (int v0_3) {
        }
    }

Method com.j256.ormlite.android.AndroidCompiledStatement.execSql() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    static int execSql(android.database.sqlite.SQLiteDatabase p5, String p6, String p7, Object[] p8)
    {
        try {
            p5.execSQL(p7, p8);
            try {
                com.j256.ormlite.logger.Logger v1_4 = p5.compileStatement("SELECT CHANGES()");
                try {
                    android.database.SQLException v0_4 = ((int) v1_4.simpleQueryForLong());
                } catch (android.database.SQLException v0_3) {
                    if (v1_4 != null) {
                        v1_4.close();
                    }
                    throw v0_3;
                } catch (android.database.SQLException v0) {
                    v0_4 = 1;
                    if (v1_4 == null) {
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                        return v0_4;
                    } else {
                        v1_4.close();
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                        return v0_4;
                    }
                }
                if (v1_4 == null) {
                    com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                    return v0_4;
                } else {
                    v1_4.close();
                    com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p6, Integer.valueOf(v0_4), p7);
                    return v0_4;
                }
            } catch (com.j256.ormlite.logger.Logger v1_5) {
                v1_4 = 0;
                v0_3 = v1_5;
            } catch (com.j256.ormlite.logger.Logger v1) {
                v1_4 = 0;
            }
        } catch (android.database.SQLException v0_2) {
            throw com.j256.ormlite.misc.SqlExceptionUtil.create(new StringBuilder().append("Problems executing ").append(p6).append(" Android statement: ").append(p7).toString(), v0_2);
        }
    }

Method com.facebook.stetho.inspector.database.SqliteDatabaseDriver.executeUpdateDelete() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    private Object executeUpdateDelete(android.database.sqlite.SQLiteDatabase p2, String p3, com.facebook.stetho.inspector.protocol.module.Database$DatabaseDriver$ExecuteResultHandler p4)
    {
        return p4.handleUpdateDelete(p2.compileStatement(p3).executeUpdateDelete());
    }

Method com.facebook.stetho.inspector.database.SqliteDatabaseDriver.executeInsert() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    private Object executeInsert(android.database.sqlite.SQLiteDatabase p3, String p4, com.facebook.stetho.inspector.protocol.module.Database$DatabaseDriver$ExecuteResultHandler p5)
    {
        return p5.handleInsert(p3.compileStatement(p4).executeInsert());
    }

Method com.google.android.gms.tagmanager.zzx.zzmQ() calling method android.database.sqlite.SQLiteDatabase.query()


    private java.util.List zzmQ(int p14)
    {
        java.util.ArrayList v0_12;
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        if (p14 > 0) {
            java.util.ArrayList v0_9 = this.zzhh("Error opening database for peekEntryIds.");
            if (v0_9 != null) {
                try {
                    long v2_0 = new String[1];
                    v2_0[0] = "ID";
                    String v8_1 = new Object[1];
                    v8_1[0] = "ID";
                    int v1_0 = v0_9.query("datalayer", v2_0, 0, 0, 0, 0, String.format("%s ASC", v8_1), Integer.toString(p14));
                    try {
                        if (v1_0.moveToFirst()) {
                            do {
                                v9_1.add(String.valueOf(v1_0.getLong(0)));
                            } while(v1_0.moveToNext());
                        }
                    } catch (java.util.ArrayList v0_0) {
                        java.util.ArrayList v0_5 = String.valueOf(v0_0.getMessage());
                        if (v0_5.length() == 0) {
                            java.util.ArrayList v0_7 = new String("Error in peekEntries fetching entryIds: ");
                        } else {
                            v0_7 = "Error in peekEntries fetching entryIds: ".concat(v0_5);
                        }
                        com.google.android.gms.tagmanager.zzbo.zzbe(v0_7);
                        if (v1_0 == 0) {
                            v0_12 = v9_1;
                            return v0_12;
                        } else {
                            v1_0.close();
                        }
                    }
                    if (v1_0 == 0) {
                    } else {
                        v1_0.close();
                    }
                } catch (java.util.ArrayList v0_1) {
                    v1_0 = 0;
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    throw v0_1;
                } catch (java.util.ArrayList v0_0) {
                    v1_0 = 0;
                } catch (java.util.ArrayList v0_1) {
                }
            } else {
                v0_12 = v9_1;
            }
        } else {
            com.google.android.gms.tagmanager.zzbo.zzbe("Invalid maxEntries specified. Skipping.");
            v0_12 = v9_1;
        }
        return v0_12;
    }

Method com.google.android.gms.tagmanager.zzx.zzOW() calling method android.database.sqlite.SQLiteDatabase.query()


    private java.util.List zzOW()
    {
        java.util.ArrayList v0_3;
        java.util.ArrayList v0_6 = this.zzhh("Error opening database for loadSerialized.");
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        if (v0_6 != null) {
            String v2_0 = new String[2];
            v2_0[0] = "key";
            v2_0[1] = "value";
            android.database.Cursor v1_3 = v0_6.query("datalayer", v2_0, 0, 0, 0, 0, "ID", 0);
            try {
                while (v1_3.moveToNext()) {
                    v9_1.add(new com.google.android.gms.tagmanager.zzx$zzb(v1_3.getString(0), v1_3.getBlob(1)));
                }
            } catch (java.util.ArrayList v0_1) {
                v1_3.close();
                throw v0_1;
            }
            v1_3.close();
            v0_3 = v9_1;
        } else {
            v0_3 = v9_1;
        }
        return v0_3;
    }

Method com.google.android.gms.tagmanager.zzx$zza.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private boolean zza(String p11, android.database.sqlite.SQLiteDatabase p12)
    {
        String v9 = 0;
        try {
            String v2_1 = new String[1];
            v2_1[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p11;
            String v1_0 = p12.query("SQLITE_MASTER", v2_1, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_3) {
                v9 = v1_0;
                if (v9 != null) {
                    v9.close();
                }
                throw v0_3;
            } catch (int v0) {
                int v0_2 = v1_0;
                try {
                    String v1_2 = String.valueOf(p11);
                } catch (String v1_5) {
                    v9 = v0_2;
                    v0_3 = v1_5;
                }
                if (v1_2.length() == 0) {
                    String v1_4 = new String("Error querying for table ");
                } else {
                    v1_4 = "Error querying for table ".concat(v1_2);
                }
                com.google.android.gms.tagmanager.zzbo.zzbe(v1_4);
                if (v0_2 != 0) {
                    v0_2.close();
                }
                v0_4 = 0;
                return v0_4;
            }
            if (v1_0 == null) {
                return v0_4;
            } else {
                v1_0.close();
                return v0_4;
            }
        } catch (int v0_3) {
        } catch (int v0) {
            v0_2 = 0;
        }
    }

Method com.google.android.gms.tagmanager.zzcg.zzmW() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzmW(int p17)
    {
        java.util.ArrayList v2_20;
        int v11_1 = new java.util.ArrayList();
        java.util.ArrayList v2_26 = this.zzhh("Error opening database for peekHits");
        if (v2_26 != null) {
            android.database.Cursor v12_2 = 0;
            try {
                int v4_0 = new String[3];
                v4_0[0] = "hit_id";
                v4_0[1] = "hit_time";
                v4_0[2] = "hit_first_send_time";
                String v10_4 = new Object[1];
                v10_4[0] = "hit_id";
                String v13_0 = v2_26.query("gtm_hits", v4_0, 0, 0, 0, 0, String.format("%s ASC", v10_4), Integer.toString(p17));
                try {
                    android.database.Cursor v12_1 = new java.util.ArrayList();
                    try {
                        if (v13_0.moveToFirst()) {
                            do {
                                v12_1.add(new com.google.android.gms.tagmanager.zzas(v13_0.getLong(0), v13_0.getLong(1), v13_0.getLong(2)));
                            } while(v13_0.moveToNext());
                        }
                    } catch (java.util.ArrayList v2_27) {
                        java.util.ArrayList v3_4 = v2_27;
                        int v4_5 = v13_0;
                        v2_20 = v12_1;
                        try {
                            java.util.ArrayList v3_7 = String.valueOf(v3_4.getMessage());
                        } catch (java.util.ArrayList v2_24) {
                            v12_2 = v4_5;
                            if (v12_2 != null) {
                                v12_2.close();
                            }
                            throw v2_24;
                        }
                        if (v3_7.length() == 0) {
                            java.util.ArrayList v3_9 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v3_9 = "Error in peekHits fetching hitIds: ".concat(v3_7);
                        }
                        com.google.android.gms.tagmanager.zzbo.zzbe(v3_9);
                        if (v4_5 == 0) {
                            return v2_20;
                        } else {
                            v4_5.close();
                            return v2_20;
                        }
                    }
                    if (v13_0 != null) {
                        v13_0.close();
                    }
                    try {
                        int v4_10 = new String[2];
                        v4_10[0] = "hit_id";
                        v4_10[1] = "hit_url";
                        String v10_1 = new Object[1];
                        v10_1[0] = "hit_id";
                        java.util.ArrayList v3_0 = v2_26.query("gtm_hits", v4_10, 0, 0, 0, 0, String.format("%s ASC", v10_1), Integer.toString(p17));
                        try {
                            if (v3_0.moveToFirst()) {
                                int v4_1 = 0;
                                while(true) {
                                    if (((android.database.sqlite.SQLiteCursor) v3_0).getWindow().getNumRows() <= 0) {
                                        boolean v6_3 = new Object[1];
                                        v6_3[0] = Long.valueOf(((com.google.android.gms.tagmanager.zzas) v12_1.get(v4_1)).zzPi());
                                        com.google.android.gms.tagmanager.zzbo.zzbe(String.format("HitString for hitId %d too large.  Hit will be deleted.", v6_3));
                                    } else {
                                        ((com.google.android.gms.tagmanager.zzas) v12_1.get(v4_1)).zzhl(v3_0.getString(1));
                                    }
                                    if (!v3_0.moveToNext()) {
                                        break;
                                    }
                                    v4_1++;
                                }
                            }
                        } catch (java.util.ArrayList v2_19) {
                            v13_0 = v3_0;
                            if (v13_0 != null) {
                                v13_0.close();
                            }
                            throw v2_19;
                        } catch (java.util.ArrayList v2_0) {
                            v13_0 = v3_0;
                            java.util.ArrayList v2_13 = String.valueOf(v2_0.getMessage());
                            if (v2_13.length() == 0) {
                                java.util.ArrayList v2_15 = new String("Error in peekHits fetching hit url: ");
                            } else {
                                v2_15 = "Error in peekHits fetching hit url: ".concat(v2_13);
                            }
                            com.google.android.gms.tagmanager.zzbo.zzbe(v2_15);
                            java.util.ArrayList v3_3 = new java.util.ArrayList();
                            int v4_3 = 0;
                            String v5_8 = v12_1.iterator();
                        }
                        if (v3_0 != null) {
                            v3_0.close();
                        }
                        v2_20 = v12_1;
                    } catch (java.util.ArrayList v2_19) {
                    } catch (java.util.ArrayList v2_0) {
                    }
                } catch (java.util.ArrayList v2_24) {
                    v12_2 = v13_0;
                } catch (java.util.ArrayList v2_25) {
                    v3_4 = v2_25;
                    v4_5 = v13_0;
                    v2_20 = v11_1;
                }
            } catch (java.util.ArrayList v2_24) {
            } catch (java.util.ArrayList v2_23) {
                v3_4 = v2_23;
                v4_5 = 0;
                v2_20 = v11_1;
            }
        } else {
            v2_20 = v11_1;
        }
        return v2_20;
    }

Method com.google.android.gms.tagmanager.zzcg.zzmV() calling method android.database.sqlite.SQLiteDatabase.query()


    java.util.List zzmV(int p14)
    {
        java.util.ArrayList v0_12;
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        if (p14 > 0) {
            java.util.ArrayList v0_9 = this.zzhh("Error opening database for peekHitIds.");
            if (v0_9 != null) {
                try {
                    long v2_0 = new String[1];
                    v2_0[0] = "hit_id";
                    String v8_1 = new Object[1];
                    v8_1[0] = "hit_id";
                    int v1_0 = v0_9.query("gtm_hits", v2_0, 0, 0, 0, 0, String.format("%s ASC", v8_1), Integer.toString(p14));
                    try {
                        if (v1_0.moveToFirst()) {
                            do {
                                v9_1.add(String.valueOf(v1_0.getLong(0)));
                            } while(v1_0.moveToNext());
                        }
                    } catch (java.util.ArrayList v0_0) {
                        java.util.ArrayList v0_5 = String.valueOf(v0_0.getMessage());
                        if (v0_5.length() == 0) {
                            java.util.ArrayList v0_7 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v0_7 = "Error in peekHits fetching hitIds: ".concat(v0_5);
                        }
                        com.google.android.gms.tagmanager.zzbo.zzbe(v0_7);
                        if (v1_0 == 0) {
                            v0_12 = v9_1;
                            return v0_12;
                        } else {
                            v1_0.close();
                        }
                    }
                    if (v1_0 == 0) {
                    } else {
                        v1_0.close();
                    }
                } catch (java.util.ArrayList v0_1) {
                    v1_0 = 0;
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    throw v0_1;
                } catch (java.util.ArrayList v0_0) {
                    v1_0 = 0;
                } catch (java.util.ArrayList v0_1) {
                }
            } else {
                v0_12 = v9_1;
            }
        } else {
            com.google.android.gms.tagmanager.zzbo.zzbe("Invalid maxHits specified. Skipping");
            v0_12 = v9_1;
        }
        return v0_12;
    }

Method com.google.android.gms.tagmanager.zzcg.zzPx() calling method android.database.sqlite.SQLiteDatabase.query()


    int zzPx()
    {
        String v8 = 0;
        String v9 = 0;
        String v0_4 = this.zzhh("Error opening database for getNumStoredHits.");
        if (v0_4 != null) {
            try {
                String[] v2_1 = new String[2];
                v2_1[0] = "hit_id";
                v2_1[1] = "hit_first_send_time";
                Throwable v1_0 = v0_4.query("gtm_hits", v2_1, "hit_first_send_time=0", 0, 0, 0, 0);
                try {
                    String v0_3 = v1_0.getCount();
                } catch (String v0_2) {
                    v9 = v1_0;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v0_2;
                } catch (String v0) {
                    String v0_1 = v1_0;
                    try {
                        com.google.android.gms.tagmanager.zzbo.zzbe("Error getting num untried hits");
                    } catch (Throwable v1_2) {
                        v9 = v0_1;
                        v0_2 = v1_2;
                    }
                    if (v0_1 == null) {
                        v0_3 = 0;
                        v8 = v0_3;
                    } else {
                        v0_1.close();
                        v0_3 = 0;
                    }
                }
                if (v1_0 == null) {
                } else {
                    v1_0.close();
                }
            } catch (String v0_2) {
            } catch (String v0) {
                v0_1 = 0;
            }
        }
        return v8;
    }

Method com.google.android.gms.tagmanager.zzcg$zzb.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private boolean zza(String p11, android.database.sqlite.SQLiteDatabase p12)
    {
        String v9 = 0;
        try {
            String v2_1 = new String[1];
            v2_1[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p11;
            String v1_0 = p12.query("SQLITE_MASTER", v2_1, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_3) {
                v9 = v1_0;
                if (v9 != null) {
                    v9.close();
                }
                throw v0_3;
            } catch (int v0) {
                int v0_2 = v1_0;
                try {
                    String v1_2 = String.valueOf(p11);
                } catch (String v1_5) {
                    v9 = v0_2;
                    v0_3 = v1_5;
                }
                if (v1_2.length() == 0) {
                    String v1_4 = new String("Error querying for table ");
                } else {
                    v1_4 = "Error querying for table ".concat(v1_2);
                }
                com.google.android.gms.tagmanager.zzbo.zzbe(v1_4);
                if (v0_2 != 0) {
                    v0_2.close();
                }
                v0_4 = 0;
                return v0_4;
            }
            if (v1_0 == null) {
                return v0_4;
            } else {
                v1_0.close();
                return v0_4;
            }
        } catch (int v0_3) {
        } catch (int v0) {
            v0_2 = 0;
        }
    }

Method com.google.android.gms.internal.zzsa.zzv() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzv(long p14)
    {
        this.zznA();
        this.zzmq();
        boolean v0_0 = this.getWritableDatabase();
        try {
            String v2_0 = new String[5];
            v2_0[0] = "cid";
            v2_0[1] = "tid";
            v2_0[2] = "adid";
            v2_0[3] = "hits_count";
            v2_0[4] = "params";
            int v10 = this.zzns().zzoU();
            java.util.Map v8_0 = String.valueOf(v10);
            String v4_0 = new String[1];
            v4_0[0] = String.valueOf(p14);
            android.database.Cursor v9 = v0_0.query("properties", v2_0, "app_uid=?", v4_0, 0, 0, 0, v8_0);
            try {
                java.util.ArrayList v11_1 = new java.util.ArrayList();
            } catch (boolean v0_1) {
                long v1_8 = v9;
                try {
                    this.zze("Error loading hits from the database", v0_1);
                    throw v0_1;
                } catch (boolean v0_19) {
                    v9 = v1_8;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v0_19;
                }
            }
            if (v9.moveToFirst()) {
                do {
                    int v5_2;
                    String v3_5 = v9.getString(0);
                    String v4_1 = v9.getString(1);
                    if (v9.getInt(2) == 0) {
                        v5_2 = 0;
                    } else {
                        v5_2 = 1;
                    }
                    long v6_1 = ((long) v9.getInt(3));
                    java.util.Map vtmp14 = this.zzbU(v9.getString(4));
                    if ((!android.text.TextUtils.isEmpty(v3_5)) && (!android.text.TextUtils.isEmpty(v4_1))) {
                        v11_1.add(new com.google.android.gms.internal.zzry(p14, v3_5, v4_1, v5_2, v6_1, vtmp14));
                    } else {
                        this.zzc("Read property with empty client id or tracker id", v3_5, v4_1);
                    }
                } while(v9.moveToNext());
            }
            if (v11_1.size() >= v10) {
                this.zzbR("Sending hits to too many properties. Campaign report might be incorrect");
            }
            if (v9 != null) {
                v9.close();
            }
            return v11_1;
        } catch (boolean v0_19) {
        } catch (boolean v0_1) {
            v1_8 = v9;
        }
    }

Method com.google.android.gms.internal.zzsa.zzt() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzt(long p14)
    {
        Throwable v0_0 = 1;
        if (p14 < 0) {
            v0_0 = 0;
        }
        com.google.android.gms.common.internal.zzac.zzas(v0_0);
        this.zzmq();
        this.zznA();
        Throwable v0_1 = this.getWritableDatabase();
        try {
            java.util.Map v2_1 = new String[5];
            v2_1[0] = "hit_id";
            v2_1[1] = "hit_time";
            v2_1[2] = "hit_string";
            v2_1[3] = "hit_url";
            v2_1[4] = "hit_app_id";
            int v8_1 = new Object[1];
            v8_1[0] = "hit_id";
            com.google.android.gms.internal.zzsa v9 = v0_1.query("hits2", v2_1, 0, 0, 0, 0, String.format("%s ASC", v8_1), Long.toString(p14));
            try {
                java.util.ArrayList v10_2 = new java.util.ArrayList();
            } catch (Throwable v0_2) {
                com.google.android.gms.internal.zzsa v1_2 = v9;
                try {
                    this.zze("Error loading hits from the database", v0_2);
                    throw v0_2;
                } catch (Throwable v0_4) {
                    v9 = v1_2;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v0_4;
                }
            }
            if (v9.moveToFirst()) {
                do {
                    v10_2.add(new com.google.android.gms.internal.zzst(this, this.zzbT(v9.getString(2)), v9.getLong(1), com.google.android.gms.internal.zztg.zzci(v9.getString(3)), v9.getLong(0), v9.getInt(4)));
                } while(v9.moveToNext());
            }
            if (v9 != null) {
                v9.close();
            }
            return v10_2;
        } catch (Throwable v0_4) {
        } catch (Throwable v0_2) {
            v1_2 = v9;
        }
    }

Method com.google.android.gms.internal.zzsa.zzs() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzs(long p14)
    {
        java.util.ArrayList v0_8;
        int v10 = 0;
        this.zzmq();
        this.zznA();
        if (p14 > 0) {
            java.util.ArrayList v0_9 = this.getWritableDatabase();
            java.util.ArrayList v9_1 = new java.util.ArrayList();
            try {
                long v2_1 = new String[1];
                v2_1[0] = "hit_id";
                String v8_1 = new Object[1];
                v8_1[0] = "hit_id";
                int v1_1 = v0_9.query("hits2", v2_1, 0, 0, 0, 0, String.format("%s ASC", v8_1), Long.toString(p14));
                try {
                    if (v1_1.moveToFirst()) {
                        do {
                            v9_1.add(Long.valueOf(v1_1.getLong(0)));
                        } while(v1_1.moveToNext());
                    }
                } catch (java.util.ArrayList v0_1) {
                    this.zzd("Error selecting hit ids", v0_1);
                    if (v1_1 == 0) {
                        v0_8 = v9_1;
                        return v0_8;
                    } else {
                        v1_1.close();
                    }
                }
                if (v1_1 == 0) {
                } else {
                    v1_1.close();
                }
            } catch (java.util.ArrayList v0_2) {
                if (v10 != 0) {
                    v10.close();
                }
                throw v0_2;
            } catch (java.util.ArrayList v0_1) {
                v1_1 = 0;
            } catch (java.util.ArrayList v0_2) {
                v10 = v1_1;
            }
        } else {
            v0_8 = java.util.Collections.emptyList();
        }
        return v0_8;
    }

Method com.google.android.gms.internal.zzsa$zza.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private boolean zza(android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        try {
            com.google.android.gms.internal.zzsa v2_1 = new String[1];
            v2_1[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p12;
            int v1_0 = p11.query("SQLITE_MASTER", v2_1, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_2) {
                this.zzady.zzc("Error querying for table", p12, v0_2);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_4 = 0;
                return v0_4;
            }
            if (v1_0 == 0) {
                return v0_4;
            } else {
                v1_0.close();
                return v0_4;
            }
        } catch (int v0_3) {
            if (v9 != 0) {
                v9.close();
            }
            throw v0_3;
        } catch (int v0_2) {
            v1_0 = 0;
        } catch (int v0_3) {
            v9 = v1_0;
        }
    }

Method com.google.android.gms.internal.zzatg.zzls() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzls(int p14)
    {
        java.util.ArrayList v0_12;
        this.zzmq();
        this.zzJe();
        if (android.os.Build$VERSION.SDK_INT >= 11) {
            if (!this.zzbrE) {
                java.util.ArrayList v10_1 = new java.util.ArrayList();
                if (this.zzKP()) {
                    int v9 = 5;
                    int v11 = 0;
                    while (v11 < 5) {
                        String v1_18 = 0;
                        try {
                            java.util.ArrayList v0_13 = this.getWritableDatabase();
                            try {
                                if (v0_13 != null) {
                                    v0_13.beginTransaction();
                                    String v2_12 = new String[3];
                                    v2_12[0] = "rowid";
                                    v2_12[1] = "type";
                                    v2_12[2] = "entry";
                                    int v6_1 = v0_13.query("messages", v2_12, 0, 0, 0, 0, "rowid asc", Integer.toString(p14));
                                    String v2_2 = -1;
                                    while (v6_1.moveToNext()) {
                                        String v4_5 = v6_1.getLong(0);
                                        String v1_32 = v6_1.getInt(1);
                                        String v3_9 = v6_1.getBlob(2);
                                        if (v1_32 != null) {
                                            if (v1_32 != 1) {
                                                this.zzJt().zzLa().log("Unknown record type in local database");
                                            } else {
                                                android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                try {
                                                    v7_0.unmarshall(v3_9, 0, v3_9.length);
                                                    v7_0.setDataPosition(0);
                                                    String v1_4 = ((com.google.android.gms.internal.zzaub) com.google.android.gms.internal.zzaub.CREATOR.createFromParcel(v7_0));
                                                } catch (String v1) {
                                                    this.zzJt().zzLa().log("Failed to load user property from local database");
                                                    v7_0.recycle();
                                                    v1_4 = 0;
                                                    if (v1_4 != null) {
                                                        v10_1.add(v1_4);
                                                    }
                                                }
                                                v7_0.recycle();
                                            }
                                        } else {
                                            String v2_1 = android.os.Parcel.obtain();
                                            try {
                                                v2_1.unmarshall(v3_9, 0, v3_9.length);
                                                v2_1.setDataPosition(0);
                                                String v1_12 = ((com.google.android.gms.internal.zzatb) com.google.android.gms.internal.zzatb.CREATOR.createFromParcel(v2_1));
                                            } catch (String v1) {
                                                this.zzJt().zzLa().log("Failed to load event from local database");
                                                v2_1.recycle();
                                                v2_2 = v4_5;
                                            }
                                            v2_1.recycle();
                                            if (v1_12 != null) {
                                                v10_1.add(v1_12);
                                            }
                                        }
                                        v2_2 = v4_5;
                                    }
                                    v6_1.close();
                                    String[] v5_2 = new String[1];
                                    v5_2[0] = Long.toString(v2_2);
                                    if (v0_13.delete("messages", "rowid <= ?", v5_2) < v10_1.size()) {
                                        this.zzJt().zzLa().log("Fewer entries removed from local database than expected");
                                    }
                                    v0_13.setTransactionSuccessful();
                                    v0_13.endTransaction();
                                    if (v0_13 != null) {
                                        v0_13.close();
                                    }
                                    v0_12 = v10_1;
                                } else {
                                    this.zzbrE = 1;
                                    if (v0_13 != null) {
                                        v0_13.close();
                                    }
                                    v0_12 = 0;
                                }
                            } catch (String v1_21) {
                                v1_18 = v0_13;
                                java.util.ArrayList v0_9 = v1_21;
                                if (v1_18 != null) {
                                    v1_18.close();
                                }
                                throw v0_9;
                            } catch (String v1_19) {
                                v1_18 = v0_13;
                                java.util.ArrayList v0_7 = v1_19;
                                this.zzJt().zzLa().zzj("Error reading entries from local database", v0_7);
                                this.zzbrE = 1;
                                if (v1_18 == null) {
                                    java.util.ArrayList v0_5 = v9;
                                    v11++;
                                    v9 = v0_5;
                                } else {
                                    v1_18.close();
                                    v0_5 = v9;
                                }
                            } catch (String v1_17) {
                                v1_18 = v0_13;
                                java.util.ArrayList v0_3 = v1_17;
                                if (android.os.Build$VERSION.SDK_INT < 11) {
                                    if (v1_18 != null) {
                                        if (v1_18.inTransaction()) {
                                            v1_18.endTransaction();
                                        }
                                    }
                                    this.zzJt().zzLa().zzj("Error reading entries from local database", v0_3);
                                    this.zzbrE = 1;
                                    v0_5 = v9;
                                } else {
                                    if (!(v0_3 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                    } else {
                                        android.os.SystemClock.sleep(((long) v9));
                                        v0_5 = (v9 + 20);
                                    }
                                }
                                if (v1_18 == null) {
                                } else {
                                    v1_18.close();
                                }
                            }
                        } catch (java.util.ArrayList v0_9) {
                        } catch (java.util.ArrayList v0_7) {
                        } catch (java.util.ArrayList v0_3) {
                        }
                    }
                    this.zzJt().zzLc().log("Failed to read events from database in reasonable time");
                    v0_12 = 0;
                } else {
                    v0_12 = v10_1;
                }
            } else {
                v0_12 = 0;
            }
        } else {
            v0_12 = 0;
        }
        return v0_12;
    }

Method com.google.android.gms.internal.zzasu.zzn() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzn(String p12, int p13, int p14)
    {
        Throwable v0_6;
        int v1_0 = 1;
        this.zzmq();
        this.zznA();
        if (p13 <= 0) {
            v0_6 = 0;
        } else {
            v0_6 = 1;
        }
        com.google.android.gms.common.internal.zzac.zzas(v0_6);
        if (p14 <= 0) {
            v1_0 = 0;
        }
        com.google.android.gms.common.internal.zzac.zzas(v1_0);
        com.google.android.gms.common.internal.zzac.zzdv(p12);
        try {
            Throwable v0_2 = this.getWritableDatabase();
            com.google.android.gms.internal.zzati$zza v2_4 = new String[2];
            v2_4[0] = "rowid";
            v2_4[1] = "data";
            com.google.android.gms.internal.zzati$zza v4_4 = new String[1];
            v4_4[0] = p12;
            com.google.android.gms.internal.zzati$zza v2_2 = v0_2.query("queue", v2_4, "app_id=?", v4_4, 0, 0, "rowid", String.valueOf(p13));
            try {
                Throwable v0_0;
                if (v2_2.moveToFirst()) {
                    v0_0 = new java.util.ArrayList();
                    int v3_4 = 0;
                    while(true) {
                        com.google.android.gms.internal.zzati$zza v4_5 = v2_2.getLong(0);
                        int v1_6 = this.zzJp().zzx(v2_2.getBlob(1));
                        if ((!v0_0.isEmpty()) && ((v1_6.length + v3_4) > p14)) {
                            break;
                        }
                        Object v6_6 = com.google.android.gms.internal.zzbul.zzad(v1_6);
                        com.google.android.gms.internal.zzauh$zze v7_2 = new com.google.android.gms.internal.zzauh$zze();
                        try {
                            v7_2.zzb(v6_6);
                        } catch (int v1_9) {
                            this.zzJt().zzLa().zze("Failed to merge queued bundle. appId", com.google.android.gms.internal.zzati.zzfI(p12), v1_9);
                            int v1_8 = v3_4;
                        }
                        v1_8 = (v1_6.length + v3_4);
                        v0_0.add(android.util.Pair.create(v7_2, Long.valueOf(v4_5)));
                        if ((!v2_2.moveToNext()) || (v1_8 > p14)) {
                            break;
                        }
                        v3_4 = v1_8;
                    }
                    if (v2_2 == null) {
                        return v0_0;
                    } else {
                        v2_2.close();
                        return v0_0;
                    }
                } else {
                    v0_0 = java.util.Collections.emptyList();
                    if (v2_2 == null) {
                        return v0_0;
                    } else {
                        v2_2.close();
                        return v0_0;
                    }
                }
            } catch (Throwable v0_1) {
                if (v2_2 != null) {
                    v2_2.close();
                }
                throw v0_1;
            } catch (Throwable v0_3) {
                int v1_1 = v2_2;
                try {
                    this.zzJt().zzLa().zze("Error querying bundles. appId", com.google.android.gms.internal.zzati.zzfI(p12), v0_3);
                    v0_0 = java.util.Collections.emptyList();
                } catch (Throwable v0_1) {
                    v2_2 = v1_1;
                }
                if (v1_1 == 0) {
                    return v0_0;
                } else {
                    v1_1.close();
                    return v0_0;
                }
            }
        } catch (Throwable v0_1) {
            v2_2 = 0;
        } catch (Throwable v0_3) {
            v1_1 = 0;
        }
    }

Method com.google.android.gms.internal.zzasu.zzfy() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.google.android.gms.internal.zzasp zzfy(String p12)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p12);
        this.zzmq();
        this.zznA();
        try {
            int v0_3 = this.getWritableDatabase();
            com.google.android.gms.internal.zzati$zza v2_0 = new String[22];
            v2_0[0] = "app_instance_id";
            v2_0[1] = "gmp_app_id";
            v2_0[2] = "resettable_device_id_hash";
            v2_0[3] = "last_bundle_index";
            v2_0[4] = "last_bundle_start_timestamp";
            v2_0[5] = "last_bundle_end_timestamp";
            v2_0[6] = "app_version";
            v2_0[7] = "app_store";
            v2_0[8] = "gmp_version";
            v2_0[9] = "dev_cert_hash";
            v2_0[10] = "measurement_enabled";
            v2_0[11] = "day";
            v2_0[12] = "daily_public_events_count";
            v2_0[13] = "daily_events_count";
            v2_0[14] = "daily_conversions_count";
            v2_0[15] = "config_fetched_time";
            v2_0[16] = "failed_config_fetch_time";
            v2_0[17] = "app_version_int";
            v2_0[18] = "firebase_instance_id";
            v2_0[19] = "daily_error_events_count";
            v2_0[20] = "daily_realtime_events_count";
            v2_0[21] = "health_monitor_sample";
            Object v4_25 = new String[1];
            v4_25[0] = p12;
            int v1_1 = v0_3.query("apps", v2_0, "app_id=?", v4_25, 0, 0, 0);
            try {
                int v0_1;
                if (v1_1.moveToFirst()) {
                    com.google.android.gms.internal.zzati$zza v2_22;
                    v0_1 = new com.google.android.gms.internal.zzasp(this.zzbpw, p12);
                    v0_1.zzfh(v1_1.getString(0));
                    v0_1.zzfi(v1_1.getString(1));
                    v0_1.zzfj(v1_1.getString(2));
                    v0_1.zzac(v1_1.getLong(3));
                    v0_1.zzX(v1_1.getLong(4));
                    v0_1.zzY(v1_1.getLong(5));
                    v0_1.setAppVersion(v1_1.getString(6));
                    v0_1.zzfl(v1_1.getString(7));
                    v0_1.zzaa(v1_1.getLong(8));
                    v0_1.zzab(v1_1.getLong(9));
                    if (!v1_1.isNull(10)) {
                        v2_22 = v1_1.getInt(10);
                    } else {
                        v2_22 = 1;
                    }
                    com.google.android.gms.internal.zzati$zza v2_23;
                    if (v2_22 == null) {
                        v2_23 = 0;
                    } else {
                        v2_23 = 1;
                    }
                    com.google.android.gms.internal.zzati$zza v2_40;
                    v0_1.setMeasurementEnabled(v2_23);
                    v0_1.zzaf(v1_1.getLong(11));
                    v0_1.zzag(v1_1.getLong(12));
                    v0_1.zzah(v1_1.getLong(13));
                    v0_1.zzai(v1_1.getLong(14));
                    v0_1.zzad(v1_1.getLong(15));
                    v0_1.zzae(v1_1.getLong(16));
                    if (!v1_1.isNull(17)) {
                        v2_40 = ((long) v1_1.getInt(17));
                    } else {
                        v2_40 = -2147483648;
                    }
                    v0_1.zzZ(v2_40);
                    v0_1.zzfk(v1_1.getString(18));
                    v0_1.zzak(v1_1.getLong(19));
                    v0_1.zzaj(v1_1.getLong(20));
                    v0_1.zzfm(v1_1.getString(21));
                    v0_1.zzJw();
                    if (v1_1.moveToNext()) {
                        this.zzJt().zzLa().zzj("Got multiple records for app, expected one. appId", com.google.android.gms.internal.zzati.zzfI(p12));
                    }
                    if (v1_1 == 0) {
                        return v0_1;
                    } else {
                        v1_1.close();
                        return v0_1;
                    }
                } else {
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_1 = 0;
                    return v0_1;
                }
            } catch (int v0_0) {
                this.zzJt().zzLa().zze("Error querying app. appId", com.google.android.gms.internal.zzati.zzfI(p12), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_1 = 0;
                return v0_1;
            }
        } catch (int v0_2) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_2;
        } catch (int v0_0) {
            v1_1 = 0;
        } catch (int v0_2) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzfx() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List zzfx(String p12)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzac.zzdv(p12);
        this.zzmq();
        this.zznA();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            java.util.ArrayList v0_8 = this.getWritableDatabase();
            String v2_0 = new String[3];
            v2_0[0] = "name";
            v2_0[1] = "set_timestamp";
            v2_0[2] = "value";
            long v4_4 = new String[1];
            v4_4[0] = p12;
            android.database.Cursor v7_1 = v0_8.query("user_attributes", v2_0, "app_id=?", v4_4, 0, 0, "rowid", String.valueOf(this.zzJv().zzKf()));
            try {
                java.util.ArrayList v0_9;
                if (!v7_1.moveToFirst()) {
                    if (v7_1 != null) {
                        v7_1.close();
                    }
                    v0_9 = v9_1;
                    return v0_9;
                }
            } catch (java.util.ArrayList v0_1) {
                v10 = v7_1;
                if (v10 != null) {
                    v10.close();
                }
                throw v0_1;
            } catch (java.util.ArrayList v0_0) {
                com.google.android.gms.internal.zzaud v1_0 = v7_1;
                try {
                    this.zzJt().zzLa().zze("Error querying user properties. appId", com.google.android.gms.internal.zzati.zzfI(p12), v0_0);
                } catch (java.util.ArrayList v0_1) {
                    v10 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_9 = 0;
                return v0_9;
            }
            do {
                String v3_4 = v7_1.getString(0);
                long v4_5 = v7_1.getLong(1);
                Object v6_1 = this.zzb(v7_1, 2);
                if (v6_1 != null) {
                    v9_1.add(new com.google.android.gms.internal.zzaud(p12, v3_4, v4_5, v6_1));
                } else {
                    this.zzJt().zzLa().zzj("Read invalid user property value, ignoring it. appId", com.google.android.gms.internal.zzati.zzfI(p12));
                }
            } while(v7_1.moveToNext());
            if (v7_1 != null) {
                v7_1.close();
            }
            v0_9 = v9_1;
            return v0_9;
        } catch (java.util.ArrayList v0_1) {
        } catch (java.util.ArrayList v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzasu.zzfC() calling method android.database.sqlite.SQLiteDatabase.query()


    java.util.Map zzfC(String p10)
    {
        this.zznA();
        this.zzmq();
        com.google.android.gms.common.internal.zzac.zzdv(p10);
        int v0_5 = this.getWritableDatabase();
        try {
            boolean v2_8 = new String[2];
            v2_8[0] = "audience_id";
            v2_8[1] = "current_results";
            com.google.android.gms.internal.zzati$zza v4_3 = new String[1];
            v4_3[0] = p10;
            int v1_0 = v0_5.query("audience_filter_values", v2_8, "app_id=?", v4_3, 0, 0, 0);
            try {
                int v0_4;
                if (v1_0.moveToFirst()) {
                    v0_4 = new android.support.v4.f.a();
                    do {
                        boolean v2_1 = v1_0.getInt(0);
                        java.io.IOException v3_4 = com.google.android.gms.internal.zzbul.zzad(v1_0.getBlob(1));
                        com.google.android.gms.internal.zzati$zza v4_5 = new com.google.android.gms.internal.zzauh$zzf();
                        v4_5.zzb(v3_4);
                        v0_4.put(Integer.valueOf(v2_1), v4_5);
                    } while(v1_0.moveToNext());
                    if (v1_0 == 0) {
                        return v0_4;
                    } else {
                        v1_0.close();
                        return v0_4;
                    }
                } else {
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    v0_4 = 0;
                    return v0_4;
                }
            } catch (int v0_0) {
                this.zzJt().zzLa().zze("Database error querying filter results. appId", com.google.android.gms.internal.zzati.zzfI(p10), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_4 = 0;
                return v0_4;
            }
        } catch (int v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (int v0_0) {
            v1_0 = 0;
        } catch (int v0_1) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzfA() calling method android.database.sqlite.SQLiteDatabase.query()


    public byte[] zzfA(String p10)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p10);
        this.zzmq();
        this.zznA();
        try {
            byte[] v0_5 = this.getWritableDatabase();
            com.google.android.gms.internal.zzati$zza v2_6 = new String[1];
            v2_6[0] = "remote_config";
            Object v4_2 = new String[1];
            v4_2[0] = p10;
            int v1_0 = v0_5.query("apps", v2_6, "app_id=?", v4_2, 0, 0, 0);
            try {
                byte[] v0_4;
                if (v1_0.moveToFirst()) {
                    v0_4 = v1_0.getBlob(0);
                    if (v1_0.moveToNext()) {
                        this.zzJt().zzLa().zzj("Got multiple records for app config, expected one. appId", com.google.android.gms.internal.zzati.zzfI(p10));
                    }
                    if (v1_0 == 0) {
                        return v0_4;
                    } else {
                        v1_0.close();
                        return v0_4;
                    }
                } else {
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    v0_4 = 0;
                    return v0_4;
                }
            } catch (byte[] v0_0) {
                this.zzJt().zzLa().zze("Error querying remote config. appId", com.google.android.gms.internal.zzati.zzfI(p10), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_4 = 0;
                return v0_4;
            }
        } catch (byte[] v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (byte[] v0_0) {
            v1_0 = 0;
        } catch (byte[] v0_1) {
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    public void zza(String p15, long p16, long p18, com.google.android.gms.internal.zzasu$zzb p20)
    {
        com.google.android.gms.common.internal.zzac.zzw(p20);
        this.zzmq();
        this.zznA();
        android.database.Cursor v3_19 = 0;
        try {
            String v12;
            boolean v2_19 = this.getWritableDatabase();
        } catch (boolean v2_2) {
            if (v3_19 != null) {
                v3_19.close();
            }
            throw v2_2;
        } catch (boolean v2_1) {
            this.zzJt().zzLa().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzati.zzfI(p15), v2_1);
            if (v3_19 == null) {
                return;
            } else {
                v3_19.close();
                return;
            }
        }
        if (!android.text.TextUtils.isEmpty(p15)) {
            String v5_4;
            if (p18 == -1) {
                com.google.android.gms.internal.zzati$zza v4_10 = new String[1];
                v4_10[0] = p15;
                v5_4 = v4_10;
            } else {
                com.google.android.gms.internal.zzati$zza v4_16 = new String[2];
                v4_16[0] = p15;
                v4_16[1] = String.valueOf(p18);
                v5_4 = v4_16;
            }
            com.google.android.gms.internal.zzati$zza v4_27;
            if (p18 == -1) {
                v4_27 = "";
            } else {
                v4_27 = " and rowid <= ?";
            }
            android.database.Cursor v3_22 = v2_19.rawQuery(new StringBuilder((String.valueOf(v4_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v4_27).append(" order by rowid limit 1;").toString(), v5_4);
            if (v3_22.moveToFirst()) {
                com.google.android.gms.internal.zzati$zza v4_34 = v3_22.getString(0);
                v3_22.close();
                v12 = v4_34;
            } else {
                if (v3_22 == null) {
                    return;
                } else {
                    v3_22.close();
                    return;
                }
            }
        } else {
            String v5_13;
            if (p18 == -1) {
                com.google.android.gms.internal.zzati$zza v4_38 = new String[1];
                v4_38[0] = String.valueOf(p16);
                v5_13 = v4_38;
            } else {
                com.google.android.gms.internal.zzati$zza v4_41 = new String[2];
                v4_41[0] = String.valueOf(p18);
                v4_41[1] = String.valueOf(p16);
                v5_13 = v4_41;
            }
            com.google.android.gms.internal.zzati$zza v4_43;
            if (p18 == -1) {
                v4_43 = "";
            } else {
                v4_43 = "rowid <= ? and ";
            }
            android.database.Cursor v3_0 = v2_19.rawQuery(new StringBuilder((String.valueOf(v4_43).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v4_43).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v5_13);
            if (v3_0.moveToFirst()) {
                p15 = v3_0.getString(0);
                com.google.android.gms.internal.zzati$zza v4_6 = v3_0.getString(1);
                v3_0.close();
                v12 = v4_6;
            } else {
                if (v3_0 == null) {
                    return;
                } else {
                    v3_0.close();
                    return;
                }
            }
        }
        try {
            com.google.android.gms.internal.zzati$zza v4_9 = new String[1];
            v4_9[0] = "metadata";
            Object v6_2 = new String[2];
            v6_2[0] = p15;
            v6_2[1] = v12;
            boolean v11 = v2_19.query("raw_events_metadata", v4_9, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
        } catch (boolean v2_2) {
            v3_19 = v11;
        } catch (boolean v2_1) {
            v3_19 = v11;
        }
        if (v11.moveToFirst()) {
            android.database.Cursor v3_5 = com.google.android.gms.internal.zzbul.zzad(v11.getBlob(0));
            com.google.android.gms.internal.zzati$zza v4_12 = new com.google.android.gms.internal.zzauh$zze();
            try {
                v4_12.zzb(v3_5);
            } catch (boolean v2_0) {
                this.zzJt().zzLa().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzati.zzfI(p15), v2_0);
                if (!v11) {
                    return;
                } else {
                    v11.close();
                    return;
                }
            }
            if (v11.moveToNext()) {
                this.zzJt().zzLc().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzati.zzfI(p15));
            }
            String v5_6;
            Object v6_4;
            v11.close();
            p20.zzb(v4_12);
            if (p18 == -1) {
                v5_6 = "app_id = ? and metadata_fingerprint = ?";
                v6_4 = new String[2];
                v6_4[0] = p15;
                v6_4[1] = v12;
            } else {
                v5_6 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                v6_4 = new String[3];
                v6_4[0] = p15;
                v6_4[1] = v12;
                v6_4[2] = String.valueOf(p18);
            }
            com.google.android.gms.internal.zzati$zza v4_19 = new String[4];
            v4_19[0] = "rowid";
            v4_19[1] = "name";
            v4_19[2] = "timestamp";
            v4_19[3] = "data";
            v3_19 = v2_19.query("raw_events", v4_19, v5_6, v6_4, 0, 0, "rowid", 0);
            if (!v3_19.moveToFirst()) {
                this.zzJt().zzLc().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzati.zzfI(p15));
                if (v3_19 == null) {
                    return;
                } else {
                    v3_19.close();
                    return;
                }
            }
            do {
                com.google.android.gms.internal.zzati$zza v4_20 = v3_19.getLong(0);
                boolean v2_7 = com.google.android.gms.internal.zzbul.zzad(v3_19.getBlob(3));
                Object v6_7 = new com.google.android.gms.internal.zzauh$zzb();
                v6_7.zzb(v2_7);
                v6_7.name = v3_19.getString(1);
                v6_7.zzbvW = Long.valueOf(v3_19.getLong(2));
                if (p20.zza(v4_20, v6_7)) {
                } else {
                    if (v3_19 == null) {
                        return;
                    } else {
                        v3_19.close();
                        return;
                    }
                }
            } while(v3_19.moveToNext());
            if (v3_19 == null) {
                return;
            } else {
                v3_19.close();
                return;
            }
        } else {
            this.zzJt().zzLa().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzati.zzfI(p15));
            if (!v11) {
                return;
            } else {
                v11.close();
                return;
            }
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.google.android.gms.internal.zzasu$zza zza(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzac.zzdv(p14);
        this.zzmq();
        this.zznA();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzasu$zza v8_1 = new com.google.android.gms.internal.zzasu$zza();
        try {
            com.google.android.gms.internal.zzasu$zza v0_1 = this.getWritableDatabase();
            android.content.ContentValues v2_5 = new String[6];
            v2_5[0] = "day";
            v2_5[1] = "daily_events_count";
            v2_5[2] = "daily_public_events_count";
            v2_5[3] = "daily_conversions_count";
            v2_5[4] = "daily_error_events_count";
            v2_5[5] = "daily_realtime_events_count";
            String v4_20 = new String[1];
            v4_20[0] = p14;
            int v1_1 = v0_1.query("apps", v2_5, "app_id=?", v4_20, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzasu$zza v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.zzbqw = v1_1.getLong(1);
                        v8_1.zzbqv = v1_1.getLong(2);
                        v8_1.zzbqx = v1_1.getLong(3);
                        v8_1.zzbqy = v1_1.getLong(4);
                        v8_1.zzbqz = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.zzbqw = (v8_1.zzbqw + 1);
                    }
                    if (p16) {
                        v8_1.zzbqv = (v8_1.zzbqv + 1);
                    }
                    if (p17) {
                        v8_1.zzbqx = (v8_1.zzbqx + 1);
                    }
                    if (p18) {
                        v8_1.zzbqy = (v8_1.zzbqy + 1);
                    }
                    if (p19) {
                        v8_1.zzbqz = (v8_1.zzbqz + 1);
                    }
                    android.content.ContentValues v2_3 = new android.content.ContentValues();
                    v2_3.put("day", Long.valueOf(p12));
                    v2_3.put("daily_public_events_count", Long.valueOf(v8_1.zzbqv));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.zzbqw));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.zzbqx));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.zzbqy));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.zzbqz));
                    v0_1.update("apps", v2_3, "app_id=?", v10);
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                } else {
                    this.zzJt().zzLc().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzati.zzfI(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzasu$zza v0_0) {
                this.zzJt().zzLa().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzati.zzfI(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzasu$zza v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzasu$zza v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzasu$zza v0_3) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzT() calling method android.database.sqlite.SQLiteDatabase.query()


    java.util.Map zzT(String p11, String p12)
    {
        this.zznA();
        this.zzmq();
        com.google.android.gms.common.internal.zzac.zzdv(p11);
        com.google.android.gms.common.internal.zzac.zzdv(p12);
        android.support.v4.f.a v8_1 = new android.support.v4.f.a();
        android.support.v4.f.a v0_12 = this.getWritableDatabase();
        try {
            com.google.android.gms.internal.zzati$zza v2_1 = new String[2];
            v2_1[0] = "audience_id";
            v2_1[1] = "data";
            Object v4_3 = new String[2];
            v4_3[0] = p11;
            v4_3[1] = p12;
            int v1_0 = v0_12.query("property_filters", v2_1, "app_id=? AND property_name=?", v4_3, 0, 0, 0);
            try {
                android.support.v4.f.a v0_13;
                if (!v1_0.moveToFirst()) {
                    v0_13 = java.util.Collections.emptyMap();
                    if (v1_0 == 0) {
                        return v0_13;
                    } else {
                        v1_0.close();
                        return v0_13;
                    }
                }
            } catch (android.support.v4.f.a v0_0) {
                this.zzJt().zzLa().zze("Database error querying filters. appId", com.google.android.gms.internal.zzati.zzfI(p11), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_13 = 0;
                return v0_13;
            }
            do {
                android.support.v4.f.a v0_5 = com.google.android.gms.internal.zzbul.zzad(v1_0.getBlob(1));
                com.google.android.gms.internal.zzati$zza v2_3 = new com.google.android.gms.internal.zzauf$zze();
                v2_3.zzb(v0_5);
                Integer v3_4 = v1_0.getInt(0);
                android.support.v4.f.a v0_10 = ((java.util.List) v8_1.get(Integer.valueOf(v3_4)));
                if (v0_10 == null) {
                    v0_10 = new java.util.ArrayList();
                    v8_1.put(Integer.valueOf(v3_4), v0_10);
                }
                v0_10.add(v2_3);
            } while(v1_0.moveToNext());
            if (v1_0 != 0) {
                v1_0.close();
            }
            v0_13 = v8_1;
            return v0_13;
        } catch (android.support.v4.f.a v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (android.support.v4.f.a v0_0) {
            v1_0 = 0;
        } catch (android.support.v4.f.a v0_1) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzS() calling method android.database.sqlite.SQLiteDatabase.query()


    java.util.Map zzS(String p11, String p12)
    {
        this.zznA();
        this.zzmq();
        com.google.android.gms.common.internal.zzac.zzdv(p11);
        com.google.android.gms.common.internal.zzac.zzdv(p12);
        android.support.v4.f.a v8_1 = new android.support.v4.f.a();
        android.support.v4.f.a v0_12 = this.getWritableDatabase();
        try {
            com.google.android.gms.internal.zzati$zza v2_1 = new String[2];
            v2_1[0] = "audience_id";
            v2_1[1] = "data";
            Object v4_3 = new String[2];
            v4_3[0] = p11;
            v4_3[1] = p12;
            int v1_0 = v0_12.query("event_filters", v2_1, "app_id=? AND event_name=?", v4_3, 0, 0, 0);
            try {
                android.support.v4.f.a v0_13;
                if (!v1_0.moveToFirst()) {
                    v0_13 = java.util.Collections.emptyMap();
                    if (v1_0 == 0) {
                        return v0_13;
                    } else {
                        v1_0.close();
                        return v0_13;
                    }
                }
            } catch (android.support.v4.f.a v0_0) {
                this.zzJt().zzLa().zze("Database error querying filters. appId", com.google.android.gms.internal.zzati.zzfI(p11), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_13 = 0;
                return v0_13;
            }
            do {
                android.support.v4.f.a v0_5 = com.google.android.gms.internal.zzbul.zzad(v1_0.getBlob(1));
                com.google.android.gms.internal.zzati$zza v2_3 = new com.google.android.gms.internal.zzauf$zzb();
                v2_3.zzb(v0_5);
                Integer v3_4 = v1_0.getInt(0);
                android.support.v4.f.a v0_10 = ((java.util.List) v8_1.get(Integer.valueOf(v3_4)));
                if (v0_10 == null) {
                    v0_10 = new java.util.ArrayList();
                    v8_1.put(Integer.valueOf(v3_4), v0_10);
                }
                v0_10.add(v2_3);
            } while(v1_0.moveToNext());
            if (v1_0 != 0) {
                v1_0.close();
            }
            v0_13 = v8_1;
            return v0_13;
        } catch (android.support.v4.f.a v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (android.support.v4.f.a v0_0) {
            v1_0 = 0;
        } catch (android.support.v4.f.a v0_1) {
        }
    }

Method com.google.android.gms.internal.zzasu.zzR() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.google.android.gms.internal.zzaud zzR(String p10, String p11)
    {
        android.database.Cursor v8 = 0;
        com.google.android.gms.common.internal.zzac.zzdv(p10);
        com.google.android.gms.common.internal.zzac.zzdv(p11);
        this.zzmq();
        this.zznA();
        try {
            com.google.android.gms.internal.zzati$zza v0_8 = this.getWritableDatabase();
            String v2_5 = new String[2];
            v2_5[0] = "set_timestamp";
            v2_5[1] = "value";
            long v4_3 = new String[2];
            v4_3[0] = p10;
            v4_3[1] = p11;
            android.database.Cursor v7_1 = v0_8.query("user_attributes", v2_5, "app_id=? and name=?", v4_3, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzaud v1_2;
                if (v7_1.moveToFirst()) {
                    v1_2 = new com.google.android.gms.internal.zzaud(p10, p11, v7_1.getLong(0), this.zzb(v7_1, 1));
                    if (v7_1.moveToNext()) {
                        this.zzJt().zzLa().zzj("Got multiple records for user property, expected one. appId", com.google.android.gms.internal.zzati.zzfI(p10));
                    }
                    if (v7_1 == null) {
                        return v1_2;
                    } else {
                        v7_1.close();
                        return v1_2;
                    }
                } else {
                    if (v7_1 != null) {
                        v7_1.close();
                    }
                    v1_2 = 0;
                    return v1_2;
                }
            } catch (com.google.android.gms.internal.zzati$zza v0_1) {
                v8 = v7_1;
                if (v8 != null) {
                    v8.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.zzati$zza v0_0) {
                com.google.android.gms.internal.zzaud v1_0 = v7_1;
                try {
                    this.zzJt().zzLa().zzd("Error querying user property. appId", com.google.android.gms.internal.zzati.zzfI(p10), p11, v0_0);
                } catch (com.google.android.gms.internal.zzati$zza v0_1) {
                    v8 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v1_2 = 0;
                return v1_2;
            }
        } catch (com.google.android.gms.internal.zzati$zza v0_1) {
        } catch (com.google.android.gms.internal.zzati$zza v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzasu.zzP() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.google.android.gms.internal.zzasy zzP(String p13, String p14)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzac.zzdv(p13);
        com.google.android.gms.common.internal.zzac.zzdv(p14);
        this.zzmq();
        this.zznA();
        try {
            com.google.android.gms.internal.zzati$zza v0_9 = this.getWritableDatabase();
            String v2_5 = new String[3];
            v2_5[0] = "lifetime_count";
            v2_5[1] = "current_bundle_count";
            v2_5[2] = "last_fire_timestamp";
            long v4_4 = new String[2];
            v4_4[0] = p13;
            v4_4[1] = p14;
            android.database.Cursor v11 = v0_9.query("events", v2_5, "app_id=? and name=?", v4_4, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzasy v1_2;
                if (v11.moveToFirst()) {
                    v1_2 = new com.google.android.gms.internal.zzasy(p13, p14, v11.getLong(0), v11.getLong(1), v11.getLong(2));
                    if (v11.moveToNext()) {
                        this.zzJt().zzLa().zzj("Got multiple records for event aggregates, expected one. appId", com.google.android.gms.internal.zzati.zzfI(p13));
                    }
                    if (v11 == null) {
                        return v1_2;
                    } else {
                        v11.close();
                        return v1_2;
                    }
                } else {
                    if (v11 != null) {
                        v11.close();
                    }
                    v1_2 = 0;
                    return v1_2;
                }
            } catch (com.google.android.gms.internal.zzati$zza v0_1) {
                v10 = v11;
                if (v10 != null) {
                    v10.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.zzati$zza v0_0) {
                com.google.android.gms.internal.zzasy v1_0 = v11;
                try {
                    this.zzJt().zzLa().zzd("Error querying events. appId", com.google.android.gms.internal.zzati.zzfI(p13), p14, v0_0);
                } catch (com.google.android.gms.internal.zzati$zza v0_1) {
                    v10 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v1_2 = 0;
                return v1_2;
            }
        } catch (com.google.android.gms.internal.zzati$zza v0_1) {
        } catch (com.google.android.gms.internal.zzati$zza v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzasu.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    static boolean zza(com.google.android.gms.internal.zzati p10, android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        if (p10 != null) {
            try {
                com.google.android.gms.internal.zzati$zza v2_1 = new String[1];
                v2_1[0] = "name";
                String[] v4 = new String[1];
                v4[0] = p12;
                int v1_0 = p11.query("SQLITE_MASTER", v2_1, "name=?", v4, 0, 0, 0);
                try {
                    int v0_5 = v1_0.moveToFirst();
                } catch (int v0_3) {
                    p10.zzLc().zze("Error querying for table", p12, v0_3);
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    v0_5 = 0;
                    return v0_5;
                }
                if (v1_0 == 0) {
                    return v0_5;
                } else {
                    v1_0.close();
                    return v0_5;
                }
            } catch (int v0_4) {
                if (v9 != 0) {
                    v9.close();
                }
                throw v0_4;
            } catch (int v0_3) {
                v1_0 = 0;
            } catch (int v0_4) {
                v9 = v1_0;
            }
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }