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.zzec.zzek() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzek(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.zzln("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.zzdj.zzcr(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.zzdj.zzcr("Invalid maxHits specified. Skipping");
            v0_12 = v9_1;
        }
        return v0_12;
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p6)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            android.database.sqlite.SQLiteException v0_20 = p6.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_20.moveToFirst();
                v0_20.close();
            } catch (String v1_4) {
                v0_20.close();
                throw v1_4;
            }
        }
        if (com.google.android.gms.tagmanager.zzax.zza("datalayer", p6)) {
            String v1_0 = p6.rawQuery("SELECT * FROM datalayer WHERE 0", 0);
            java.util.HashSet v2_2 = new java.util.HashSet();
            try {
                String[] v3 = v1_0.getColumnNames();
                android.database.sqlite.SQLiteException v0_4 = 0;
            } catch (android.database.sqlite.SQLiteException v0_5) {
                v1_0.close();
                throw v0_5;
            }
            while (v0_4 < v3.length) {
                v2_2.add(v3[v0_4]);
                v0_4++;
            }
            v1_0.close();
            if ((v2_2.remove("key")) && ((v2_2.remove("value")) && ((v2_2.remove("ID")) && (v2_2.remove("expires"))))) {
                if (!v2_2.isEmpty()) {
                    throw new android.database.sqlite.SQLiteException("Database has extra columns");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database column missing");
            }
        } else {
            p6.execSQL(com.google.android.gms.tagmanager.zzat.zzbdj());
        }
        return;
    }

Method com.google.android.gms.internal.zzcay.zzal() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map zzal(String p11, String p12)
    {
        this.zzwk();
        this.zzuj();
        com.google.android.gms.common.internal.zzbp.zzgg(p11);
        com.google.android.gms.common.internal.zzbp.zzgg(p12);
        android.support.v4.util.ArrayMap v8_1 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v0_12 = this.getWritableDatabase();
        try {
            com.google.android.gms.internal.zzcby 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.util.ArrayMap 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.util.ArrayMap v0_0) {
                this.zzaul().zzayd().zze("Database error querying filters. appId", com.google.android.gms.internal.zzcbw.zzjf(p11), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_13 = 0;
                return v0_13;
            }
            do {
                android.support.v4.util.ArrayMap v0_4 = v1_0.getBlob(1);
                android.support.v4.util.ArrayMap v0_5 = com.google.android.gms.internal.zzeye.zzm(v0_4, 0, v0_4.length);
                com.google.android.gms.internal.zzcby v2_4 = new com.google.android.gms.internal.zzcgb();
                v2_4.zza(v0_5);
                Integer v3_5 = v1_0.getInt(0);
                android.support.v4.util.ArrayMap v0_10 = ((java.util.List) v8_1.get(Integer.valueOf(v3_5)));
                if (v0_10 == null) {
                    v0_10 = new java.util.ArrayList();
                    v8_1.put(Integer.valueOf(v3_5), v0_10);
                }
                v0_10.add(v2_4);
            } while(v1_0.moveToNext());
            if (v1_0 != 0) {
                v1_0.close();
            }
            v0_13 = v8_1;
            return v0_13;
        } catch (android.support.v4.util.ArrayMap v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (android.support.v4.util.ArrayMap v0_0) {
            v1_0 = 0;
        } catch (android.support.v4.util.ArrayMap v0_1) {
        }
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p6)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            android.database.sqlite.SQLiteException v0_20 = p6.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_20.moveToFirst();
                v0_20.close();
            } catch (String v1_4) {
                v0_20.close();
                throw v1_4;
            }
        }
        if (com.google.android.gms.tagmanager.zzee.zza("gtm_hits", p6)) {
            String v1_0 = p6.rawQuery("SELECT * FROM gtm_hits WHERE 0", 0);
            java.util.HashSet v2_2 = new java.util.HashSet();
            try {
                String[] v3 = v1_0.getColumnNames();
                android.database.sqlite.SQLiteException v0_4 = 0;
            } catch (android.database.sqlite.SQLiteException v0_5) {
                v1_0.close();
                throw v0_5;
            }
            while (v0_4 < v3.length) {
                v2_2.add(v3[v0_4]);
                v0_4++;
            }
            v1_0.close();
            if ((v2_2.remove("hit_id")) && ((v2_2.remove("hit_url")) && ((v2_2.remove("hit_time")) && (v2_2.remove("hit_first_send_time"))))) {
                if (!v2_2.isEmpty()) {
                    throw new android.database.sqlite.SQLiteException("Database has extra columns");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database column missing");
            }
        } else {
            p6.execSQL(com.google.android.gms.tagmanager.zzec.zzbeg());
        }
        return;
    }

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


    public final com.google.android.gms.internal.zzcaz zza(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p14);
        this.zzuj();
        this.zzwk();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzcaz v8_1 = new com.google.android.gms.internal.zzcaz();
        try {
            com.google.android.gms.internal.zzcaz 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.zzcaz v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.zzimz = v1_1.getLong(1);
                        v8_1.zzimy = v1_1.getLong(2);
                        v8_1.zzina = v1_1.getLong(3);
                        v8_1.zzinb = v1_1.getLong(4);
                        v8_1.zzinc = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.zzimz = (v8_1.zzimz + 1);
                    }
                    if (p16) {
                        v8_1.zzimy = (v8_1.zzimy + 1);
                    }
                    if (p17) {
                        v8_1.zzina = (v8_1.zzina + 1);
                    }
                    if (p18) {
                        v8_1.zzinb = (v8_1.zzinb + 1);
                    }
                    if (p19) {
                        v8_1.zzinc = (v8_1.zzinc + 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.zzimy));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.zzimz));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.zzina));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.zzinb));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.zzinc));
                    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.zzaul().zzayf().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzcbw.zzjf(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzcaz v0_0) {
                this.zzaul().zzayd().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzcbw.zzjf(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzcaz v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzcaz v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzcaz v0_3) {
        }
    }

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


    private final java.util.List zzn(long p14)
    {
        java.util.ArrayList v0_8;
        int v10 = 0;
        com.google.android.gms.analytics.zzj.zzuj();
        this.zzwk();
        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.zzand.zzo() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzo(long p14)
    {
        Throwable v0_0 = 1;
        if (p14 < 0) {
            v0_0 = 0;
        }
        com.google.android.gms.common.internal.zzbp.zzbh(v0_0);
        com.google.android.gms.analytics.zzj.zzuj();
        this.zzwk();
        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.zzand 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.zzand 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.zzaoi(this, this.zzdr(v9.getString(2)), v9.getLong(1), com.google.android.gms.internal.zzapd.zzed(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.zzand.zzq() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzq(long p13)
    {
        this.zzwk();
        com.google.android.gms.analytics.zzj.zzuj();
        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 = ((Integer) com.google.android.gms.internal.zzaod.zzdrg.get()).intValue();
            java.util.Map v8_0 = String.valueOf(v10);
            String v4_0 = new String[1];
            v4_0[0] = "0";
            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_10 = v9;
                try {
                    this.zze("Error loading hits from the database", v0_1);
                    throw v0_1;
                } catch (boolean v0_19) {
                    v9 = v1_10;
                    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 vtmp13 = this.zzds(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.zzamx(0, v3_5, v4_1, v5_2, v6_1, vtmp13));
                    } 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.zzdp("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_10 = v9;
        }
    }

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


    private final boolean zza(android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        try {
            com.google.android.gms.internal.zzand 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.zzdpo.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.zzcay.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private static boolean zza(com.google.android.gms.internal.zzcbw p10, android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        if (p10 != null) {
            try {
                com.google.android.gms.internal.zzcby 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.zzayf().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");
        }
    }

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


    public final com.google.android.gms.internal.zzcaz zza(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p14);
        this.zzuj();
        this.zzwk();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzcaz v8_1 = new com.google.android.gms.internal.zzcaz();
        try {
            com.google.android.gms.internal.zzcaz 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.zzcaz v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.zzimz = v1_1.getLong(1);
                        v8_1.zzimy = v1_1.getLong(2);
                        v8_1.zzina = v1_1.getLong(3);
                        v8_1.zzinb = v1_1.getLong(4);
                        v8_1.zzinc = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.zzimz = (v8_1.zzimz + 1);
                    }
                    if (p16) {
                        v8_1.zzimy = (v8_1.zzimy + 1);
                    }
                    if (p17) {
                        v8_1.zzina = (v8_1.zzina + 1);
                    }
                    if (p18) {
                        v8_1.zzinb = (v8_1.zzinb + 1);
                    }
                    if (p19) {
                        v8_1.zzinc = (v8_1.zzinc + 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.zzimy));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.zzimz));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.zzina));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.zzinb));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.zzinc));
                    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.zzaul().zzayf().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzcbw.zzjf(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzcaz v0_0) {
                this.zzaul().zzayd().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzcbw.zzjf(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzcaz v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzcaz v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzcaz v0_3) {
        }
    }

Method com.google.android.gms.internal.zzcay.zzaf() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcbg zzaf(String p13, String p14)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbp.zzgg(p13);
        com.google.android.gms.common.internal.zzbp.zzgg(p14);
        this.zzuj();
        this.zzwk();
        try {
            com.google.android.gms.internal.zzcby 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.zzcbg v1_2;
                if (v11.moveToFirst()) {
                    v1_2 = new com.google.android.gms.internal.zzcbg(p13, p14, v11.getLong(0), v11.getLong(1), v11.getLong(2));
                    if (v11.moveToNext()) {
                        this.zzaul().zzayd().zzj("Got multiple records for event aggregates, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(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.zzcby v0_1) {
                v10 = v11;
                if (v10 != null) {
                    v10.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.zzcby v0_0) {
                com.google.android.gms.internal.zzcbg v1_0 = v11;
                try {
                    this.zzaul().zzayd().zzd("Error querying events. appId", com.google.android.gms.internal.zzcbw.zzjf(p13), this.zzaug().zzjc(p14), v0_0);
                } catch (com.google.android.gms.internal.zzcby v0_1) {
                    v10 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v1_2 = 0;
                return v1_2;
            }
        } catch (com.google.android.gms.internal.zzcby v0_1) {
        } catch (com.google.android.gms.internal.zzcby v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzcay.zzah() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcfv zzah(String p10, String p11)
    {
        android.database.Cursor v8 = 0;
        com.google.android.gms.common.internal.zzbp.zzgg(p10);
        com.google.android.gms.common.internal.zzbp.zzgg(p11);
        this.zzuj();
        this.zzwk();
        try {
            com.google.android.gms.internal.zzcfv v0_8 = this.getWritableDatabase();
            String v2_5 = new String[3];
            v2_5[0] = "set_timestamp";
            v2_5[1] = "value";
            v2_5[2] = "origin";
            long v4_4 = new String[2];
            v4_4[0] = p10;
            v4_4[1] = p11;
            android.database.Cursor v7_1 = v0_8.query("user_attributes", v2_5, "app_id=? and name=?", v4_4, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzcfv v0_7;
                if (v7_1.moveToFirst()) {
                    v0_7 = new com.google.android.gms.internal.zzcfv(p10, v7_1.getString(2), p11, v7_1.getLong(0), this.zza(v7_1, 1));
                    if (v7_1.moveToNext()) {
                        this.zzaul().zzayd().zzj("Got multiple records for user property, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(p10));
                    }
                    if (v7_1 == null) {
                        return v0_7;
                    } else {
                        v7_1.close();
                        return v0_7;
                    }
                } else {
                    if (v7_1 != null) {
                        v7_1.close();
                    }
                    v0_7 = 0;
                    return v0_7;
                }
            } catch (com.google.android.gms.internal.zzcfv v0_1) {
                v8 = v7_1;
                if (v8 != null) {
                    v8.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.zzcfv v0_0) {
                com.google.android.gms.internal.zzcby v1_0 = v7_1;
                try {
                    this.zzaul().zzayd().zzd("Error querying user property. appId", com.google.android.gms.internal.zzcbw.zzjf(p10), this.zzaug().zzje(p11), v0_0);
                } catch (com.google.android.gms.internal.zzcfv v0_1) {
                    v8 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_7 = 0;
                return v0_7;
            }
        } catch (com.google.android.gms.internal.zzcfv v0_1) {
        } catch (com.google.android.gms.internal.zzcfv v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzcay.zzai() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcav zzai(String p22, String p23)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p22);
        com.google.android.gms.common.internal.zzbp.zzgg(p23);
        this.zzuj();
        this.zzwk();
        try {
            com.google.android.gms.internal.zzcby v2_11 = this.getWritableDatabase();
            Object v4_6 = new String[11];
            v4_6[0] = "origin";
            v4_6[1] = "value";
            v4_6[2] = "active";
            v4_6[3] = "trigger_event_name";
            v4_6[4] = "trigger_timeout";
            v4_6[5] = "timed_out_event";
            v4_6[6] = "creation_timestamp";
            v4_6[7] = "triggered_event";
            v4_6[8] = "triggered_timestamp";
            v4_6[9] = "time_to_live";
            v4_6[10] = "expired_event";
            String v6_16 = new String[2];
            v6_16[0] = p22;
            v6_16[1] = p23;
            int v20 = v2_11.query("conditional_properties", v4_6, "app_id=? and name=?", v6_16, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzcav v5_3;
                if (v20.moveToFirst()) {
                    int v11;
                    String v7_5 = v20.getString(0);
                    String v6_17 = this.zza(v20, 1);
                    if (v20.getInt(2) == 0) {
                        v11 = 0;
                    } else {
                        v11 = 1;
                    }
                    v5_3 = new com.google.android.gms.internal.zzcav(p22, v7_5, new com.google.android.gms.internal.zzcft(p23, v20.getLong(8), v6_17, v7_5), v20.getLong(6), v11, v20.getString(3), ((com.google.android.gms.internal.zzcbk) this.zzauh().zzb(v20.getBlob(5), com.google.android.gms.internal.zzcbk.CREATOR)), v20.getLong(4), ((com.google.android.gms.internal.zzcbk) this.zzauh().zzb(v20.getBlob(7), com.google.android.gms.internal.zzcbk.CREATOR)), v20.getLong(9), ((com.google.android.gms.internal.zzcbk) this.zzauh().zzb(v20.getBlob(10), com.google.android.gms.internal.zzcbk.CREATOR)));
                    if (v20.moveToNext()) {
                        this.zzaul().zzayd().zze("Got multiple records for conditional property, expected one", com.google.android.gms.internal.zzcbw.zzjf(p22), this.zzaug().zzje(p23));
                    }
                    if (v20 == 0) {
                        return v5_3;
                    } else {
                        v20.close();
                        return v5_3;
                    }
                } else {
                    if (v20 != 0) {
                        v20.close();
                    }
                    v5_3 = 0;
                    return v5_3;
                }
            } catch (com.google.android.gms.internal.zzcby v2_10) {
                if (v20 != 0) {
                    v20.close();
                }
                throw v2_10;
            } catch (com.google.android.gms.internal.zzcby v2_9) {
                String v3_6 = v20;
                try {
                    this.zzaul().zzayd().zzd("Error querying conditional property", com.google.android.gms.internal.zzcbw.zzjf(p22), this.zzaug().zzje(p23), v2_9);
                } catch (com.google.android.gms.internal.zzcby v2_10) {
                    v20 = v3_6;
                }
                if (v3_6 != null) {
                    v3_6.close();
                }
                v5_3 = 0;
                return v5_3;
            }
        } catch (com.google.android.gms.internal.zzcby v2_10) {
            v20 = 0;
        } catch (com.google.android.gms.internal.zzcby v2_9) {
            v3_6 = 0;
        }
    }

Method com.google.android.gms.internal.zzcay.zzak() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map zzak(String p11, String p12)
    {
        this.zzwk();
        this.zzuj();
        com.google.android.gms.common.internal.zzbp.zzgg(p11);
        com.google.android.gms.common.internal.zzbp.zzgg(p12);
        android.support.v4.util.ArrayMap v8_1 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v0_12 = this.getWritableDatabase();
        try {
            com.google.android.gms.internal.zzcby 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.util.ArrayMap 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.util.ArrayMap v0_0) {
                this.zzaul().zzayd().zze("Database error querying filters. appId", com.google.android.gms.internal.zzcbw.zzjf(p11), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_13 = 0;
                return v0_13;
            }
            do {
                android.support.v4.util.ArrayMap v0_4 = v1_0.getBlob(1);
                android.support.v4.util.ArrayMap v0_5 = com.google.android.gms.internal.zzeye.zzm(v0_4, 0, v0_4.length);
                com.google.android.gms.internal.zzcby v2_4 = new com.google.android.gms.internal.zzcfy();
                v2_4.zza(v0_5);
                Integer v3_5 = v1_0.getInt(0);
                android.support.v4.util.ArrayMap v0_10 = ((java.util.List) v8_1.get(Integer.valueOf(v3_5)));
                if (v0_10 == null) {
                    v0_10 = new java.util.ArrayList();
                    v8_1.put(Integer.valueOf(v3_5), v0_10);
                }
                v0_10.add(v2_4);
            } while(v1_0.moveToNext());
            if (v1_0 != 0) {
                v1_0.close();
            }
            v0_13 = v8_1;
            return v0_13;
        } catch (android.support.v4.util.ArrayMap v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (android.support.v4.util.ArrayMap v0_0) {
            v1_0 = 0;
        } catch (android.support.v4.util.ArrayMap v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcay.zzc() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzc(String p24, String[] p25)
    {
        this.zzuj();
        this.zzwk();
        java.util.ArrayList v20_1 = new java.util.ArrayList();
        try {
            boolean v2_14 = this.getWritableDatabase();
            long v4_10 = new String[13];
            v4_10[0] = "app_id";
            v4_10[1] = "origin";
            v4_10[2] = "name";
            v4_10[3] = "value";
            v4_10[4] = "active";
            v4_10[5] = "trigger_event_name";
            v4_10[6] = "trigger_timeout";
            v4_10[7] = "timed_out_event";
            v4_10[8] = "creation_timestamp";
            v4_10[9] = "triggered_event";
            v4_10[10] = "triggered_timestamp";
            v4_10[11] = "time_to_live";
            v4_10[12] = "expired_event";
            com.google.android.gms.internal.zzcax.zzawb();
            int v21 = v2_14.query("conditional_properties", v4_10, p24, p25, 0, 0, "rowid", "1001");
            try {
                boolean v2_12;
                if (!v21.moveToFirst()) {
                    if (v21 != 0) {
                        v21.close();
                    }
                    v2_12 = v20_1;
                    return v2_12;
                }
            } catch (boolean v2_13) {
                if (v21 != 0) {
                    v21.close();
                }
                throw v2_13;
            } catch (boolean v2_11) {
                String v3_1 = v21;
                try {
                    this.zzaul().zzayd().zzj("Error querying conditional user property value", v2_11);
                    v2_12 = java.util.Collections.emptyList();
                } catch (boolean v2_13) {
                    v21 = v3_1;
                }
                if (v3_1 == null) {
                    return v2_12;
                } else {
                    v3_1.close();
                    return v2_12;
                }
                if (v21 != 0) {
                    v21.close();
                }
                v2_12 = v20_1;
                return v2_12;
            }
            while (v20_1.size() < com.google.android.gms.internal.zzcax.zzawb()) {
                int v11_1;
                com.google.android.gms.internal.zzcft v8_2 = v21.getString(0);
                String v7_1 = v21.getString(1);
                String v3_4 = v21.getString(2);
                String v6_15 = this.zza(v21, 3);
                if (v21.getInt(4) == 0) {
                    v11_1 = 0;
                } else {
                    v11_1 = 1;
                }
                v20_1.add(new com.google.android.gms.internal.zzcav(v8_2, v7_1, new com.google.android.gms.internal.zzcft(v3_4, v21.getLong(10), v6_15, v7_1), v21.getLong(8), v11_1, v21.getString(5), ((com.google.android.gms.internal.zzcbk) this.zzauh().zzb(v21.getBlob(7), com.google.android.gms.internal.zzcbk.CREATOR)), v21.getLong(6), ((com.google.android.gms.internal.zzcbk) this.zzauh().zzb(v21.getBlob(9), com.google.android.gms.internal.zzcbk.CREATOR)), v21.getLong(11), ((com.google.android.gms.internal.zzcbk) this.zzauh().zzb(v21.getBlob(12), com.google.android.gms.internal.zzcbk.CREATOR))));
                if (!v21.moveToNext()) {
                }
            }
            this.zzaul().zzayd().zzj("Read more than the max allowed conditional properties, ignoring extra", Integer.valueOf(com.google.android.gms.internal.zzcax.zzawb()));
        } catch (boolean v2_13) {
            v21 = 0;
        } catch (boolean v2_11) {
            v3_1 = 0;
        }
    }

Method com.google.android.gms.internal.zzcay.zzg() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzg(String p12, String p13, String p14)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbp.zzgg(p12);
        this.zzuj();
        this.zzwk();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            boolean v0_12 = new java.util.ArrayList(3);
            v0_12.add(p12);
            Object v3_1 = new StringBuilder("app_id=?");
        } catch (boolean v0_3) {
            if (v10 != null) {
                v10.close();
            }
            throw v0_3;
        } catch (boolean v0_0) {
            android.database.Cursor v1_0 = 0;
            try {
                this.zzaul().zzayd().zzd("(2)Error querying user properties", com.google.android.gms.internal.zzcbw.zzjf(p12), p13, v0_0);
            } catch (boolean v0_3) {
                v10 = v1_0;
            }
            if (v1_0 != null) {
                v1_0.close();
            }
            boolean v0_4 = 0;
            return v0_4;
        }
        if (!android.text.TextUtils.isEmpty(p13)) {
            v0_12.add(p13);
            v3_1.append(" and origin=?");
        }
        if (!android.text.TextUtils.isEmpty(p14)) {
            v0_12.add(String.valueOf(p14).concat("*"));
            v3_1.append(" and name glob ?");
        }
        android.database.Cursor v1_10 = new String[v0_12.size()];
        long v4_2 = ((String[]) v0_12.toArray(v1_10));
        boolean v0_5 = this.getWritableDatabase();
        String v2_6 = new String[4];
        v2_6[0] = "name";
        v2_6[1] = "set_timestamp";
        v2_6[2] = "value";
        v2_6[3] = "origin";
        Object v3_3 = v3_1.toString();
        com.google.android.gms.internal.zzcax.zzavz();
        android.database.Cursor v7_1 = v0_5.query("user_attributes", v2_6, v3_3, v4_2, 0, 0, "rowid", "1001");
        try {
            if (!v7_1.moveToFirst()) {
                if (v7_1 != null) {
                    v7_1.close();
                }
                v0_4 = v9_1;
                return v0_4;
            }
        } catch (boolean v0_3) {
            v10 = v7_1;
        } catch (boolean v0_0) {
            v1_0 = v7_1;
        }
        while (v9_1.size() < com.google.android.gms.internal.zzcax.zzavz()) {
            Object v3_4 = v7_1.getString(0);
            long v4_3 = v7_1.getLong(1);
            Object v6_5 = this.zza(v7_1, 2);
            String v2_7 = v7_1.getString(3);
            try {
                if (v6_5 != null) {
                    v9_1.add(new com.google.android.gms.internal.zzcfv(p12, v2_7, v3_4, v4_3, v6_5));
                } else {
                    this.zzaul().zzayd().zzd("(2)Read invalid user property value, ignoring it", com.google.android.gms.internal.zzcbw.zzjf(p12), v2_7, p14);
                }
                if (v7_1.moveToNext()) {
                    p13 = v2_7;
                } else {
                }
                if (v7_1 != null) {
                    v7_1.close();
                }
                v0_4 = v9_1;
                return v0_4;
            } catch (boolean v0_0) {
                v1_0 = v7_1;
                p13 = v2_7;
            }
        }
        this.zzaul().zzayd().zzj("Read more than the max allowed user properties, ignoring excess", Integer.valueOf(com.google.android.gms.internal.zzcax.zzavz()));
    }

Method com.google.android.gms.internal.zzcay.zziv() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zziv(String p12)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbp.zzgg(p12);
        this.zzuj();
        this.zzwk();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            java.util.ArrayList v0_11 = this.getWritableDatabase();
            Object v2_0 = new String[4];
            v2_0[0] = "name";
            v2_0[1] = "origin";
            v2_0[2] = "set_timestamp";
            v2_0[3] = "value";
            long v4_5 = new String[1];
            v4_5[0] = p12;
            android.database.Cursor v7_1 = v0_11.query("user_attributes", v2_0, "app_id=?", v4_5, 0, 0, "rowid", String.valueOf(com.google.android.gms.internal.zzcax.zzavz()));
            try {
                java.util.ArrayList v0_12;
                if (!v7_1.moveToFirst()) {
                    if (v7_1 != null) {
                        v7_1.close();
                    }
                    v0_12 = v9_1;
                    return v0_12;
                }
            } catch (java.util.ArrayList v0_1) {
                v10 = v7_1;
                if (v10 != null) {
                    v10.close();
                }
                throw v0_1;
            } catch (java.util.ArrayList v0_0) {
                String v1_0 = v7_1;
                try {
                    this.zzaul().zzayd().zze("Error querying user properties. appId", com.google.android.gms.internal.zzcbw.zzjf(p12), v0_0);
                } catch (java.util.ArrayList v0_1) {
                    v10 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_12 = 0;
                return v0_12;
            }
            do {
                String v3_5 = v7_1.getString(0);
                Object v2_1 = v7_1.getString(1);
                if (v2_1 == null) {
                    v2_1 = "";
                }
                long v4_6 = v7_1.getLong(2);
                Object v6_1 = this.zza(v7_1, 3);
                if (v6_1 != null) {
                    v9_1.add(new com.google.android.gms.internal.zzcfv(p12, v2_1, v3_5, v4_6, v6_1));
                } else {
                    this.zzaul().zzayd().zzj("Read invalid user property value, ignoring it. appId", com.google.android.gms.internal.zzcbw.zzjf(p12));
                }
            } while(v7_1.moveToNext());
            if (v7_1 != null) {
                v7_1.close();
            }
            v0_12 = v9_1;
            return v0_12;
        } catch (java.util.ArrayList v0_1) {
        } catch (java.util.ArrayList v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzcay.zziw() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcar zziw(String p12)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p12);
        this.zzuj();
        this.zzwk();
        try {
            int v0_3 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcby v2_0 = new String[23];
            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";
            v2_0[22] = "android_id";
            Object v4_26 = new String[1];
            v4_26[0] = p12;
            int v1_1 = v0_3.query("apps", v2_0, "app_id=?", v4_26, 0, 0, 0);
            try {
                int v0_1;
                if (v1_1.moveToFirst()) {
                    com.google.android.gms.internal.zzcby v2_24;
                    v0_1 = new com.google.android.gms.internal.zzcar(this.zziki, p12);
                    v0_1.zzim(v1_1.getString(0));
                    v0_1.zzin(v1_1.getString(1));
                    v0_1.zzio(v1_1.getString(2));
                    v0_1.zzaq(v1_1.getLong(3));
                    v0_1.zzal(v1_1.getLong(4));
                    v0_1.zzam(v1_1.getLong(5));
                    v0_1.setAppVersion(v1_1.getString(6));
                    v0_1.zziq(v1_1.getString(7));
                    v0_1.zzao(v1_1.getLong(8));
                    v0_1.zzap(v1_1.getLong(9));
                    if (!v1_1.isNull(10)) {
                        v2_24 = v1_1.getInt(10);
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcby v2_25;
                    if (v2_24 == null) {
                        v2_25 = 0;
                    } else {
                        v2_25 = 1;
                    }
                    com.google.android.gms.internal.zzcby v2_42;
                    v0_1.setMeasurementEnabled(v2_25);
                    v0_1.zzat(v1_1.getLong(11));
                    v0_1.zzau(v1_1.getLong(12));
                    v0_1.zzav(v1_1.getLong(13));
                    v0_1.zzaw(v1_1.getLong(14));
                    v0_1.zzar(v1_1.getLong(15));
                    v0_1.zzas(v1_1.getLong(16));
                    if (!v1_1.isNull(17)) {
                        v2_42 = ((long) v1_1.getInt(17));
                    } else {
                        v2_42 = -2147483648;
                    }
                    com.google.android.gms.internal.zzcby v2_54;
                    v0_1.zzan(v2_42);
                    v0_1.zzip(v1_1.getString(18));
                    v0_1.zzay(v1_1.getLong(19));
                    v0_1.zzax(v1_1.getLong(20));
                    v0_1.zzir(v1_1.getString(21));
                    if (!v1_1.isNull(22)) {
                        v2_54 = v1_1.getLong(22);
                    } else {
                        v2_54 = 0;
                    }
                    v0_1.zzaz(v2_54);
                    v0_1.zzauo();
                    if (v1_1.moveToNext()) {
                        this.zzaul().zzayd().zzj("Got multiple records for app, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(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.zzaul().zzayd().zze("Error querying app. appId", com.google.android.gms.internal.zzcbw.zzjf(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.zzcay.zziy() calling method android.database.sqlite.SQLiteDatabase.query()


    public final byte[] zziy(String p10)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p10);
        this.zzuj();
        this.zzwk();
        try {
            byte[] v0_5 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcby 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.zzaul().zzayd().zzj("Got multiple records for app config, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(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.zzaul().zzayd().zze("Error querying remote config. appId", com.google.android.gms.internal.zzcbw.zzjf(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.zzcay.zziz() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map zziz(String p10)
    {
        this.zzwk();
        this.zzuj();
        com.google.android.gms.common.internal.zzbp.zzgg(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.zzcby 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.util.ArrayMap();
                    do {
                        boolean v2_1 = v1_0.getInt(0);
                        java.io.IOException v3_3 = v1_0.getBlob(1);
                        java.io.IOException v3_4 = com.google.android.gms.internal.zzeye.zzm(v3_3, 0, v3_3.length);
                        com.google.android.gms.internal.zzcby v4_6 = new com.google.android.gms.internal.zzcgl();
                        v4_6.zza(v3_4);
                        v0_4.put(Integer.valueOf(v2_1), v4_6);
                    } 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.zzaul().zzayd().zze("Database error querying filter results. appId", com.google.android.gms.internal.zzcbw.zzjf(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.zzcay.zzl() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzl(String p12, int p13, int p14)
    {
        Throwable v0_6;
        int v1_0 = 1;
        this.zzuj();
        this.zzwk();
        if (p13 <= 0) {
            v0_6 = 0;
        } else {
            v0_6 = 1;
        }
        com.google.android.gms.common.internal.zzbp.zzbh(v0_6);
        if (p14 <= 0) {
            v1_0 = 0;
        }
        com.google.android.gms.common.internal.zzbp.zzbh(v1_0);
        com.google.android.gms.common.internal.zzbp.zzgg(p12);
        try {
            Throwable v0_2 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcby v2_3 = new String[2];
            v2_3[0] = "rowid";
            v2_3[1] = "data";
            com.google.android.gms.internal.zzcby v4_4 = new String[1];
            v4_4[0] = p12;
            com.google.android.gms.internal.zzcby v2_1 = v0_2.query("queue", v2_3, "app_id=?", v4_4, 0, 0, "rowid", String.valueOf(p13));
            try {
                Throwable v0_0;
                if (v2_1.moveToFirst()) {
                    v0_0 = new java.util.ArrayList();
                    int v3_2 = 0;
                    while(true) {
                        com.google.android.gms.internal.zzcby v4_5 = v2_1.getLong(0);
                        int v1_6 = this.zzauh().zzq(v2_1.getBlob(1));
                        if ((!v0_0.isEmpty()) && ((v1_6.length + v3_2) > p14)) {
                            break;
                        }
                        Object v6_7 = com.google.android.gms.internal.zzeye.zzm(v1_6, 0, v1_6.length);
                        com.google.android.gms.internal.zzcgk v7_3 = new com.google.android.gms.internal.zzcgk();
                        try {
                            v7_3.zza(v6_7);
                        } catch (int v1_9) {
                            this.zzaul().zzayd().zze("Failed to merge queued bundle. appId", com.google.android.gms.internal.zzcbw.zzjf(p12), v1_9);
                            int v1_8 = v3_2;
                        }
                        v1_8 = (v1_6.length + v3_2);
                        v0_0.add(android.util.Pair.create(v7_3, Long.valueOf(v4_5)));
                        if ((!v2_1.moveToNext()) || (v1_8 > p14)) {
                            break;
                        }
                        v3_2 = v1_8;
                    }
                    if (v2_1 == null) {
                        return v0_0;
                    } else {
                        v2_1.close();
                        return v0_0;
                    }
                } else {
                    v0_0 = java.util.Collections.emptyList();
                    if (v2_1 == null) {
                        return v0_0;
                    } else {
                        v2_1.close();
                        return v0_0;
                    }
                }
            } catch (Throwable v0_1) {
                if (v2_1 != null) {
                    v2_1.close();
                }
                throw v0_1;
            } catch (Throwable v0_3) {
                int v1_2 = v2_1;
                try {
                    this.zzaul().zzayd().zze("Error querying bundles. appId", com.google.android.gms.internal.zzcbw.zzjf(p12), v0_3);
                    v0_0 = java.util.Collections.emptyList();
                } catch (Throwable v0_1) {
                    v2_1 = v1_2;
                }
                if (v1_2 == 0) {
                    return v0_0;
                } else {
                    v1_2.close();
                    return v0_0;
                }
            }
        } catch (Throwable v0_1) {
            v2_1 = 0;
        } catch (Throwable v0_3) {
            v1_2 = 0;
        }
    }

Method com.google.android.gms.internal.zzcbs.zzdw() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzdw(int p14)
    {
        java.util.ArrayList v0_19;
        this.zzuj();
        this.zzatv();
        if (!this.zzipm) {
            java.util.ArrayList v10_1 = new java.util.ArrayList();
            if (this.getContext().getDatabasePath(com.google.android.gms.internal.zzcax.zzawj()).exists()) {
                int v9 = 5;
                int v12 = 0;
                while (v12 < 5) {
                    String v3_7 = 0;
                    try {
                        java.util.ArrayList v0_20 = this.getWritableDatabase();
                        try {
                            if (v0_20 != null) {
                                v0_20.beginTransaction();
                                int v2_2 = new String[3];
                                v2_2[0] = "rowid";
                                v2_2[1] = "type";
                                v2_2[2] = "entry";
                                int v2_0 = v0_20.query("messages", v2_2, 0, 0, 0, 0, "rowid asc", Integer.toString(100));
                                String v4_7 = -1;
                                try {
                                    while (v2_0.moveToNext()) {
                                        v4_7 = v2_0.getLong(0);
                                        String v1_41 = v2_0.getInt(1);
                                        String v6_0 = v2_0.getBlob(2);
                                        if (v1_41 != null) {
                                            if (v1_41 != 1) {
                                                if (v1_41 != 2) {
                                                    this.zzaul().zzayd().log("Unknown record type in local database");
                                                } else {
                                                    android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                    try {
                                                        v7_0.unmarshall(v6_0, 0, v6_0.length);
                                                        v7_0.setDataPosition(0);
                                                        String v1_6 = ((com.google.android.gms.internal.zzcav) com.google.android.gms.internal.zzcav.CREATOR.createFromParcel(v7_0));
                                                    } catch (String v1) {
                                                        this.zzaul().zzayd().log("Failed to load user property from local database");
                                                        v7_0.recycle();
                                                        v1_6 = 0;
                                                        if (v1_6 != null) {
                                                            v10_1.add(v1_6);
                                                        }
                                                    }
                                                    v7_0.recycle();
                                                }
                                            } else {
                                                android.os.Parcel v7_1 = android.os.Parcel.obtain();
                                                try {
                                                    v7_1.unmarshall(v6_0, 0, v6_0.length);
                                                    v7_1.setDataPosition(0);
                                                    String v1_14 = ((com.google.android.gms.internal.zzcft) com.google.android.gms.internal.zzcft.CREATOR.createFromParcel(v7_1));
                                                } catch (String v1) {
                                                    this.zzaul().zzayd().log("Failed to load user property from local database");
                                                    v7_1.recycle();
                                                    v1_14 = 0;
                                                    if (v1_14 != null) {
                                                        v10_1.add(v1_14);
                                                    }
                                                }
                                                v7_1.recycle();
                                            }
                                        } else {
                                            String v3_6 = android.os.Parcel.obtain();
                                            try {
                                                v3_6.unmarshall(v6_0, 0, v6_0.length);
                                                v3_6.setDataPosition(0);
                                                String v1_22 = ((com.google.android.gms.internal.zzcbk) com.google.android.gms.internal.zzcbk.CREATOR.createFromParcel(v3_6));
                                            } catch (String v1_25) {
                                                v3_6.recycle();
                                                throw v1_25;
                                            } catch (String v1) {
                                                this.zzaul().zzayd().log("Failed to load event from local database");
                                                v3_6.recycle();
                                            }
                                            v3_6.recycle();
                                            if (v1_22 != null) {
                                                v10_1.add(v1_22);
                                            }
                                        }
                                    }
                                } catch (String v1_28) {
                                    v3_7 = v0_20;
                                    if (v2_0 != 0) {
                                        v2_0.close();
                                    }
                                    if (v3_7 != null) {
                                        v3_7.close();
                                    }
                                    throw v1_28;
                                } catch (String v1_27) {
                                    v3_7 = v0_20;
                                    this.zzaul().zzayd().zzj("Error reading entries from local database", v1_27);
                                    this.zzipm = 1;
                                    if (v2_0 != 0) {
                                        v2_0.close();
                                    }
                                    if (v3_7 == null) {
                                        java.util.ArrayList v0_12 = v9;
                                        v12++;
                                        v9 = v0_12;
                                    } else {
                                        v3_7.close();
                                        v0_12 = v9;
                                    }
                                } catch (String v1_26) {
                                    v3_7 = v0_20;
                                    if (android.os.Build$VERSION.SDK_INT < 11) {
                                        if (v3_7 != null) {
                                            if (v3_7.inTransaction()) {
                                                v3_7.endTransaction();
                                            }
                                        }
                                        this.zzaul().zzayd().zzj("Error reading entries from local database", v1_26);
                                        this.zzipm = 1;
                                        v0_12 = v9;
                                    } else {
                                        if (!(v1_26 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                        } else {
                                            android.os.SystemClock.sleep(((long) v9));
                                            v0_12 = (v9 + 20);
                                        }
                                    }
                                    if (v2_0 != 0) {
                                        v2_0.close();
                                    }
                                    if (v3_7 == null) {
                                    } else {
                                        v3_7.close();
                                    }
                                }
                                String v6_6 = new String[1];
                                v6_6[0] = Long.toString(v4_7);
                                if (v0_20.delete("messages", "rowid <= ?", v6_6) < v10_1.size()) {
                                    this.zzaul().zzayd().log("Fewer entries removed from local database than expected");
                                }
                                v0_20.setTransactionSuccessful();
                                v0_20.endTransaction();
                                if (v2_0 != 0) {
                                    v2_0.close();
                                }
                                if (v0_20 != null) {
                                    v0_20.close();
                                }
                                v0_19 = v10_1;
                            } else {
                                this.zzipm = 1;
                                if (v0_20 != null) {
                                    v0_20.close();
                                }
                                v0_19 = 0;
                            }
                        } catch (String v1_28) {
                            v2_0 = 0;
                            v3_7 = v0_20;
                        } catch (String v1_27) {
                            v2_0 = 0;
                            v3_7 = v0_20;
                        } catch (String v1_26) {
                            v2_0 = 0;
                            v3_7 = v0_20;
                        }
                    } catch (java.util.ArrayList v0_23) {
                        v1_28 = v0_23;
                        v2_0 = 0;
                    } catch (java.util.ArrayList v0_22) {
                        v1_27 = v0_22;
                        v2_0 = 0;
                    } catch (java.util.ArrayList v0_21) {
                        v1_26 = v0_21;
                        v2_0 = 0;
                    } catch (java.util.ArrayList v0_18) {
                        v1_28 = v0_18;
                    }
                }
                this.zzaul().zzayf().log("Failed to read events from database in reasonable time");
                v0_19 = 0;
            } else {
                v0_19 = v10_1;
            }
        } else {
            v0_19 = 0;
        }
        return v0_19;
    }

Method com.google.android.gms.internal.zzccw.zzg() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean zzg(String p19, long p20)
    {
        this.zzauf().beginTransaction();
        try {
            com.google.android.gms.internal.zzccw$zza v15_1 = new com.google.android.gms.internal.zzccw$zza(this, 0);
            int v14_1 = this.zzauf();
            com.google.android.gms.internal.zzcgh v4_9 = 0;
            com.google.android.gms.internal.zzcgk v16_0 = this.zzitx;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzuj();
            v14_1.zzwk();
            int v3_4 = 0;
            try {
                String[] v12_0;
                com.google.android.gms.internal.zzcgh v13_0;
                com.google.android.gms.internal.zzcby v2_3 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v14_1.zzaul().zzayd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v4_9), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.zzaoc != null) && (!v15_1.zzaoc.isEmpty())) {
                        com.google.android.gms.internal.zzcby v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcby v2_27;
                    if (v2_24 != null) {
                        this.zzauf().setTransactionSuccessful();
                        this.zzauf().endTransaction();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcgh v13_1 = 0;
                        com.google.android.gms.internal.zzcgk v16_1 = v15_1.zziue;
                        com.google.android.gms.internal.zzcby v2_30 = new com.google.android.gms.internal.zzcgh[v15_1.zzaoc.size()];
                        v16_1.zzizf = v2_30;
                        String[] v12_1 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.zzaoc.size()) {
                            com.google.android.gms.internal.zzcby v2_171;
                            com.google.android.gms.internal.zzcgh v4_70;
                            if (!this.zzaui().zzao(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                boolean v17 = this.zzaui().zzap(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcgh v4_42 = 0;
                                    if (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcgi[0];
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx;
                                    com.google.android.gms.internal.zzcgi[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcby v2_173;
                                        com.google.android.gms.internal.zzcby v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_42;
                                            } else {
                                                v2_172.zzizb = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zzizb = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_42;
                                        }
                                        v5_35++;
                                        v4_42 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzaul().zzayj().zzj("Marking event as conversion", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_127 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcgi();
                                        v3_46.name = "_c";
                                        v3_46.zzizb = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_127;
                                    }
                                    if (v4_42 == null) {
                                        this.zzaul().zzayj().zzj("Marking event as real-time", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_144 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcgi();
                                        v3_53.name = "_r";
                                        v3_53.zzizb = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_144;
                                    }
                                    if (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 0, 0, 1).zzinc <= ((long) this.zziss.zzis(v15_1.zziue.zzci))) {
                                        v13_1 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcby v2_148 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziyx.length) {
                                            if (!"_r".equals(v2_148.zziyx[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcgh v4_58 = new com.google.android.gms.internal.zzcgi[(v2_148.zziyx.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziyx, 0, v4_58, 0, v3_62);
                                                }
                                                if (v3_62 < v4_58.length) {
                                                    System.arraycopy(v2_148.zziyx, (v3_62 + 1), v4_58, v3_62, (v4_58.length - v3_62));
                                                }
                                                v2_148.zziyx = v4_58;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfw.zzju(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) || ((!v17) || (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 1, 0, 0).zzina <= ((long) this.zziss.zzb(v15_1.zziue.zzci, com.google.android.gms.internal.zzcbm.zzioo))))) {
                                        v4_70 = v13_1;
                                    } else {
                                        this.zzaul().zzayf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                        com.google.android.gms.internal.zzcby v2_162 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcgh v4_66 = 0;
                                        com.google.android.gms.internal.zzcgi[] v7_33 = v2_162.zziyx;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            int v3_73 = v7_33[v6_34];
                                            if (!"_c".equals(v3_73.name)) {
                                                if (!"_err".equals(v3_73.name)) {
                                                    v3_73 = v4_66;
                                                } else {
                                                    v5_57 = 1;
                                                    v3_73 = v4_66;
                                                }
                                            }
                                            v6_34++;
                                            v4_66 = v3_73;
                                        }
                                        if ((v5_57 == 0) || (v4_66 == null)) {
                                            if (v4_66 == null) {
                                                this.zzaul().zzayd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                            } else {
                                                v4_66.name = "_err";
                                                v4_66.zzizb = Long.valueOf(10);
                                                v4_70 = v13_1;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgi[] v7_35 = new com.google.android.gms.internal.zzcgi[(v2_162.zziyx.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcgi[] v8_17 = v2_162.zziyx;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_72;
                                                com.google.android.gms.internal.zzcgi v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_66) {
                                                    v3_72 = v5_58;
                                                } else {
                                                    v3_72 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_72;
                                            }
                                            v2_162.zziyx = v7_35;
                                            v4_70 = v13_1;
                                        }
                                    }
                                } else {
                                    this.zzauh();
                                    if (!com.google.android.gms.internal.zzcfw.zzki(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_1 + 1);
                                v16_1.zzizf[v12_1] = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                v2_171 = v3_71;
                            } else {
                                com.google.android.gms.internal.zzcby v2_186;
                                this.zzaul().zzayf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci), this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                if ((!this.zzauh().zzkg(v15_1.zziue.zzci)) && (!this.zzauh().zzkh(v15_1.zziue.zzci))) {
                                    v2_186 = 0;
                                } else {
                                    v2_186 = 1;
                                }
                                if ((v2_186 != null) || ("_err".equals(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name))) {
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                } else {
                                    this.zzauh().zza(v15_1.zziue.zzci, 11, "_ev", ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name, 0);
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                }
                            }
                            v14_0++;
                            v12_1 = v2_171;
                            v13_1 = v4_70;
                        }
                        if (v12_1 < v15_1.zzaoc.size()) {
                            v16_1.zzizf = ((com.google.android.gms.internal.zzcgh[]) java.util.Arrays.copyOf(v16_1.zzizf, v12_1));
                        }
                        v16_1.zzizy = this.zza(v15_1.zziue.zzci, v15_1.zziue.zzizg, v16_1.zzizf);
                        v16_1.zzizi = Long.valueOf(nan);
                        v16_1.zzizj = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcby v2_46 = 0;
                        while (v2_46 < v16_1.zzizf.length) {
                            int v3_37 = v16_1.zzizf[v2_46];
                            if (v3_37.zziyy.longValue() < v16_1.zzizi.longValue()) {
                                v16_1.zzizi = v3_37.zziyy;
                            }
                            if (v3_37.zziyy.longValue() > v16_1.zzizj.longValue()) {
                                v16_1.zzizj = v3_37.zziyy;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.zziue.zzci;
                        com.google.android.gms.internal.zzcgi[] v7_18 = this.zzauf().zziw(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zzizf.length > 0) {
                                com.google.android.gms.internal.zzcgh v4_21;
                                com.google.android.gms.internal.zzcby v2_52 = v7_18.zzaus();
                                if (v2_52 == 0) {
                                    v4_21 = 0;
                                } else {
                                    v4_21 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizl = v4_21;
                                com.google.android.gms.internal.zzcgh v4_22 = v7_18.zzaur();
                                if (v4_22 != 0) {
                                    v2_52 = v4_22;
                                }
                                com.google.android.gms.internal.zzcby v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizk = v2_53;
                                v7_18.zzavb();
                                v16_1.zzizw = Integer.valueOf(((int) v7_18.zzauy()));
                                v7_18.zzal(v16_1.zzizi.longValue());
                                v7_18.zzam(v16_1.zzizj.longValue());
                                v16_1.zzily = v7_18.zzavj();
                                this.zzauf().zza(v7_18);
                            }
                        } else {
                            this.zzaul().zzayd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                        }
                        if (v16_1.zzizf.length > 0) {
                            com.google.android.gms.internal.zzcax.zzawk();
                            com.google.android.gms.internal.zzcby v2_68 = this.zzaui().zzjn(v15_1.zziue.zzci);
                            if ((v2_68 != null) && (v2_68.zziym != null)) {
                                v16_1.zzjad = v2_68.zziym;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.zziue.zzilu)) {
                                    this.zzaul().zzayf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                } else {
                                    v16_1.zzjad = Long.valueOf(-1);
                                }
                            }
                            this.zzauf().zza(v16_1, v13_1);
                        }
                        this.zzauf().zzae(v15_1.zziuf);
                        int v3_32 = this.zzauf();
                        com.google.android.gms.internal.zzcby v2_79 = v3_32.getWritableDatabase();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_29);
                        this.zzauf().setTransactionSuccessful();
                        if (v16_1.zzizf.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzauf().endTransaction();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_0 = v5_45;
                    v12_0 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p20);
                    v6_36 = v5_56;
                } else {
                    int v5_61 = new String[2];
                    v5_61[0] = String.valueOf(v16_0);
                    v5_61[1] = String.valueOf(p20);
                    v6_36 = v5_61;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcgh v4_0 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_0 = v5_8;
                    v12_0 = v4_0;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcgh v4_2 = new String[1];
                v4_2[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_0;
                v6_2[1] = v13_0;
                int v11_0 = v2_3.query("raw_events_metadata", v4_2, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcby v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v3_4 = v11_0;
                v4_9 = v12_0;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzeye.zzm(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcgh v4_5 = new com.google.android.gms.internal.zzcgk();
                try {
                    v4_5.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcby v2_2) {
                    v14_1.zzaul().zzayd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzaul().zzayf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                }
                int v6_4;
                int v5_15;
                v11_0.close();
                v15_1.zzb(v4_5);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcgh v4_11 = new String[4];
                v4_11[0] = "rowid";
                v4_11[1] = "name";
                v4_11[2] = "timestamp";
                v4_11[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_11, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzaul().zzayf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcby v2_1) {
                    v4_9 = v12_0;
                }
                do {
                    com.google.android.gms.internal.zzcgh v4_12 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcby v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcby v2_9 = com.google.android.gms.internal.zzeye.zzm(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcgh();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyy = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.zza(v4_12, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzaul().zzayd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcby v2_192) {
            this.zzauf().endTransaction();
            throw v2_192;
        }
    }

Method com.google.android.gms.internal.zzccw.zzg() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean zzg(String p19, long p20)
    {
        this.zzauf().beginTransaction();
        try {
            com.google.android.gms.internal.zzccw$zza v15_1 = new com.google.android.gms.internal.zzccw$zza(this, 0);
            int v14_1 = this.zzauf();
            com.google.android.gms.internal.zzcgh v4_9 = 0;
            com.google.android.gms.internal.zzcgk v16_0 = this.zzitx;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzuj();
            v14_1.zzwk();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcgh v13_0;
                String[] v12_0;
                com.google.android.gms.internal.zzcby v2_3 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v14_1.zzaul().zzayd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v4_9), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.zzaoc != null) && (!v15_1.zzaoc.isEmpty())) {
                        com.google.android.gms.internal.zzcby v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcby v2_27;
                    if (v2_24 != null) {
                        this.zzauf().setTransactionSuccessful();
                        this.zzauf().endTransaction();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcgh v13_1 = 0;
                        com.google.android.gms.internal.zzcgk v16_1 = v15_1.zziue;
                        com.google.android.gms.internal.zzcby v2_30 = new com.google.android.gms.internal.zzcgh[v15_1.zzaoc.size()];
                        v16_1.zzizf = v2_30;
                        String[] v12_1 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.zzaoc.size()) {
                            com.google.android.gms.internal.zzcgh v4_70;
                            com.google.android.gms.internal.zzcby v2_171;
                            if (!this.zzaui().zzao(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                boolean v17 = this.zzaui().zzap(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcgh v4_42 = 0;
                                    if (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcgi[0];
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx;
                                    com.google.android.gms.internal.zzcgi[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcby v2_173;
                                        com.google.android.gms.internal.zzcby v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_42;
                                            } else {
                                                v2_172.zzizb = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zzizb = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_42;
                                        }
                                        v5_35++;
                                        v4_42 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzaul().zzayj().zzj("Marking event as conversion", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_127 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcgi();
                                        v3_46.name = "_c";
                                        v3_46.zzizb = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_127;
                                    }
                                    if (v4_42 == null) {
                                        this.zzaul().zzayj().zzj("Marking event as real-time", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_144 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcgi();
                                        v3_53.name = "_r";
                                        v3_53.zzizb = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_144;
                                    }
                                    if (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 0, 0, 1).zzinc <= ((long) this.zziss.zzis(v15_1.zziue.zzci))) {
                                        v13_1 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcby v2_148 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziyx.length) {
                                            if (!"_r".equals(v2_148.zziyx[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcgh v4_58 = new com.google.android.gms.internal.zzcgi[(v2_148.zziyx.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziyx, 0, v4_58, 0, v3_62);
                                                }
                                                if (v3_62 < v4_58.length) {
                                                    System.arraycopy(v2_148.zziyx, (v3_62 + 1), v4_58, v3_62, (v4_58.length - v3_62));
                                                }
                                                v2_148.zziyx = v4_58;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfw.zzju(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) || ((!v17) || (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 1, 0, 0).zzina <= ((long) this.zziss.zzb(v15_1.zziue.zzci, com.google.android.gms.internal.zzcbm.zzioo))))) {
                                        v4_70 = v13_1;
                                    } else {
                                        this.zzaul().zzayf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                        com.google.android.gms.internal.zzcby v2_162 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcgh v4_66 = 0;
                                        com.google.android.gms.internal.zzcgi[] v7_33 = v2_162.zziyx;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            int v3_73 = v7_33[v6_34];
                                            if (!"_c".equals(v3_73.name)) {
                                                if (!"_err".equals(v3_73.name)) {
                                                    v3_73 = v4_66;
                                                } else {
                                                    v5_57 = 1;
                                                    v3_73 = v4_66;
                                                }
                                            }
                                            v6_34++;
                                            v4_66 = v3_73;
                                        }
                                        if ((v5_57 == 0) || (v4_66 == null)) {
                                            if (v4_66 == null) {
                                                this.zzaul().zzayd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                            } else {
                                                v4_66.name = "_err";
                                                v4_66.zzizb = Long.valueOf(10);
                                                v4_70 = v13_1;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgi[] v7_35 = new com.google.android.gms.internal.zzcgi[(v2_162.zziyx.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcgi[] v8_17 = v2_162.zziyx;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_72;
                                                com.google.android.gms.internal.zzcgi v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_66) {
                                                    v3_72 = v5_58;
                                                } else {
                                                    v3_72 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_72;
                                            }
                                            v2_162.zziyx = v7_35;
                                            v4_70 = v13_1;
                                        }
                                    }
                                } else {
                                    this.zzauh();
                                    if (!com.google.android.gms.internal.zzcfw.zzki(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_1 + 1);
                                v16_1.zzizf[v12_1] = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                v2_171 = v3_71;
                            } else {
                                com.google.android.gms.internal.zzcby v2_186;
                                this.zzaul().zzayf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci), this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                if ((!this.zzauh().zzkg(v15_1.zziue.zzci)) && (!this.zzauh().zzkh(v15_1.zziue.zzci))) {
                                    v2_186 = 0;
                                } else {
                                    v2_186 = 1;
                                }
                                if ((v2_186 != null) || ("_err".equals(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name))) {
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                } else {
                                    this.zzauh().zza(v15_1.zziue.zzci, 11, "_ev", ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name, 0);
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                }
                            }
                            v14_0++;
                            v12_1 = v2_171;
                            v13_1 = v4_70;
                        }
                        if (v12_1 < v15_1.zzaoc.size()) {
                            v16_1.zzizf = ((com.google.android.gms.internal.zzcgh[]) java.util.Arrays.copyOf(v16_1.zzizf, v12_1));
                        }
                        v16_1.zzizy = this.zza(v15_1.zziue.zzci, v15_1.zziue.zzizg, v16_1.zzizf);
                        v16_1.zzizi = Long.valueOf(nan);
                        v16_1.zzizj = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcby v2_46 = 0;
                        while (v2_46 < v16_1.zzizf.length) {
                            int v3_37 = v16_1.zzizf[v2_46];
                            if (v3_37.zziyy.longValue() < v16_1.zzizi.longValue()) {
                                v16_1.zzizi = v3_37.zziyy;
                            }
                            if (v3_37.zziyy.longValue() > v16_1.zzizj.longValue()) {
                                v16_1.zzizj = v3_37.zziyy;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.zziue.zzci;
                        com.google.android.gms.internal.zzcgi[] v7_18 = this.zzauf().zziw(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zzizf.length > 0) {
                                com.google.android.gms.internal.zzcgh v4_21;
                                com.google.android.gms.internal.zzcby v2_52 = v7_18.zzaus();
                                if (v2_52 == 0) {
                                    v4_21 = 0;
                                } else {
                                    v4_21 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizl = v4_21;
                                com.google.android.gms.internal.zzcgh v4_22 = v7_18.zzaur();
                                if (v4_22 != 0) {
                                    v2_52 = v4_22;
                                }
                                com.google.android.gms.internal.zzcby v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizk = v2_53;
                                v7_18.zzavb();
                                v16_1.zzizw = Integer.valueOf(((int) v7_18.zzauy()));
                                v7_18.zzal(v16_1.zzizi.longValue());
                                v7_18.zzam(v16_1.zzizj.longValue());
                                v16_1.zzily = v7_18.zzavj();
                                this.zzauf().zza(v7_18);
                            }
                        } else {
                            this.zzaul().zzayd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                        }
                        if (v16_1.zzizf.length > 0) {
                            com.google.android.gms.internal.zzcax.zzawk();
                            com.google.android.gms.internal.zzcby v2_68 = this.zzaui().zzjn(v15_1.zziue.zzci);
                            if ((v2_68 != null) && (v2_68.zziym != null)) {
                                v16_1.zzjad = v2_68.zziym;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.zziue.zzilu)) {
                                    this.zzaul().zzayf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                } else {
                                    v16_1.zzjad = Long.valueOf(-1);
                                }
                            }
                            this.zzauf().zza(v16_1, v13_1);
                        }
                        this.zzauf().zzae(v15_1.zziuf);
                        int v3_32 = this.zzauf();
                        com.google.android.gms.internal.zzcby v2_79 = v3_32.getWritableDatabase();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_29);
                        this.zzauf().setTransactionSuccessful();
                        if (v16_1.zzizf.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzauf().endTransaction();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_0 = v5_45;
                    v12_0 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p20);
                    v6_36 = v5_56;
                } else {
                    int v5_61 = new String[2];
                    v5_61[0] = String.valueOf(v16_0);
                    v5_61[1] = String.valueOf(p20);
                    v6_36 = v5_61;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcgh v4_0 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_0 = v5_8;
                    v12_0 = v4_0;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcgh v4_2 = new String[1];
                v4_2[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_0;
                v6_2[1] = v13_0;
                int v11_0 = v2_3.query("raw_events_metadata", v4_2, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcby v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v3_4 = v11_0;
                v4_9 = v12_0;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzeye.zzm(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcgh v4_5 = new com.google.android.gms.internal.zzcgk();
                try {
                    v4_5.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcby v2_2) {
                    v14_1.zzaul().zzayd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzaul().zzayf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                }
                int v5_15;
                int v6_4;
                v11_0.close();
                v15_1.zzb(v4_5);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcgh v4_11 = new String[4];
                v4_11[0] = "rowid";
                v4_11[1] = "name";
                v4_11[2] = "timestamp";
                v4_11[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_11, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzaul().zzayf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcby v2_1) {
                    v4_9 = v12_0;
                }
                do {
                    com.google.android.gms.internal.zzcgh v4_12 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcby v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcby v2_9 = com.google.android.gms.internal.zzeye.zzm(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcgh();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyy = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.zza(v4_12, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzaul().zzayd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcby v2_192) {
            this.zzauf().endTransaction();
            throw v2_192;
        }
    }

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


    private final void zzc(java.util.List p7, long p8)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.zzln("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.zzay) v2.next());
                android.content.ContentValues v3_1 = new android.content.ContentValues();
                v3_1.put("expires", Long.valueOf(p8));
                v3_1.put("key", v0_2.zzbff);
                v3_1.put("value", v0_2.zzjqz);
                v1.insert("datalayer", 0, v3_1);
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzat.zzbdg() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzbdg()
    {
        java.util.ArrayList v0_3;
        java.util.ArrayList v0_6 = this.zzln("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.zzay(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.zzat.zzef() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzef(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.zzln("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.zzdj.zzcr(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.zzdj.zzcr("Invalid maxEntries specified. Skipping.");
            v0_12 = v9_1;
        }
        return v0_12;
    }

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


    private static boolean zza(String p10, android.database.sqlite.SQLiteDatabase p11)
    {
        String v9 = 0;
        try {
            Throwable v2_2 = new String[1];
            v2_2[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p10;
            String v1_0 = p11.query("SQLITE_MASTER", v2_2, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_6) {
                Throwable v2_0 = v0_6;
                v9 = v1_0;
                if (v9 != null) {
                    v9.close();
                }
                throw v2_0;
            } catch (int v0) {
                int v0_2 = v1_0;
                try {
                    String v1_2 = String.valueOf(p10);
                } catch (String v1_5) {
                    v2_0 = v1_5;
                    v9 = v0_2;
                }
                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.zzdj.zzcr(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) {
            v2_0 = v0_3;
        } catch (int v0) {
            v0_2 = 0;
        }
    }

Method com.google.android.gms.tagmanager.zzec.zzbef() calling method android.database.sqlite.SQLiteDatabase.query()


    private final int zzbef()
    {
        String v8 = 0;
        String v9 = 0;
        String v0_4 = this.zzln("Error opening database for getNumStoredHits.");
        if (v0_4 != null) {
            try {
                Throwable v2_2 = new String[2];
                v2_2[0] = "hit_id";
                v2_2[1] = "hit_first_send_time";
                Throwable v1_0 = v0_4.query("gtm_hits", v2_2, "hit_first_send_time=0", 0, 0, 0, 0);
                try {
                    String v0_3 = v1_0.getCount();
                } catch (String v0_5) {
                    Throwable v2_0 = v0_5;
                    v9 = v1_0;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v2_0;
                } catch (String v0) {
                    String v0_1 = v1_0;
                    try {
                        com.google.android.gms.tagmanager.zzdj.zzcr("Error getting num untried hits");
                    } catch (Throwable v1_2) {
                        v2_0 = v1_2;
                        v9 = v0_1;
                    }
                    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) {
                v2_0 = v0_2;
            } catch (String v0) {
                v0_1 = 0;
            }
        }
        return v8;
    }

Method com.google.android.gms.tagmanager.zzec.zzel() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzel(int p17)
    {
        int v11_0;
        int v12_1 = new java.util.ArrayList();
        int v2_21 = this.zzln("Error opening database for peekHits");
        if (v2_21 != 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_5 = new Object[1];
                v10_5[0] = "hit_id";
                String v13 = v2_21.query("gtm_hits", v4_0, 0, 0, 0, 0, String.format("%s ASC", v10_5), Integer.toString(40));
                try {
                    v11_0 = new java.util.ArrayList();
                    try {
                        if (v13.moveToFirst()) {
                            do {
                                v11_0.add(new com.google.android.gms.tagmanager.zzbx(v13.getLong(0), v13.getLong(1), v13.getLong(2)));
                            } while(v13.moveToNext());
                        }
                    } catch (int v2_20) {
                        com.google.android.gms.tagmanager.zzbx v3_5 = v13;
                        try {
                            int v2_23 = String.valueOf(v2_20.getMessage());
                        } catch (int v2_26) {
                            v13 = v3_5;
                            if (v13 != null) {
                                v13.close();
                            }
                            throw v2_26;
                        }
                        if (v2_23.length() == 0) {
                            int v2_25 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v2_25 = "Error in peekHits fetching hitIds: ".concat(v2_23);
                        }
                        com.google.android.gms.tagmanager.zzdj.zzcr(v2_25);
                        if (v3_5 == null) {
                            return v11_0;
                        } else {
                            v3_5.close();
                            return v11_0;
                        }
                    }
                    if (v13 != null) {
                        v13.close();
                    }
                    try {
                        int v4_11 = new String[2];
                        v4_11[0] = "hit_id";
                        v4_11[1] = "hit_url";
                        String v10_1 = new Object[1];
                        v10_1[0] = "hit_id";
                        com.google.android.gms.tagmanager.zzbx v3_0 = v2_21.query("gtm_hits", v4_11, 0, 0, 0, 0, String.format("%s ASC", v10_1), Integer.toString(40));
                        try {
                            if (v3_0.moveToFirst()) {
                                int v4_1 = 0;
                                while(true) {
                                    if (((android.database.sqlite.SQLiteCursor) v3_0).getWindow().getNumRows() <= 0) {
                                        int v6_1 = new Object[1];
                                        v6_1[0] = Long.valueOf(((com.google.android.gms.tagmanager.zzbx) v11_0.get(v4_1)).zzbdr());
                                        com.google.android.gms.tagmanager.zzdj.zzcr(String.format("HitString for hitId %d too large.  Hit will be deleted.", v6_1));
                                    } else {
                                        ((com.google.android.gms.tagmanager.zzbx) v11_0.get(v4_1)).zzls(v3_0.getString(1));
                                    }
                                    if (!v3_0.moveToNext()) {
                                        break;
                                    }
                                    v4_1++;
                                }
                            }
                        } catch (int v2_17) {
                            v13 = v3_0;
                            if (v13 != null) {
                                v13.close();
                            }
                            throw v2_17;
                        } catch (int v2_0) {
                            v13 = v3_0;
                            int v2_13 = String.valueOf(v2_0.getMessage());
                            if (v2_13.length() == 0) {
                                int 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.zzdj.zzcr(v2_15);
                            int v4_4 = new java.util.ArrayList();
                            int v5_5 = 0;
                            int v2_16 = ((java.util.ArrayList) v11_0);
                            int v7_2 = v2_16.size();
                            int v6_3 = 0;
                        }
                        if (v3_0 != null) {
                            v3_0.close();
                        }
                    } catch (int v2_17) {
                    } catch (int v2_0) {
                    }
                } catch (int v2_20) {
                    v3_5 = v13;
                    v11_0 = v12_1;
                }
            } catch (int v2_26) {
            } catch (int v2_20) {
                v3_5 = v13;
                v11_0 = v12_1;
            }
        } else {
            v11_0 = v12_1;
        }
        return v11_0;
    }

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


    private static boolean zza(String p10, android.database.sqlite.SQLiteDatabase p11)
    {
        String v9 = 0;
        try {
            Throwable v2_2 = new String[1];
            v2_2[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p10;
            String v1_0 = p11.query("SQLITE_MASTER", v2_2, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_6) {
                Throwable v2_0 = v0_6;
                v9 = v1_0;
                if (v9 != null) {
                    v9.close();
                }
                throw v2_0;
            } catch (int v0) {
                int v0_2 = v1_0;
                try {
                    String v1_2 = String.valueOf(p10);
                } catch (String v1_5) {
                    v2_0 = v1_5;
                    v9 = v0_2;
                }
                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.zzdj.zzcr(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) {
            v2_0 = v0_3;
        } catch (int v0) {
            v0_2 = 0;
        }
    }

Method com.google.android.gms.internal.zzand.zzq() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzq(java.util.List p9)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p9);
        com.google.android.gms.analytics.zzj.zzuj();
        this.zzwk();
        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.zzand.zzwz() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int zzwz()
    {
        int v0 = 0;
        com.google.android.gms.analytics.zzj.zzuj();
        this.zzwk();
        if (this.zzdpm.zzu(86400000)) {
            this.zzdpm.start();
            this.zzdm("Deleting stale hits (if any)");
            String v1_1 = this.getWritableDatabase();
            String[] v6_1 = new String[1];
            v6_1[0] = Long.toString((this.zzvx().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.zzang.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long zza(com.google.android.gms.internal.zzamx p11, boolean p12)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        this.zzwk();
        com.google.android.gms.analytics.zzj.zzuj();
        try {
            this.zzdpp.beginTransaction();
            String v0_22 = this.zzdpp;
            String v2_6 = p11.zzwr();
            String v1_13 = p11.zzve();
            com.google.android.gms.common.internal.zzbp.zzgg(v1_13);
            v0_22.zzwk();
            com.google.android.gms.analytics.zzj.zzuj();
            com.google.android.gms.internal.zzand v4_0 = v0_22.getWritableDatabase();
            int v7_2 = new String[2];
            v7_2[0] = String.valueOf(v2_6);
            v7_2[1] = v1_13;
            String v1_9 = v4_0.delete("properties", "app_uid=? AND cid<>?", v7_2);
        } catch (String v0_11) {
            try {
                this.zzdpp.endTransaction();
            } catch (String v1_5) {
                this.zze("Failed to end transaction", v1_5);
            }
            throw v0_11;
        } catch (String v0_7) {
            this.zze("Failed to update Analytics property", v0_7);
            try {
                this.zzdpp.endTransaction();
            } catch (String v0_9) {
                this.zze("Failed to end transaction", v0_9);
            }
            String v0_10 = -1;
            return v0_10;
        }
        if (v1_9 > null) {
            v0_22.zza("Deleted property records", Integer.valueOf(v1_9));
        }
        String v2_5 = this.zzdpp.zza(p11.zzwr(), p11.zzve(), p11.zzws());
        p11.zzm((1 + v2_5));
        com.google.android.gms.internal.zzand v4_2 = this.zzdpp;
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        v4_2.zzwk();
        com.google.android.gms.analytics.zzj.zzuj();
        android.database.sqlite.SQLiteDatabase v5_1 = v4_2.getWritableDatabase();
        String v0_23 = p11.zziy();
        com.google.android.gms.common.internal.zzbp.zzu(v0_23);
        long v6_3 = new android.net.Uri$Builder();
        int v7_3 = v0_23.entrySet().iterator();
        while (v7_3.hasNext()) {
            String v0_15 = ((java.util.Map$Entry) v7_3.next());
            v6_3.appendQueryParameter(((String) v0_15.getKey()), ((String) v0_15.getValue()));
        }
        String v1_12;
        String v0_27 = v6_3.build().getEncodedQuery();
        if (v0_27 != null) {
            v1_12 = v0_27;
        } else {
            v1_12 = "";
        }
        String v0_33;
        long v6_5 = new android.content.ContentValues();
        v6_5.put("app_uid", Long.valueOf(p11.zzwr()));
        v6_5.put("cid", p11.zzve());
        v6_5.put("tid", p11.zzws());
        if (!p11.zzwt()) {
            v0_33 = 0;
        } else {
            v0_33 = 1;
        }
        v6_5.put("adid", Integer.valueOf(v0_33));
        v6_5.put("hits_count", Long.valueOf(p11.zzwu()));
        v6_5.put("params", v1_12);
        try {
            if (v5_1.insertWithOnConflict("properties", 0, v6_5, 5) == -1) {
                v4_2.zzdq("Failed to insert/update a property (got -1)");
            }
        } catch (String v0_5) {
            v4_2.zze("Error storing a property", v0_5);
        }
        this.zzdpp.setTransactionSuccessful();
        try {
            this.zzdpp.endTransaction();
        } catch (String v0_13) {
            this.zze("Failed to end transaction", v0_13);
        }
        v0_10 = v2_5;
        return v0_10;
    }

Method com.google.android.gms.internal.zzang.zzvr() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzvr()
    {
        com.google.android.gms.analytics.zzj.zzuj();
        this.zzwk();
        this.zzdm("Delete all hits from local store");
        try {
            String v0_7 = this.zzdpp;
            com.google.android.gms.analytics.zzj.zzuj();
            v0_7.zzwk();
            v0_7.getWritableDatabase().delete("hits2", 0, 0);
            String v0_0 = this.zzdpp;
            com.google.android.gms.analytics.zzj.zzuj();
            v0_0.zzwk();
            v0_0.getWritableDatabase().delete("properties", 0, 0);
            this.zzxk();
        } catch (String v0_3) {
            this.zzd("Failed to delete hits from store", v0_3);
        }
        this.zzxh();
        if (this.zzdps.zzwv()) {
            this.zzdm("Device service unavailable. Can\'t clear hits stored on the device service.");
        }
        return;
    }

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


    private final boolean zzc(String p9, java.util.List p10)
    {
        String v2 = 0;
        com.google.android.gms.common.internal.zzbp.zzgg(p9);
        this.zzwk();
        this.zzuj();
        Object v4_1 = this.getWritableDatabase();
        try {
            int v1_11 = new String[1];
            v1_11[0] = p9;
            int v0_1 = this.zzb("select count(1) from audience_filter_values where app_id=?", v1_11);
            String v5_4 = Math.max(0, Math.min(2000, this.zzaun().zzb(p9, com.google.android.gms.internal.zzcbm.zzipg)));
        } catch (int v0_3) {
            this.zzaul().zzayd().zze("Database error querying filters. appId", com.google.android.gms.internal.zzcbw.zzjf(p9), v0_3);
            return v2;
        }
        if (v0_1 > ((long) v5_4)) {
            String[] v6_4 = new java.util.ArrayList();
            int v1_0 = 0;
            while (v1_0 < p10.size()) {
                int v0_16 = ((Integer) p10.get(v1_0));
                if ((v0_16 == 0) || (!(v0_16 instanceof Integer))) {
                    return v2;
                } else {
                    v6_4.add(Integer.toString(v0_16.intValue()));
                    v1_0++;
                }
            }
            int v0_6 = android.text.TextUtils.join(",", v6_4);
            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_14 = new String[2];
            v6_14[0] = p9;
            v6_14[1] = Integer.toString(v5_4);
            if (v4_1.delete("audience_filter_values", v0_13, v6_14) <= 0) {
                return v2;
            } else {
                v2 = 1;
                return v2;
            }
        } else {
            return v2;
        }
    }

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


    final void zza(String p13, com.google.android.gms.internal.zzcfx[] p14)
    {
        int v0_0 = 0;
        this.zzwk();
        this.zzuj();
        com.google.android.gms.common.internal.zzbp.zzgg(p13);
        com.google.android.gms.common.internal.zzbp.zzu(p14);
        android.database.sqlite.SQLiteDatabase v5 = this.getWritableDatabase();
        v5.beginTransaction();
        try {
            this.zzwk();
            this.zzuj();
            com.google.android.gms.common.internal.zzbp.zzgg(p13);
            int v1_0 = this.getWritableDatabase();
            int v6_1 = new String[1];
            v6_1[0] = p13;
            v1_0.delete("property_filters", "app_id=?", v6_1);
            int v6_3 = new String[1];
            v6_3[0] = p13;
            v1_0.delete("event_filters", "app_id=?", v6_3);
            int v6_4 = p14.length;
            int v1_1 = 0;
        } catch (int v0_1) {
            v5.endTransaction();
            throw v0_1;
        }
        while (v1_1 < v6_4) {
            int v3_8 = p14[v1_1];
            this.zzwk();
            this.zzuj();
            com.google.android.gms.common.internal.zzbp.zzgg(p13);
            com.google.android.gms.common.internal.zzbp.zzu(v3_8);
            com.google.android.gms.common.internal.zzbp.zzu(v3_8.zzixl);
            com.google.android.gms.common.internal.zzbp.zzu(v3_8.zzixk);
            if (v3_8.zzixj != null) {
                String v7_6 = v3_8.zzixj.intValue();
                String v8_3 = v3_8.zzixl;
                int v2_3 = 0;
                while (v2_3 < v8_3.length) {
                    if (v8_3[v2_3].zzixn != null) {
                        v2_3++;
                    } else {
                        this.zzaul().zzayf().zze("Event filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.internal.zzcbw.zzjf(p13), v3_8.zzixj);
                    }
                }
                String v8_4 = v3_8.zzixk;
                int v2_0 = 0;
                while (v2_0 < v8_4.length) {
                    if (v8_4[v2_0].zzixn != null) {
                        v2_0++;
                    } else {
                        this.zzaul().zzayf().zze("Property filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.internal.zzcbw.zzjf(p13), v3_8.zzixj);
                    }
                }
                String v8_5 = v3_8.zzixl;
                int v2_15 = 0;
                while (v2_15 < v8_5.length) {
                    if (this.zza(p13, v7_6, v8_5[v2_15])) {
                        v2_15++;
                    } else {
                        int v2_16 = 0;
                    }
                    if (v2_16 != 0) {
                        String v8_6 = v3_8.zzixk;
                        int v3_9 = 0;
                        while (v3_9 < v8_6.length) {
                            if (this.zza(p13, v7_6, v8_6[v3_9])) {
                                v3_9++;
                            } else {
                                v2_16 = 0;
                                break;
                            }
                        }
                    }
                    if (v2_16 == 0) {
                        this.zzwk();
                        this.zzuj();
                        com.google.android.gms.common.internal.zzbp.zzgg(p13);
                        int v2_17 = this.getWritableDatabase();
                        String[] v9_7 = new String[2];
                        v9_7[0] = p13;
                        v9_7[1] = String.valueOf(v7_6);
                        v2_17.delete("property_filters", "app_id=? and audience_id=?", v9_7);
                        String[] v9_1 = new String[2];
                        v9_1[0] = p13;
                        v9_1[1] = String.valueOf(v7_6);
                        v2_17.delete("event_filters", "app_id=? and audience_id=?", v9_1);
                    }
                }
                v2_16 = 1;
            } else {
                this.zzaul().zzayf().zzj("Audience with no ID. appId", com.google.android.gms.internal.zzcbw.zzjf(p13));
            }
            v1_1++;
        }
        int v1_3 = new java.util.ArrayList();
        int v2_10 = p14.length;
        while (v0_0 < v2_10) {
            v1_3.add(p14[v0_0].zzixj);
            v0_0++;
        }
        this.zzc(p13, v1_3);
        v5.setTransactionSuccessful();
        v5.endTransaction();
        return;
    }

Method com.google.android.gms.internal.zzcay.zzae() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzae(java.util.List p7)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p7);
        this.zzuj();
        this.zzwk();
        String v2_3 = new StringBuilder("rowid in (");
        com.google.android.gms.internal.zzcby 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.zzaul().zzayd().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.zzcay.zzag() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzag(String p6, String p7)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p6);
        com.google.android.gms.common.internal.zzbp.zzgg(p7);
        this.zzuj();
        this.zzwk();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.getWritableDatabase();
            Object v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.zzaul().zzayj().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.zzaul().zzayd().zzd("Error deleting user attribute. appId", com.google.android.gms.internal.zzcbw.zzjf(p6), this.zzaug().zzje(p7), v0_2);
        }
        return;
    }

Method com.google.android.gms.internal.zzcay.zzaj() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int zzaj(String p7, String p8)
    {
        String vtmp1 = com.google.android.gms.common.internal.zzbp.zzgg(p7);
        com.google.android.gms.common.internal.zzbp.zzgg(p8);
        this.zzuj();
        this.zzwk();
        try {
            android.database.sqlite.SQLiteException v1_1 = this.getWritableDatabase();
            Object v4_0 = new String[2];
            v4_0[0] = p7;
            v4_0[1] = p8;
            int v0 = v1_1.delete("conditional_properties", "app_id=? and name=?", v4_0);
        } catch (android.database.sqlite.SQLiteException v1_0) {
            this.zzaul().zzayd().zzd("Error deleting conditional property", com.google.android.gms.internal.zzcbw.zzjf(p7), this.zzaug().zzje(p8), v1_0);
        }
        return v0;
    }

Method com.google.android.gms.internal.zzcay.zzaxk() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void zzaxk()
    {
        this.zzuj();
        this.zzwk();
        if (this.zzaxq()) {
            Integer v0_12 = this.zzaum().zziqs.get();
            String v2_1 = this.zzvx().elapsedRealtime();
            if (Math.abs((v2_1 - v0_12)) > com.google.android.gms.internal.zzcax.zzawn()) {
                this.zzaum().zziqs.set(v2_1);
                this.zzuj();
                this.zzwk();
                if (this.zzaxq()) {
                    Integer v0_7 = this.getWritableDatabase();
                    com.google.android.gms.internal.zzcby v1_1 = new String[2];
                    v1_1[0] = String.valueOf(this.zzvx().currentTimeMillis());
                    v1_1[1] = String.valueOf(com.google.android.gms.internal.zzcax.zzawm());
                    Integer v0_8 = v0_7.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_1);
                    if (v0_8 > null) {
                        this.zzaul().zzayj().zzj("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_8));
                    }
                }
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcay.zzix() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long zzix(String p7)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p7);
        this.zzuj();
        this.zzwk();
        try {
            long v0_3 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcby v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.zzaun().zzb(p7, com.google.android.gms.internal.zzcbm.zzioq))));
            String[] v4_1 = new String[2];
            v4_1[0] = p7;
            v4_1[1] = v1_2;
            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.zzaul().zzayd().zze("Error deleting over the limit events. appId", com.google.android.gms.internal.zzcbw.zzjf(p7), v0_2);
            v0_1 = 0;
        }
        return v0_1;
    }

Method com.google.android.gms.internal.zzcbs.zzb() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean zzb(int p14, byte[] p15)
    {
        int v0_3;
        this.zzatv();
        this.zzuj();
        if (!this.zzipm) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            int v0_1 = 5;
            com.google.android.gms.internal.zzcax.zzawt();
            int v6 = 0;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzcby v1_0) {
                    this.zzaul().zzayd().zzj("Error writing entry to local database", v1_0);
                    this.zzipm = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                        v6++;
                    } else {
                        v3.close();
                    }
                    v3.insertOrThrow("messages", 0, v7_1);
                    v3.setTransactionSuccessful();
                    v3.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 1;
                } catch (com.google.android.gms.internal.zzcby v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzaul().zzayd().zzj("Error writing entry to local database", v1_20);
                        this.zzipm = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                    } else {
                        v3.close();
                    }
                } catch (int v0_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_2;
                }
                if (v3 != null) {
                    v3.beginTransaction();
                    Long v4_4 = 0;
                    v2 = v3.rawQuery("select count(1) from messages", 0);
                    if ((v2 != null) && (v2.moveToFirst())) {
                        v4_4 = v2.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzaul().zzayd().log("Data loss, local db full");
                        Long v4_6 = ((100000 - v4_4) + 1);
                        String[] v9_1 = new String[1];
                        v9_1[0] = Long.toString(v4_6);
                        long v8_6 = ((long) v3.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v9_1));
                        if (v8_6 != v4_6) {
                            this.zzaul().zzayd().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_6), Long.valueOf(v8_6), Long.valueOf((v4_6 - v8_6)));
                        }
                    }
                } else {
                    this.zzipm = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzaul().zzayf().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method com.google.android.gms.internal.zzcbs.zzdw() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final java.util.List zzdw(int p14)
    {
        java.util.ArrayList v0_19;
        this.zzuj();
        this.zzatv();
        if (!this.zzipm) {
            java.util.ArrayList v10_1 = new java.util.ArrayList();
            if (this.getContext().getDatabasePath(com.google.android.gms.internal.zzcax.zzawj()).exists()) {
                int v9 = 5;
                int v12 = 0;
                while (v12 < 5) {
                    String v3_7 = 0;
                    try {
                        java.util.ArrayList v0_20 = this.getWritableDatabase();
                        try {
                            if (v0_20 != null) {
                                v0_20.beginTransaction();
                                int v2_2 = new String[3];
                                v2_2[0] = "rowid";
                                v2_2[1] = "type";
                                v2_2[2] = "entry";
                                int v2_0 = v0_20.query("messages", v2_2, 0, 0, 0, 0, "rowid asc", Integer.toString(100));
                                String v4_7 = -1;
                                try {
                                    while (v2_0.moveToNext()) {
                                        v4_7 = v2_0.getLong(0);
                                        String v1_41 = v2_0.getInt(1);
                                        String v6_0 = v2_0.getBlob(2);
                                        if (v1_41 != null) {
                                            if (v1_41 != 1) {
                                                if (v1_41 != 2) {
                                                    this.zzaul().zzayd().log("Unknown record type in local database");
                                                } else {
                                                    android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                    try {
                                                        v7_0.unmarshall(v6_0, 0, v6_0.length);
                                                        v7_0.setDataPosition(0);
                                                        String v1_6 = ((com.google.android.gms.internal.zzcav) com.google.android.gms.internal.zzcav.CREATOR.createFromParcel(v7_0));
                                                    } catch (String v1) {
                                                        this.zzaul().zzayd().log("Failed to load user property from local database");
                                                        v7_0.recycle();
                                                        v1_6 = 0;
                                                        if (v1_6 != null) {
                                                            v10_1.add(v1_6);
                                                        }
                                                    }
                                                    v7_0.recycle();
                                                }
                                            } else {
                                                android.os.Parcel v7_1 = android.os.Parcel.obtain();
                                                try {
                                                    v7_1.unmarshall(v6_0, 0, v6_0.length);
                                                    v7_1.setDataPosition(0);
                                                    String v1_14 = ((com.google.android.gms.internal.zzcft) com.google.android.gms.internal.zzcft.CREATOR.createFromParcel(v7_1));
                                                } catch (String v1) {
                                                    this.zzaul().zzayd().log("Failed to load user property from local database");
                                                    v7_1.recycle();
                                                    v1_14 = 0;
                                                    if (v1_14 != null) {
                                                        v10_1.add(v1_14);
                                                    }
                                                }
                                                v7_1.recycle();
                                            }
                                        } else {
                                            String v3_6 = android.os.Parcel.obtain();
                                            try {
                                                v3_6.unmarshall(v6_0, 0, v6_0.length);
                                                v3_6.setDataPosition(0);
                                                String v1_22 = ((com.google.android.gms.internal.zzcbk) com.google.android.gms.internal.zzcbk.CREATOR.createFromParcel(v3_6));
                                            } catch (String v1_25) {
                                                v3_6.recycle();
                                                throw v1_25;
                                            } catch (String v1) {
                                                this.zzaul().zzayd().log("Failed to load event from local database");
                                                v3_6.recycle();
                                            }
                                            v3_6.recycle();
                                            if (v1_22 != null) {
                                                v10_1.add(v1_22);
                                            }
                                        }
                                    }
                                } catch (String v1_28) {
                                    v3_7 = v0_20;
                                    if (v2_0 != 0) {
                                        v2_0.close();
                                    }
                                    if (v3_7 != null) {
                                        v3_7.close();
                                    }
                                    throw v1_28;
                                } catch (String v1_27) {
                                    v3_7 = v0_20;
                                    this.zzaul().zzayd().zzj("Error reading entries from local database", v1_27);
                                    this.zzipm = 1;
                                    if (v2_0 != 0) {
                                        v2_0.close();
                                    }
                                    if (v3_7 == null) {
                                        java.util.ArrayList v0_12 = v9;
                                        v12++;
                                        v9 = v0_12;
                                    } else {
                                        v3_7.close();
                                        v0_12 = v9;
                                    }
                                } catch (String v1_26) {
                                    v3_7 = v0_20;
                                    if (android.os.Build$VERSION.SDK_INT < 11) {
                                        if (v3_7 != null) {
                                            if (v3_7.inTransaction()) {
                                                v3_7.endTransaction();
                                            }
                                        }
                                        this.zzaul().zzayd().zzj("Error reading entries from local database", v1_26);
                                        this.zzipm = 1;
                                        v0_12 = v9;
                                    } else {
                                        if (!(v1_26 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                        } else {
                                            android.os.SystemClock.sleep(((long) v9));
                                            v0_12 = (v9 + 20);
                                        }
                                    }
                                    if (v2_0 != 0) {
                                        v2_0.close();
                                    }
                                    if (v3_7 == null) {
                                    } else {
                                        v3_7.close();
                                    }
                                }
                                String v6_6 = new String[1];
                                v6_6[0] = Long.toString(v4_7);
                                if (v0_20.delete("messages", "rowid <= ?", v6_6) < v10_1.size()) {
                                    this.zzaul().zzayd().log("Fewer entries removed from local database than expected");
                                }
                                v0_20.setTransactionSuccessful();
                                v0_20.endTransaction();
                                if (v2_0 != 0) {
                                    v2_0.close();
                                }
                                if (v0_20 != null) {
                                    v0_20.close();
                                }
                                v0_19 = v10_1;
                            } else {
                                this.zzipm = 1;
                                if (v0_20 != null) {
                                    v0_20.close();
                                }
                                v0_19 = 0;
                            }
                        } catch (String v1_28) {
                            v2_0 = 0;
                            v3_7 = v0_20;
                        } catch (String v1_27) {
                            v2_0 = 0;
                            v3_7 = v0_20;
                        } catch (String v1_26) {
                            v2_0 = 0;
                            v3_7 = v0_20;
                        }
                    } catch (java.util.ArrayList v0_23) {
                        v1_28 = v0_23;
                        v2_0 = 0;
                    } catch (java.util.ArrayList v0_22) {
                        v1_27 = v0_22;
                        v2_0 = 0;
                    } catch (java.util.ArrayList v0_21) {
                        v1_26 = v0_21;
                        v2_0 = 0;
                    } catch (java.util.ArrayList v0_18) {
                        v1_28 = v0_18;
                    }
                }
                this.zzaul().zzayf().log("Failed to read events from database in reasonable time");
                v0_19 = 0;
            } else {
                v0_19 = v10_1;
            }
        } else {
            v0_19 = 0;
        }
        return v0_19;
    }

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


    protected final void zza(int p10, Throwable p11, byte[] p12)
    {
        this.zzauk().zzuj();
        this.zzwk();
        try {
            if (p12 == null) {
                p12 = new byte[0];
            }
        } catch (boolean v0_12) {
            this.zziua = 0;
            this.zzazm();
            throw v0_12;
        }
        boolean v0_29 = this.zzitt;
        this.zzitt = 0;
        if (((p10 != 200) && (p10 != 204)) || (p11 != null)) {
            boolean v0_20;
            this.zzaul().zzayj().zze("Network upload failed. Will retry later. code, error", Integer.valueOf(p10), p11);
            this.zzaum().zziqq.set(this.zzasc.currentTimeMillis());
            if ((p10 != 503) && (p10 != 429)) {
                v0_20 = 0;
            } else {
                v0_20 = 1;
            }
            if (v0_20) {
                this.zzaum().zziqr.set(this.zzasc.currentTimeMillis());
            }
            this.zzazi();
        } else {
            try {
                this.zzaum().zziqp.set(this.zzasc.currentTimeMillis());
                this.zzaum().zziqq.set(0);
                this.zzazi();
                this.zzaul().zzayj().zze("Successful upload. Got network response. code, size", Integer.valueOf(p10), Integer.valueOf(p12.length));
                this.zzauf().beginTransaction();
                try {
                    String v3_15 = v0_29.iterator();
                } catch (boolean v0_7) {
                    this.zzauf().endTransaction();
                    throw v0_7;
                }
                while (v3_15.hasNext()) {
                    boolean v0_1 = ((Long) v3_15.next());
                    com.google.android.gms.internal.zzcay v4_0 = this.zzauf();
                    String v6_0 = v0_1.longValue();
                    v4_0.zzuj();
                    v4_0.zzwk();
                    boolean v0_2 = v4_0.getWritableDatabase();
                    String[] v5_1 = new String[1];
                    v5_1[0] = String.valueOf(v6_0);
                    try {
                        if (v0_2.delete("queue", "rowid=?", v5_1) != 1) {
                            throw new android.database.sqlite.SQLiteException("Deleted fewer rows from queue than expected");
                        }
                    } catch (boolean v0_6) {
                        v4_0.zzaul().zzayd().zzj("Failed to delete a bundle in a queue table", v0_6);
                        throw v0_6;
                    }
                }
                this.zzauf().setTransactionSuccessful();
                this.zzauf().endTransaction();
                if ((!this.zzaza().zzyx()) || (!this.zzazh())) {
                    this.zzitx = -1;
                    this.zzazi();
                } else {
                    this.zzazg();
                }
                this.zzity = 0;
            } catch (boolean v0_8) {
                this.zzaul().zzayd().zzj("Database error while trying to delete uploaded bundles", v0_8);
                this.zzity = this.zzasc.elapsedRealtime();
                this.zzaul().zzayj().zzj("Disable upload, time", Long.valueOf(this.zzity));
            }
        }
        this.zziua = 0;
        this.zzazm();
        return;
    }

Method com.google.android.gms.internal.zzccw.zze() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zze(com.google.android.gms.internal.zzcas p11)
    {
        this.zzauk().zzuj();
        this.zzwk();
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        com.google.android.gms.common.internal.zzbp.zzgg(p11.packageName);
        if (!android.text.TextUtils.isEmpty(p11.zzilu)) {
            String v0_4 = this.zzauf().zziw(p11.packageName);
            if ((v0_4 != null) && ((android.text.TextUtils.isEmpty(v0_4.getGmpAppId())) && (!android.text.TextUtils.isEmpty(p11.zzilu)))) {
                v0_4.zzar(0);
                this.zzauf().zza(v0_4);
                this.zzaui().zzjq(p11.packageName);
            }
            if (p11.zzilz) {
                long v4 = p11.zzime;
                if (v4 == 0) {
                    v4 = this.zzasc.currentTimeMillis();
                }
                Long v6_12;
                String v0_65 = p11.zzimf;
                if ((v0_65 == null) || (v0_65 == 1)) {
                    v6_12 = v0_65;
                } else {
                    this.zzaul().zzayf().zze("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.zzcbw.zzjf(p11.packageName), Integer.valueOf(v0_65));
                    v6_12 = 0;
                }
                this.zzauf().beginTransaction();
                try {
                    String v0_7 = this.zzauf().zziw(p11.packageName);
                } catch (String v0_61) {
                    this.zzauf().endTransaction();
                    throw v0_61;
                }
                if ((v0_7 != null) && ((v0_7.getGmpAppId() != null) && (!v0_7.getGmpAppId().equals(p11.zzilu)))) {
                    this.zzaul().zzayf().zzj("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.zzcbw.zzjf(v0_7.getAppId()));
                    String v1_40 = this.zzauf();
                    long v2_51 = v0_7.getAppId();
                    v1_40.zzwk();
                    v1_40.zzuj();
                    com.google.android.gms.common.internal.zzbp.zzgg(v2_51);
                    try {
                        String v0_73 = v1_40.getWritableDatabase();
                        String v3_0 = new String[1];
                        v3_0[0] = v2_51;
                        String v0_3 = (v0_73.delete("audience_filter_values", "app_id=?", v3_0) + ((((((((v0_73.delete("events", "app_id=?", v3_0) + 0) + v0_73.delete("user_attributes", "app_id=?", v3_0)) + v0_73.delete("conditional_properties", "app_id=?", v3_0)) + v0_73.delete("apps", "app_id=?", v3_0)) + v0_73.delete("raw_events", "app_id=?", v3_0)) + v0_73.delete("raw_events_metadata", "app_id=?", v3_0)) + v0_73.delete("event_filters", "app_id=?", v3_0)) + v0_73.delete("property_filters", "app_id=?", v3_0)));
                    } catch (String v0_6) {
                        v1_40.zzaul().zzayd().zze("Error deleting application data. appId, error", com.google.android.gms.internal.zzcbw.zzjf(v2_51), v0_6);
                        v0_7 = 0;
                    }
                    if (v0_3 <= null) {
                    } else {
                        v1_40.zzaul().zzayj().zze("Deleted application data. app, records", v2_51, Integer.valueOf(v0_3));
                    }
                }
                if ((v0_7 != null) && ((v0_7.zzuo() != null) && (!v0_7.zzuo().equals(p11.zzhtt)))) {
                    String v3_5 = new android.os.Bundle();
                    v3_5.putString("_pv", v0_7.zzuo());
                    this.zzb(new com.google.android.gms.internal.zzcbk("_au", new com.google.android.gms.internal.zzcbh(v3_5), "auto", v4), p11);
                }
                this.zzf(p11);
                String v0_11 = 0;
                if (v6_12 != null) {
                    if (v6_12 == 1) {
                        v0_11 = this.zzauf().zzaf(p11.packageName, "_v");
                    }
                } else {
                    v0_11 = this.zzauf().zzaf(p11.packageName, "_f");
                }
                if (v0_11 != null) {
                    if (p11.zzima) {
                        this.zzb(new com.google.android.gms.internal.zzcbk("_cd", new com.google.android.gms.internal.zzcbh(new android.os.Bundle()), "auto", v4), p11);
                    }
                } else {
                    String v0_19 = ((1 + (v4 / 3600000)) * 3600000);
                    if (v6_12 != null) {
                        if (v6_12 == 1) {
                            this.zzb(new com.google.android.gms.internal.zzcft("_fvt", v4, Long.valueOf(v0_19), "auto"), p11);
                            this.zzauk().zzuj();
                            this.zzwk();
                            String v3_12 = new android.os.Bundle();
                            v3_12.putLong("_c", 1);
                            v3_12.putLong("_r", 1);
                            this.zzb(new com.google.android.gms.internal.zzcbk("_v", new com.google.android.gms.internal.zzcbh(v3_12), "auto", v4), p11);
                        }
                    } else {
                        this.zzb(new com.google.android.gms.internal.zzcft("_fot", v4, Long.valueOf(v0_19), "auto"), p11);
                        this.zzauk().zzuj();
                        this.zzwk();
                        android.os.Bundle v8_17 = new android.os.Bundle();
                        v8_17.putLong("_c", 1);
                        v8_17.putLong("_r", 1);
                        v8_17.putLong("_uwa", 0);
                        v8_17.putLong("_pfo", 0);
                        v8_17.putLong("_sys", 0);
                        v8_17.putLong("_sysu", 0);
                        if (this.mContext.getPackageManager() != null) {
                            String v1_18 = com.google.android.gms.internal.zzbed.zzcr(this.mContext).getPackageInfo(p11.packageName, 0);
                            if ((v1_18 != null) && (v1_18.firstInstallTime != 0)) {
                                String v0_39 = 0;
                                if (v1_18.firstInstallTime == v1_18.lastUpdateTime) {
                                    v0_39 = 1;
                                } else {
                                    v8_17.putLong("_uwa", 1);
                                }
                                String v0_41;
                                if (v0_39 == null) {
                                    v0_41 = 0;
                                } else {
                                    v0_41 = 1;
                                }
                                this.zzb(new com.google.android.gms.internal.zzcft("_fi", v4, Long.valueOf(v0_41), "auto"), p11);
                            }
                            String v0_44 = com.google.android.gms.internal.zzbed.zzcr(this.mContext).getApplicationInfo(p11.packageName, 0);
                            if (v0_44 != null) {
                                if ((v0_44.flags & 1) != 0) {
                                    v8_17.putLong("_sys", 1);
                                }
                                if ((v0_44.flags & 128) != 0) {
                                    v8_17.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.zzaul().zzayd().zzj("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.zzcbw.zzjf(p11.packageName));
                        }
                        String v0_52 = this.zzauf();
                        String v1_27 = p11.packageName;
                        com.google.android.gms.common.internal.zzbp.zzgg(v1_27);
                        v0_52.zzuj();
                        v0_52.zzwk();
                        String v0_54 = v0_52.zzam(v1_27, "first_open_count");
                        if (v0_54 >= 0) {
                            v8_17.putLong("_pfo", v0_54);
                        }
                        this.zzb(new com.google.android.gms.internal.zzcbk("_f", new com.google.android.gms.internal.zzcbh(v8_17), "auto", v4), p11);
                    }
                    String v3_22 = new android.os.Bundle();
                    v3_22.putLong("_et", 1);
                    this.zzb(new com.google.android.gms.internal.zzcbk("_e", new com.google.android.gms.internal.zzcbh(v3_22), "auto", v4), p11);
                }
                this.zzauf().setTransactionSuccessful();
                this.zzauf().endTransaction();
            } else {
                this.zzf(p11);
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzat.zzb() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final declared_synchronized void zzb(java.util.List p11, long p12)
    {
        try {
            long v2 = this.zzasc.currentTimeMillis();
            this.zzbg(v2);
            String v0_1 = (p11.size() + (this.zzbdh() - this.zzjqt));
        } catch (String v0_11) {
            this.zzbdi();
            throw v0_11;
        } catch (String v0_12) {
            throw v0_12;
        }
        if (v0_1 > null) {
            String v0_2 = this.zzef(v0_1);
            com.google.android.gms.tagmanager.zzdj.zzcq(new StringBuilder(64).append("DataLayer store full, deleting ").append(v0_2.size()).append(" entries to make room.").toString());
            String v1_5 = new String[0];
            String v0_4 = ((String[]) v0_2.toArray(v1_5));
            if ((v0_4 != null) && (v0_4.length != 0)) {
                String v1_8 = this.zzln("Error opening database for deleteEntries.");
                if (v1_8 != null) {
                    String v5_3 = new Object[2];
                    v5_3[0] = "ID";
                    v5_3[1] = android.text.TextUtils.join(",", java.util.Collections.nCopies(v0_4.length, "?"));
                    try {
                        v1_8.delete("datalayer", String.format("%s in (%s)", v5_3), v0_4);
                    } catch (String v1) {
                        String v0_7 = String.valueOf(java.util.Arrays.toString(v0_4));
                        if (v0_7.length() == 0) {
                            String v0_9 = new String("Error deleting entries ");
                        } else {
                            v0_9 = "Error deleting entries ".concat(v0_7);
                        }
                        com.google.android.gms.tagmanager.zzdj.zzcr(v0_9);
                    }
                }
            }
        }
        this.zzc(p11, (v2 + p12));
        this.zzbdi();
        return;
    }

Method com.google.android.gms.tagmanager.zzat.zzbg() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final void zzbg(long p8)
    {
        String v0_2 = this.zzln("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.zzdj.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.zzdj.zzcr("Error deleting old entries.");
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzec.zzb() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final void zzb(long p10, String p12)
    {
        String v0_0 = 1;
        android.content.ContentValues v2_5 = this.zzasc.currentTimeMillis();
        if (v2_5 > (this.zzjtb + 86400000)) {
            this.zzjtb = v2_5;
            android.content.ContentValues v2_1 = this.zzln("Error opening database for deleteStaleHits.");
            if (v2_1 != null) {
                String[] v7 = new String[1];
                v7[0] = Long.toString((this.zzasc.currentTimeMillis() - 1.280618154e-314));
                v2_1.delete("gtm_hits", "HIT_TIME < ?", v7);
                if (this.zzbee() != 0) {
                    v0_0 = 0;
                }
                this.zzjsz.zzbu(v0_0);
            }
        }
        String v0_3 = ((this.zzbee() - this.zzjtc) + 1);
        if (v0_3 > null) {
            String v0_4 = this.zzek(v0_3);
            com.google.android.gms.tagmanager.zzdj.v(new StringBuilder(51).append("Store full, deleting ").append(v0_4.size()).append(" hits to make room.").toString());
            android.content.ContentValues v2_10 = new String[0];
            this.zzd(((String[]) v0_4.toArray(v2_10)));
        }
        String v0_8 = this.zzln("Error opening database for putHit");
        if (v0_8 != null) {
            android.content.ContentValues v2_12 = new android.content.ContentValues();
            v2_12.put("hit_time", Long.valueOf(p10));
            v2_12.put("hit_url", p12);
            v2_12.put("hit_first_send_time", Integer.valueOf(0));
            try {
                v0_8.insert("gtm_hits", 0, v2_12);
                this.zzjsz.zzbu(0);
            } catch (String v0) {
                com.google.android.gms.tagmanager.zzdj.zzcr("Error storing hit");
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzat.zzlm() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final void zzlm(String p8)
    {
        String v0_2 = this.zzln("Error opening database for clearKeysWithPrefix.");
        if (v0_2 != null) {
            try {
                String[] v3_1 = new String[2];
                v3_1[0] = p8;
                v3_1[1] = String.valueOf(p8).concat(".%");
                com.google.android.gms.tagmanager.zzdj.v(new StringBuilder(25).append("Cleared ").append(v0_2.delete("datalayer", "key = ? OR key LIKE ?", v3_1)).append(" items").toString());
                this.zzbdi();
            } catch (String v0_11) {
                this.zzbdi();
                throw v0_11;
            } catch (String v0_6) {
                String v0_7 = String.valueOf(v0_6);
                com.google.android.gms.tagmanager.zzdj.zzcr(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.zzbdi();
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzec.zzd() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final void zzd(String[] p9)
    {
        int v0_0 = 1;
        if ((p9 != null) && (p9.length != 0)) {
            com.google.android.gms.tagmanager.zzcd v2_3 = this.zzln("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.zzdj.zzcr("Error deleting hits");
                }
                if (this.zzbee() != 0) {
                    v0_0 = 0;
                }
                this.zzjsz.zzbu(v0_0);
            }
        }
        return;
    }

Method com.google.android.gms.tagmanager.zzec.zzb() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzb(long p10, String p12)
    {
        String v0_0 = 1;
        android.content.ContentValues v2_5 = this.zzasc.currentTimeMillis();
        if (v2_5 > (this.zzjtb + 86400000)) {
            this.zzjtb = v2_5;
            android.content.ContentValues v2_1 = this.zzln("Error opening database for deleteStaleHits.");
            if (v2_1 != null) {
                String[] v7 = new String[1];
                v7[0] = Long.toString((this.zzasc.currentTimeMillis() - 1.280618154e-314));
                v2_1.delete("gtm_hits", "HIT_TIME < ?", v7);
                if (this.zzbee() != 0) {
                    v0_0 = 0;
                }
                this.zzjsz.zzbu(v0_0);
            }
        }
        String v0_3 = ((this.zzbee() - this.zzjtc) + 1);
        if (v0_3 > null) {
            String v0_4 = this.zzek(v0_3);
            com.google.android.gms.tagmanager.zzdj.v(new StringBuilder(51).append("Store full, deleting ").append(v0_4.size()).append(" hits to make room.").toString());
            android.content.ContentValues v2_10 = new String[0];
            this.zzd(((String[]) v0_4.toArray(v2_10)));
        }
        String v0_8 = this.zzln("Error opening database for putHit");
        if (v0_8 != null) {
            android.content.ContentValues v2_12 = new android.content.ContentValues();
            v2_12.put("hit_time", Long.valueOf(p10));
            v2_12.put("hit_url", p12);
            v2_12.put("hit_first_send_time", Integer.valueOf(0));
            try {
                v0_8.insert("gtm_hits", 0, v2_12);
                this.zzjsz.zzbu(0);
            } catch (String v0) {
                com.google.android.gms.tagmanager.zzdj.zzcr("Error storing hit");
            }
        }
        return;
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p9)
    {
        String v0_0 = 1;
        if (android.os.Build$VERSION.SDK_INT < 15) {
            int v2_13 = p9.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v2_13.moveToFirst();
                v2_13.close();
            } catch (String v0_1) {
                v2_13.close();
                throw v0_1;
            }
        }
        if (this.zza(p9, "hits2")) {
            int v3_0 = com.google.android.gms.internal.zzane.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_8 = 0;
            while (v2_8 < 4) {
                String v5_2 = v4[v2_8];
                if (v3_0.remove(v5_2)) {
                    v2_8++;
                } else {
                    String v0_7;
                    String v0_5 = String.valueOf(v5_2);
                    if (v0_5.length() == 0) {
                        v0_7 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_7 = "Database hits2 is missing required column: ".concat(v0_5);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_7);
                }
            }
            if (v3_0.remove("hit_app_id")) {
                v0_0 = 0;
            }
            if (v3_0.isEmpty()) {
                if (v0_0 != null) {
                    p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            }
        } else {
            p9.execSQL(com.google.android.gms.internal.zzand.zzxc());
        }
        if (this.zza(p9, "properties")) {
            com.google.android.gms.internal.zzane.zza(p9);
        } else {
            p9.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.zzcay.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void zza(com.google.android.gms.internal.zzcbw 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.zzcay.zza(p3, p4, p5)) {
                p4.execSQL(p6);
            }
            try {
                com.google.android.gms.internal.zzcay.zza(p3, p4, p5, p7, p8);
                return;
            } catch (android.database.sqlite.SQLiteException v0_3) {
                p3.zzayd().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.google.android.gms.internal.zzcay.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long zza(String p6, String[] p7, long p8)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p6, p7);
        } catch (int v0_4) {
            this.zzaul().zzayd().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.zzcay.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private static void zza(com.google.android.gms.internal.zzcbw 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.zzcay.zzb(p7, p8);
            String v2_2 = p9.split(",");
            String v0_9 = 0;
            while (v0_9 < v2_2.length) {
                String v4 = v2_2[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.zzayf().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.zzccw.zzc() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final void zzc(com.google.android.gms.internal.zzcbk p19, com.google.android.gms.internal.zzcas p20)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p20);
        com.google.android.gms.common.internal.zzbp.zzgg(p20.packageName);
        long v16 = System.nanoTime();
        this.zzauk().zzuj();
        this.zzwk();
        String v3_1 = p20.packageName;
        this.zzauh();
        if (com.google.android.gms.internal.zzcfw.zzd(p19, p20)) {
            if (p20.zzilz) {
                if (!this.zzaui().zzao(v3_1, p19.name)) {
                    if (this.zzaul().zzad(2)) {
                        this.zzaul().zzayj().zzj("Logging event", this.zzaug().zzb(p19));
                    }
                    this.zzauf().beginTransaction();
                    try {
                        long v14_1 = p19.zzinr.zzaxz();
                        this.zzf(p20);
                    } catch (com.google.android.gms.internal.zzcfw v2_67) {
                        this.zzauf().endTransaction();
                        throw v2_67;
                    }
                    if (("_iap".equals(p19.name)) || ("ecommerce_purchase".equals(p19.name))) {
                        String v8_0;
                        com.google.android.gms.internal.zzcfw v2_88 = v14_1.getString("currency");
                        if (!"ecommerce_purchase".equals(p19.name)) {
                            v8_0 = v14_1.getLong("value");
                        } else {
                            com.google.android.gms.internal.zzcby v4_73 = (v14_1.getDouble("value") * 1000000.0);
                            if (v4_73 == 0) {
                                v4_73 = (((double) v14_1.getLong("value")) * 1000000.0);
                            }
                            if ((v4_73 > 9.223372036854776e+18) || (v4_73 < -9.223372036854776e+18)) {
                                this.zzaul().zzayf().zze("Data lost. Currency value is too big. appId", com.google.android.gms.internal.zzcbw.zzjf(v3_1), Double.valueOf(v4_73));
                                this.zzauf().setTransactionSuccessful();
                                this.zzauf().endTransaction();
                                return;
                            } else {
                                v8_0 = Math.round(v4_73);
                            }
                        }
                        if (!android.text.TextUtils.isEmpty(v2_88)) {
                            com.google.android.gms.internal.zzcfw v2_3 = v2_88.toUpperCase(java.util.Locale.US);
                            if (v2_3.matches("[A-Z]{3}")) {
                                int v5_2;
                                com.google.android.gms.internal.zzcby v4_7 = String.valueOf("_ltv_");
                                com.google.android.gms.internal.zzcfw v2_4 = String.valueOf(v2_3);
                                if (v2_4.length() == 0) {
                                    v5_2 = new String(v4_7);
                                } else {
                                    v5_2 = v4_7.concat(v2_4);
                                }
                                com.google.android.gms.internal.zzcfw v2_11;
                                com.google.android.gms.internal.zzcfw v2_7 = this.zzauf().zzah(v3_1, v5_2);
                                if ((v2_7 != null) && ((v2_7.mValue instanceof Long))) {
                                    v2_11 = new com.google.android.gms.internal.zzcfv(v3_1, p19.zzimg, v5_2, this.zzasc.currentTimeMillis(), Long.valueOf((v8_0 + ((Long) v2_7.mValue).longValue())));
                                } else {
                                    com.google.android.gms.internal.zzcby v4_11 = this.zzauf();
                                    com.google.android.gms.internal.zzcfw v2_14 = (this.zziss.zzb(v3_1, com.google.android.gms.internal.zzcbm.zzipf) - 1);
                                    com.google.android.gms.common.internal.zzbp.zzgg(v3_1);
                                    v4_11.zzuj();
                                    v4_11.zzwk();
                                    try {
                                        String v6_4 = v4_11.getWritableDatabase();
                                        String[] v10_2 = new String[3];
                                        v10_2[0] = v3_1;
                                        v10_2[1] = v3_1;
                                        v10_2[2] = String.valueOf(v2_14);
                                        v6_4.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);", v10_2);
                                    } catch (com.google.android.gms.internal.zzcfw v2_17) {
                                        v4_11.zzaul().zzayd().zze("Error pruning currencies. appId", com.google.android.gms.internal.zzcbw.zzjf(v3_1), v2_17);
                                    }
                                    v2_11 = new com.google.android.gms.internal.zzcfv(v3_1, p19.zzimg, v5_2, this.zzasc.currentTimeMillis(), Long.valueOf(v8_0));
                                }
                                if (!this.zzauf().zza(v2_11)) {
                                    this.zzaul().zzayd().zzd("Too many unique user properties are set. Ignoring user property. appId", com.google.android.gms.internal.zzcbw.zzjf(v3_1), this.zzaug().zzje(v2_11.mName), v2_11.mValue);
                                    this.zzauh().zza(v3_1, 9, 0, 0, 0);
                                }
                            }
                        }
                    }
                    String[] v10_3 = com.google.android.gms.internal.zzcfw.zzju(p19.name);
                    long v12_0 = "_err".equals(p19.name);
                    com.google.android.gms.internal.zzcfw v2_26 = this.zzauf().zza(this.zzazf(), v3_1, 1, v10_3, 0, v12_0, 0);
                    com.google.android.gms.internal.zzcby v4_23 = (v2_26.zzimz - com.google.android.gms.internal.zzcax.zzavw());
                    if (v4_23 <= 0) {
                        if (v10_3 != null) {
                            com.google.android.gms.internal.zzcby v4_25 = (v2_26.zzimy - com.google.android.gms.internal.zzcax.zzavx());
                            if (v4_25 > 0) {
                                if ((v4_25 % 1000) == 1) {
                                    this.zzaul().zzayd().zze("Data loss. Too many public events logged. appId, count", com.google.android.gms.internal.zzcbw.zzjf(v3_1), Long.valueOf(v2_26.zzimy));
                                }
                                this.zzauh().zza(v3_1, 16, "_ev", p19.name, 0);
                                this.zzauf().setTransactionSuccessful();
                                this.zzauf().endTransaction();
                                return;
                            }
                        }
                        if (v12_0 != 0) {
                            com.google.android.gms.internal.zzcby v4_28 = (v2_26.zzinb - ((long) Math.max(0, Math.min(1000000, this.zziss.zzb(p20.packageName, com.google.android.gms.internal.zzcbm.zziom)))));
                            if (v4_28 > 0) {
                                if (v4_28 == 1) {
                                    this.zzaul().zzayd().zze("Too many error events logged. appId, count", com.google.android.gms.internal.zzcbw.zzjf(v3_1), Long.valueOf(v2_26.zzinb));
                                }
                                this.zzauf().setTransactionSuccessful();
                                this.zzauf().endTransaction();
                                return;
                            }
                        }
                        this.zzauh().zza(v14_1, "_o", p19.zzimg);
                        if (this.zzauh().zzke(v3_1)) {
                            this.zzauh().zza(v14_1, "_dbg", Long.valueOf(1));
                            this.zzauh().zza(v14_1, "_r", Long.valueOf(1));
                        }
                        com.google.android.gms.internal.zzcby v4_32 = this.zzauf().zzix(v3_1);
                        if (v4_32 > 0) {
                            this.zzaul().zzayf().zze("Data lost. Too many events stored on disk, deleted. appId", com.google.android.gms.internal.zzcbw.zzjf(v3_1), Long.valueOf(v4_32));
                        }
                        Object v7_10;
                        int v5_10 = new com.google.android.gms.internal.zzcbf(this, p19.zzimg, v3_1, p19.name, p19.zzins, 0, v14_1);
                        com.google.android.gms.internal.zzcfw v2_40 = this.zzauf().zzaf(v3_1, v5_10.mName);
                        if (v2_40 != null) {
                            v5_10 = v5_10.zza(this, v2_40.zzinn);
                            v7_10 = v2_40.zzbb(v5_10.zzfdc);
                        } else {
                            String v6_31 = this.zzauf().zzja(v3_1);
                            com.google.android.gms.internal.zzcax.zzavv();
                            if (v6_31 < 500) {
                                v7_10 = new com.google.android.gms.internal.zzcbg(v3_1, v5_10.mName, 0, 0, v5_10.zzfdc);
                            } else {
                                this.zzaul().zzayd().zzd("Too many event names used, ignoring event. appId, name, supported count", com.google.android.gms.internal.zzcbw.zzjf(v3_1), this.zzaug().zzjc(v5_10.mName), Integer.valueOf(com.google.android.gms.internal.zzcax.zzavv()));
                                this.zzauh().zza(v3_1, 8, 0, 0, 0);
                                this.zzauf().endTransaction();
                                return;
                            }
                        }
                        this.zzauf().zza(v7_10);
                        this.zza(v5_10, p20);
                        this.zzauf().setTransactionSuccessful();
                        if (this.zzaul().zzad(2)) {
                            this.zzaul().zzayj().zzj("Event recorded", this.zzaug().zza(v5_10));
                        }
                        this.zzauf().endTransaction();
                        this.zzazi().zzaul().zzayj().zzj("Background event processing time, ms", Long.valueOf((((System.nanoTime() - v16) + 500000) / 1000000)));
                    } else {
                        if ((v4_23 % 1000) == 1) {
                            this.zzaul().zzayd().zze("Data loss. Too many events logged. appId, count", com.google.android.gms.internal.zzcbw.zzjf(v3_1), Long.valueOf(v2_26.zzimz));
                        }
                        this.zzauf().setTransactionSuccessful();
                        this.zzauf().endTransaction();
                    }
                } else {
                    String v8_11;
                    this.zzaul().zzayf().zze("Dropping blacklisted event. appId", com.google.android.gms.internal.zzcbw.zzjf(v3_1), this.zzaug().zzjc(p19.name));
                    if ((!this.zzauh().zzkg(v3_1)) && (!this.zzauh().zzkh(v3_1))) {
                        v8_11 = 0;
                    } else {
                        v8_11 = 1;
                    }
                    if ((v8_11 == null) && (!"_err".equals(p19.name))) {
                        this.zzauh().zza(v3_1, 11, "_ev", p19.name, 0);
                    }
                    if (v8_11 != null) {
                        com.google.android.gms.internal.zzcfw v2_83 = this.zzauf().zziw(v3_1);
                        if ((v2_83 != null) && (Math.abs((this.zzasc.currentTimeMillis() - Math.max(v2_83.zzava(), v2_83.zzauz()))) > com.google.android.gms.internal.zzcax.zzawo())) {
                            this.zzaul().zzayi().log("Fetching config for blacklisted app");
                            this.zzb(v2_83);
                        }
                    }
                }
            } else {
                this.zzf(p20);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzccw.zzg() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean zzg(String p19, long p20)
    {
        this.zzauf().beginTransaction();
        try {
            com.google.android.gms.internal.zzccw$zza v15_1 = new com.google.android.gms.internal.zzccw$zza(this, 0);
            int v14_1 = this.zzauf();
            com.google.android.gms.internal.zzcgh v4_9 = 0;
            com.google.android.gms.internal.zzcgk v16_0 = this.zzitx;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzuj();
            v14_1.zzwk();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcgh v13_0;
                String[] v12_0;
                com.google.android.gms.internal.zzcby v2_3 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v14_1.zzaul().zzayd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v4_9), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.zzaoc != null) && (!v15_1.zzaoc.isEmpty())) {
                        com.google.android.gms.internal.zzcby v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcby v2_27;
                    if (v2_24 != null) {
                        this.zzauf().setTransactionSuccessful();
                        this.zzauf().endTransaction();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcgh v13_1 = 0;
                        com.google.android.gms.internal.zzcgk v16_1 = v15_1.zziue;
                        com.google.android.gms.internal.zzcby v2_30 = new com.google.android.gms.internal.zzcgh[v15_1.zzaoc.size()];
                        v16_1.zzizf = v2_30;
                        String[] v12_1 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.zzaoc.size()) {
                            com.google.android.gms.internal.zzcgh v4_70;
                            com.google.android.gms.internal.zzcby v2_171;
                            if (!this.zzaui().zzao(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                boolean v17 = this.zzaui().zzap(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcgh v4_42 = 0;
                                    if (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcgi[0];
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx;
                                    com.google.android.gms.internal.zzcgi[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcby v2_173;
                                        com.google.android.gms.internal.zzcby v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_42;
                                            } else {
                                                v2_172.zzizb = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zzizb = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_42;
                                        }
                                        v5_35++;
                                        v4_42 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzaul().zzayj().zzj("Marking event as conversion", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_127 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcgi();
                                        v3_46.name = "_c";
                                        v3_46.zzizb = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_127;
                                    }
                                    if (v4_42 == null) {
                                        this.zzaul().zzayj().zzj("Marking event as real-time", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_144 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcgi();
                                        v3_53.name = "_r";
                                        v3_53.zzizb = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_144;
                                    }
                                    if (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 0, 0, 1).zzinc <= ((long) this.zziss.zzis(v15_1.zziue.zzci))) {
                                        v13_1 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcby v2_148 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziyx.length) {
                                            if (!"_r".equals(v2_148.zziyx[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcgh v4_58 = new com.google.android.gms.internal.zzcgi[(v2_148.zziyx.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziyx, 0, v4_58, 0, v3_62);
                                                }
                                                if (v3_62 < v4_58.length) {
                                                    System.arraycopy(v2_148.zziyx, (v3_62 + 1), v4_58, v3_62, (v4_58.length - v3_62));
                                                }
                                                v2_148.zziyx = v4_58;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfw.zzju(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) || ((!v17) || (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 1, 0, 0).zzina <= ((long) this.zziss.zzb(v15_1.zziue.zzci, com.google.android.gms.internal.zzcbm.zzioo))))) {
                                        v4_70 = v13_1;
                                    } else {
                                        this.zzaul().zzayf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                        com.google.android.gms.internal.zzcby v2_162 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcgh v4_66 = 0;
                                        com.google.android.gms.internal.zzcgi[] v7_33 = v2_162.zziyx;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            int v3_73 = v7_33[v6_34];
                                            if (!"_c".equals(v3_73.name)) {
                                                if (!"_err".equals(v3_73.name)) {
                                                    v3_73 = v4_66;
                                                } else {
                                                    v5_57 = 1;
                                                    v3_73 = v4_66;
                                                }
                                            }
                                            v6_34++;
                                            v4_66 = v3_73;
                                        }
                                        if ((v5_57 == 0) || (v4_66 == null)) {
                                            if (v4_66 == null) {
                                                this.zzaul().zzayd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                            } else {
                                                v4_66.name = "_err";
                                                v4_66.zzizb = Long.valueOf(10);
                                                v4_70 = v13_1;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgi[] v7_35 = new com.google.android.gms.internal.zzcgi[(v2_162.zziyx.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcgi[] v8_17 = v2_162.zziyx;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_72;
                                                com.google.android.gms.internal.zzcgi v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_66) {
                                                    v3_72 = v5_58;
                                                } else {
                                                    v3_72 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_72;
                                            }
                                            v2_162.zziyx = v7_35;
                                            v4_70 = v13_1;
                                        }
                                    }
                                } else {
                                    this.zzauh();
                                    if (!com.google.android.gms.internal.zzcfw.zzki(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_1 + 1);
                                v16_1.zzizf[v12_1] = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                v2_171 = v3_71;
                            } else {
                                com.google.android.gms.internal.zzcby v2_186;
                                this.zzaul().zzayf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci), this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                if ((!this.zzauh().zzkg(v15_1.zziue.zzci)) && (!this.zzauh().zzkh(v15_1.zziue.zzci))) {
                                    v2_186 = 0;
                                } else {
                                    v2_186 = 1;
                                }
                                if ((v2_186 != null) || ("_err".equals(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name))) {
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                } else {
                                    this.zzauh().zza(v15_1.zziue.zzci, 11, "_ev", ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name, 0);
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                }
                            }
                            v14_0++;
                            v12_1 = v2_171;
                            v13_1 = v4_70;
                        }
                        if (v12_1 < v15_1.zzaoc.size()) {
                            v16_1.zzizf = ((com.google.android.gms.internal.zzcgh[]) java.util.Arrays.copyOf(v16_1.zzizf, v12_1));
                        }
                        v16_1.zzizy = this.zza(v15_1.zziue.zzci, v15_1.zziue.zzizg, v16_1.zzizf);
                        v16_1.zzizi = Long.valueOf(nan);
                        v16_1.zzizj = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcby v2_46 = 0;
                        while (v2_46 < v16_1.zzizf.length) {
                            int v3_37 = v16_1.zzizf[v2_46];
                            if (v3_37.zziyy.longValue() < v16_1.zzizi.longValue()) {
                                v16_1.zzizi = v3_37.zziyy;
                            }
                            if (v3_37.zziyy.longValue() > v16_1.zzizj.longValue()) {
                                v16_1.zzizj = v3_37.zziyy;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.zziue.zzci;
                        com.google.android.gms.internal.zzcgi[] v7_18 = this.zzauf().zziw(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zzizf.length > 0) {
                                com.google.android.gms.internal.zzcgh v4_21;
                                com.google.android.gms.internal.zzcby v2_52 = v7_18.zzaus();
                                if (v2_52 == 0) {
                                    v4_21 = 0;
                                } else {
                                    v4_21 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizl = v4_21;
                                com.google.android.gms.internal.zzcgh v4_22 = v7_18.zzaur();
                                if (v4_22 != 0) {
                                    v2_52 = v4_22;
                                }
                                com.google.android.gms.internal.zzcby v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizk = v2_53;
                                v7_18.zzavb();
                                v16_1.zzizw = Integer.valueOf(((int) v7_18.zzauy()));
                                v7_18.zzal(v16_1.zzizi.longValue());
                                v7_18.zzam(v16_1.zzizj.longValue());
                                v16_1.zzily = v7_18.zzavj();
                                this.zzauf().zza(v7_18);
                            }
                        } else {
                            this.zzaul().zzayd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                        }
                        if (v16_1.zzizf.length > 0) {
                            com.google.android.gms.internal.zzcax.zzawk();
                            com.google.android.gms.internal.zzcby v2_68 = this.zzaui().zzjn(v15_1.zziue.zzci);
                            if ((v2_68 != null) && (v2_68.zziym != null)) {
                                v16_1.zzjad = v2_68.zziym;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.zziue.zzilu)) {
                                    this.zzaul().zzayf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                } else {
                                    v16_1.zzjad = Long.valueOf(-1);
                                }
                            }
                            this.zzauf().zza(v16_1, v13_1);
                        }
                        this.zzauf().zzae(v15_1.zziuf);
                        int v3_32 = this.zzauf();
                        com.google.android.gms.internal.zzcby v2_79 = v3_32.getWritableDatabase();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_29);
                        this.zzauf().setTransactionSuccessful();
                        if (v16_1.zzizf.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzauf().endTransaction();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_0 = v5_45;
                    v12_0 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p20);
                    v6_36 = v5_56;
                } else {
                    int v5_61 = new String[2];
                    v5_61[0] = String.valueOf(v16_0);
                    v5_61[1] = String.valueOf(p20);
                    v6_36 = v5_61;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcgh v4_0 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_0 = v5_8;
                    v12_0 = v4_0;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcgh v4_2 = new String[1];
                v4_2[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_0;
                v6_2[1] = v13_0;
                int v11_0 = v2_3.query("raw_events_metadata", v4_2, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcby v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v3_4 = v11_0;
                v4_9 = v12_0;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzeye.zzm(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcgh v4_5 = new com.google.android.gms.internal.zzcgk();
                try {
                    v4_5.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcby v2_2) {
                    v14_1.zzaul().zzayd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzaul().zzayf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                }
                int v6_4;
                int v5_15;
                v11_0.close();
                v15_1.zzb(v4_5);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcgh v4_11 = new String[4];
                v4_11[0] = "rowid";
                v4_11[1] = "name";
                v4_11[2] = "timestamp";
                v4_11[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_11, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzaul().zzayf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcby v2_1) {
                    v4_9 = v12_0;
                }
                do {
                    com.google.android.gms.internal.zzcgh v4_12 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcby v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcby v2_9 = com.google.android.gms.internal.zzeye.zzm(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcgh();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyy = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.zza(v4_12, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzaul().zzayd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcby v2_192) {
            this.zzauf().endTransaction();
            throw v2_192;
        }
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p6)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            android.database.sqlite.SQLiteException v0_20 = p6.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_20.moveToFirst();
                v0_20.close();
            } catch (String v1_4) {
                v0_20.close();
                throw v1_4;
            }
        }
        if (com.google.android.gms.tagmanager.zzax.zza("datalayer", p6)) {
            String v1_0 = p6.rawQuery("SELECT * FROM datalayer WHERE 0", 0);
            java.util.HashSet v2_2 = new java.util.HashSet();
            try {
                String[] v3 = v1_0.getColumnNames();
                android.database.sqlite.SQLiteException v0_4 = 0;
            } catch (android.database.sqlite.SQLiteException v0_5) {
                v1_0.close();
                throw v0_5;
            }
            while (v0_4 < v3.length) {
                v2_2.add(v3[v0_4]);
                v0_4++;
            }
            v1_0.close();
            if ((v2_2.remove("key")) && ((v2_2.remove("value")) && ((v2_2.remove("ID")) && (v2_2.remove("expires"))))) {
                if (!v2_2.isEmpty()) {
                    throw new android.database.sqlite.SQLiteException("Database has extra columns");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database column missing");
            }
        } else {
            p6.execSQL(com.google.android.gms.tagmanager.zzat.zzbdj());
        }
        return;
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p6)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            android.database.sqlite.SQLiteException v0_20 = p6.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_20.moveToFirst();
                v0_20.close();
            } catch (String v1_4) {
                v0_20.close();
                throw v1_4;
            }
        }
        if (com.google.android.gms.tagmanager.zzee.zza("gtm_hits", p6)) {
            String v1_0 = p6.rawQuery("SELECT * FROM gtm_hits WHERE 0", 0);
            java.util.HashSet v2_2 = new java.util.HashSet();
            try {
                String[] v3 = v1_0.getColumnNames();
                android.database.sqlite.SQLiteException v0_4 = 0;
            } catch (android.database.sqlite.SQLiteException v0_5) {
                v1_0.close();
                throw v0_5;
            }
            while (v0_4 < v3.length) {
                v2_2.add(v3[v0_4]);
                v0_4++;
            }
            v1_0.close();
            if ((v2_2.remove("hit_id")) && ((v2_2.remove("hit_url")) && ((v2_2.remove("hit_time")) && (v2_2.remove("hit_first_send_time"))))) {
                if (!v2_2.isEmpty()) {
                    throw new android.database.sqlite.SQLiteException("Database has extra columns");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database column missing");
            }
        } else {
            p6.execSQL(com.google.android.gms.tagmanager.zzec.zzbeg());
        }
        return;
    }

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


    public final void zzc(com.google.android.gms.internal.zzaoi p7)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p7);
        com.google.android.gms.analytics.zzj.zzuj();
        this.zzwk();
        com.google.android.gms.common.internal.zzbp.zzu(p7);
        String v2_6 = new android.net.Uri$Builder();
        android.content.ContentValues v3_0 = p7.zziy().entrySet().iterator();
        while (v3_0.hasNext()) {
            Long v0_1 = ((java.util.Map$Entry) v3_0.next());
            String v1_1 = ((String) v0_1.getKey());
            if ((!"ht".equals(v1_1)) && ((!"qt".equals(v1_1)) && (!"AppUID".equals(v1_1)))) {
                v2_6.appendQueryParameter(v1_1, ((String) v0_1.getValue()));
            }
        }
        String v1_2;
        Long v0_6 = v2_6.build().getEncodedQuery();
        if (v0_6 != null) {
            v1_2 = v0_6;
        } else {
            v1_2 = "";
        }
        if (v1_2.length() <= 8192) {
            Long v0_12 = ((Integer) com.google.android.gms.internal.zzaod.zzdre.get()).intValue();
            String v2_1 = this.zzwu();
            if (v2_1 > ((long) (v0_12 - 1))) {
                Long v0_13 = this.zzn(((v2_1 - ((long) v0_12)) + 1));
                this.zzd("Store full, deleting hits to make room, count", Integer.valueOf(v0_13.size()));
                this.zzq(v0_13);
            }
            Long v0_19;
            String v2_7 = this.getWritableDatabase();
            android.content.ContentValues v3_4 = new android.content.ContentValues();
            v3_4.put("hit_string", v1_2);
            v3_4.put("hit_time", Long.valueOf(p7.zzyn()));
            v3_4.put("hit_app_id", Integer.valueOf(p7.zzyl()));
            if (!p7.zzyp()) {
                v0_19 = com.google.android.gms.internal.zzanv.zzyc();
            } else {
                v0_19 = com.google.android.gms.internal.zzanv.zzyb();
            }
            v3_4.put("hit_url", v0_19);
            try {
                Long v0_21 = v2_7.insert("hits2", 0, v3_4);
            } catch (Long v0_24) {
                this.zze("Error storing a hit", v0_24);
            }
            if (v0_21 != -1) {
                this.zzb("Hit saved to database. db-id, hit", Long.valueOf(v0_21), p7);
            } else {
                this.zzdq("Failed to insert a hit (got -1)");
            }
        } else {
            this.zzvy().zza(p7, "Hit length exceeds the maximum allowed size");
        }
        return;
    }

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


    public final boolean zza(com.google.android.gms.internal.zzcbf p11, long p12, boolean p14)
    {
        Object v2 = 0;
        this.zzuj();
        this.zzwk();
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        com.google.android.gms.common.internal.zzbp.zzgg(p11.mAppId);
        int v5_7 = new com.google.android.gms.internal.zzcgh();
        v5_7.zziyz = Long.valueOf(p11.zzinj);
        com.google.android.gms.internal.zzcby v0_7 = new com.google.android.gms.internal.zzcgi[p11.zzink.size()];
        v5_7.zziyx = v0_7;
        long v6_0 = p11.zzink.iterator();
        String v1_4 = 0;
        while (v6_0.hasNext()) {
            com.google.android.gms.internal.zzcby v0_3 = ((String) v6_0.next());
            com.google.android.gms.internal.zzcgi v7_1 = new com.google.android.gms.internal.zzcgi();
            Object v3_2 = (v1_4 + 1);
            v5_7.zziyx[v1_4] = v7_1;
            v7_1.name = v0_3;
            this.zzauh().zza(v7_1, p11.zzink.get(v0_3));
            v1_4 = v3_2;
        }
        try {
            com.google.android.gms.internal.zzcby v0_14;
            com.google.android.gms.internal.zzcby v0_11 = new byte[v5_7.zzhi()];
            String v1_6 = com.google.android.gms.internal.zzeyf.zzn(v0_11, 0, v0_11.length);
            v5_7.zza(v1_6);
            v1_6.zzctn();
            this.zzaul().zzayj().zze("Saving event, name, data size", this.zzaug().zzjc(p11.mName), Integer.valueOf(v0_11.length));
            String v1_10 = new android.content.ContentValues();
            v1_10.put("app_id", p11.mAppId);
            v1_10.put("name", p11.mName);
            v1_10.put("timestamp", Long.valueOf(p11.zzfdc));
            v1_10.put("metadata_fingerprint", Long.valueOf(p12));
            v1_10.put("data", v0_11);
        } catch (com.google.android.gms.internal.zzcby v0_13) {
            this.zzaul().zzayd().zze("Data loss. Failed to serialize event params/data. appId", com.google.android.gms.internal.zzcbw.zzjf(p11.mAppId), v0_13);
            return v2;
        }
        if (!p14) {
            v0_14 = 0;
        } else {
            v0_14 = 1;
        }
        v1_10.put("realtime", Integer.valueOf(v0_14));
        try {
            if (this.getWritableDatabase().insert("raw_events", 0, v1_10) != -1) {
                v2 = 1;
                return v2;
            } else {
                this.zzaul().zzayd().zzj("Failed to insert raw event (got -1). appId", com.google.android.gms.internal.zzcbw.zzjf(p11.mAppId));
                return v2;
            }
        } catch (com.google.android.gms.internal.zzcby v0_0) {
            this.zzaul().zzayd().zze("Error storing raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(p11.mAppId), v0_0);
            return v2;
        }
    }

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


    public final boolean zza(com.google.android.gms.internal.zzcgk p11, boolean p12)
    {
        String v2 = 0;
        this.zzuj();
        this.zzwk();
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        com.google.android.gms.common.internal.zzbp.zzgg(p11.zzci);
        com.google.android.gms.common.internal.zzbp.zzu(p11.zzizj);
        this.zzaxk();
        Object v4_2 = this.zzvx().currentTimeMillis();
        if ((p11.zzizj.longValue() < (v4_2 - com.google.android.gms.internal.zzcax.zzawm())) || (p11.zzizj.longValue() > (com.google.android.gms.internal.zzcax.zzawm() + v4_2))) {
            this.zzaul().zzayf().zzd("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.internal.zzcbw.zzjf(p11.zzci), Long.valueOf(v4_2), p11.zzizj);
        }
        try {
            com.google.android.gms.internal.zzcby v0_16;
            com.google.android.gms.internal.zzcby v0_11 = new byte[p11.zzhi()];
            Object v3_5 = com.google.android.gms.internal.zzeyf.zzn(v0_11, 0, v0_11.length);
            p11.zza(v3_5);
            v3_5.zzctn();
            com.google.android.gms.internal.zzcby v0_13 = this.zzauh().zzp(v0_11);
            this.zzaul().zzayj().zzj("Saving bundle, size", Integer.valueOf(v0_13.length));
            Object v3_10 = new android.content.ContentValues();
            v3_10.put("app_id", p11.zzci);
            v3_10.put("bundle_end_timestamp", p11.zzizj);
            v3_10.put("data", v0_13);
        } catch (com.google.android.gms.internal.zzcby v0_15) {
            this.zzaul().zzayd().zze("Data loss. Failed to serialize bundle. appId", com.google.android.gms.internal.zzcbw.zzjf(p11.zzci), v0_15);
            return v2;
        }
        if (!p12) {
            v0_16 = 0;
        } else {
            v0_16 = 1;
        }
        v3_10.put("has_realtime", Integer.valueOf(v0_16));
        try {
            if (this.getWritableDatabase().insert("queue", 0, v3_10) != -1) {
                v2 = 1;
                return v2;
            } else {
                this.zzaul().zzayd().zzj("Failed to insert bundle (got -1). appId", com.google.android.gms.internal.zzcbw.zzjf(p11.zzci));
                return v2;
            }
        } catch (com.google.android.gms.internal.zzcby v0_3) {
            this.zzaul().zzayd().zze("Error storing bundle. appId", com.google.android.gms.internal.zzcbw.zzjf(p11.zzci), v0_3);
            return v2;
        }
    }

Method com.google.android.gms.internal.zzcbs.zzb() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    private final boolean zzb(int p14, byte[] p15)
    {
        int v0_3;
        this.zzatv();
        this.zzuj();
        if (!this.zzipm) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            int v0_1 = 5;
            com.google.android.gms.internal.zzcax.zzawt();
            int v6 = 0;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzcby v1_0) {
                    this.zzaul().zzayd().zzj("Error writing entry to local database", v1_0);
                    this.zzipm = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                        v6++;
                    } else {
                        v3.close();
                    }
                    v3.insertOrThrow("messages", 0, v7_1);
                    v3.setTransactionSuccessful();
                    v3.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 1;
                } catch (com.google.android.gms.internal.zzcby v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzaul().zzayd().zzj("Error writing entry to local database", v1_20);
                        this.zzipm = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                    } else {
                        v3.close();
                    }
                } catch (int v0_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_2;
                }
                if (v3 != null) {
                    v3.beginTransaction();
                    Long v4_4 = 0;
                    v2 = v3.rawQuery("select count(1) from messages", 0);
                    if ((v2 != null) && (v2.moveToFirst())) {
                        v4_4 = v2.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzaul().zzayd().log("Data loss, local db full");
                        Long v4_6 = ((100000 - v4_4) + 1);
                        String[] v9_1 = new String[1];
                        v9_1[0] = Long.toString(v4_6);
                        long v8_6 = ((long) v3.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v9_1));
                        if (v8_6 != v4_6) {
                            this.zzaul().zzayd().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_6), Long.valueOf(v8_6), Long.valueOf((v4_6 - v8_6)));
                        }
                    }
                } else {
                    this.zzipm = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzaul().zzayf().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method io.fabric.sdk.android.FabricContext.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 io.fabric.sdk.android.FabricContext.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 com.google.android.gms.internal.zzand.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


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

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


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

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


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

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p9)
    {
        String v0_0 = 1;
        if (android.os.Build$VERSION.SDK_INT < 15) {
            int v2_13 = p9.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v2_13.moveToFirst();
                v2_13.close();
            } catch (String v0_1) {
                v2_13.close();
                throw v0_1;
            }
        }
        if (this.zza(p9, "hits2")) {
            int v3_0 = com.google.android.gms.internal.zzane.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_8 = 0;
            while (v2_8 < 4) {
                String v5_2 = v4[v2_8];
                if (v3_0.remove(v5_2)) {
                    v2_8++;
                } else {
                    String v0_7;
                    String v0_5 = String.valueOf(v5_2);
                    if (v0_5.length() == 0) {
                        v0_7 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_7 = "Database hits2 is missing required column: ".concat(v0_5);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_7);
                }
            }
            if (v3_0.remove("hit_app_id")) {
                v0_0 = 0;
            }
            if (v3_0.isEmpty()) {
                if (v0_0 != null) {
                    p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            }
        } else {
            p9.execSQL(com.google.android.gms.internal.zzand.zzxc());
        }
        if (this.zza(p9, "properties")) {
            com.google.android.gms.internal.zzane.zza(p9);
        } else {
            p9.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.zzcay.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long zzb(String p5, String[] p6)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p5, p6);
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzaul().zzayd().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.zzcby v2_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v2_2;
        }
    }

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


    private static java.util.Set zzb(android.database.sqlite.SQLiteDatabase p3, String p4)
    {
        Throwable v0_1 = new java.util.HashSet();
        android.database.Cursor v1_4 = 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_4.getColumnNames());
            v1_4.close();
            return v0_1;
        } catch (Throwable v0_2) {
            v1_4.close();
            throw v0_2;
        }
    }

Method com.google.android.gms.tagmanager.zzat.zzbdh() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final int zzbdh()
    {
        int v0_0 = 0;
        String v2_5 = this.zzln("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.zzdj.zzcr("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.internal.zzcay.zzaxi() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String zzaxi()
    {
        String v0_0 = 0;
        try {
            int v2_0 = this.getWritableDatabase().rawQuery("select app_id from queue order by has_realtime desc, rowid asc limit 1;", 0);
            try {
                if (!v2_0.moveToFirst()) {
                    if (v2_0 == 0) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                } else {
                    v0_0 = v2_0.getString(0);
                    if (v2_0 == 0) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                }
            } catch (int v1_1) {
                this.zzaul().zzayd().zzj("Database error getting next bundle app id", v1_1);
                if (v2_0 == 0) {
                    return v0_0;
                } else {
                    v2_0.close();
                    return v0_0;
                }
            }
        } catch (int v1_3) {
            v2_0 = 0;
            if (v2_0 != 0) {
                v2_0.close();
            }
            throw v1_3;
        } catch (int v1_1) {
            v2_0 = 0;
        } catch (String v0_1) {
            v1_3 = v0_1;
        }
    }

Method com.google.android.gms.internal.zzcay.zzaxp() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long zzaxp()
    {
        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.zzaul().zzayd().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.zzcay.zzba() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String zzba(long p8)
    {
        String v0_0 = 0;
        this.zzuj();
        this.zzwk();
        try {
            int v1_4 = this.getWritableDatabase();
            String v3_4 = new String[1];
            v3_4[0] = String.valueOf(p8);
            int 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 == 0) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                } else {
                    this.zzaul().zzayj().log("No expired configs for apps with pending events");
                    if (v2_0 == 0) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                }
            } catch (int v1_0) {
                this.zzaul().zzayd().zzj("Error selecting expired configs", v1_0);
                if (v2_0 == 0) {
                    return v0_0;
                } else {
                    v2_0.close();
                    return v0_0;
                }
            }
        } catch (int v1_1) {
            v2_0 = 0;
            if (v2_0 != 0) {
                v2_0.close();
            }
            throw v1_1;
        } catch (int v1_0) {
            v2_0 = 0;
        } catch (String v0_1) {
            v1_1 = v0_1;
        }
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p13)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.zzcbw v0_12 = p13.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_12.moveToFirst();
                v0_12.close();
            } catch (Throwable v1_6) {
                v0_12.close();
                throw v1_6;
            }
        }
        com.google.android.gms.internal.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zza(this.zzind.zzaul(), p13, "conditional_properties", "CREATE TABLE IF NOT EXISTS conditional_properties ( app_id TEXT NOT NULL, origin TEXT NOT NULL, name TEXT NOT NULL, value BLOB NOT NULL, creation_timestamp INTEGER NOT NULL, active INTEGER NOT NULL, trigger_event_name TEXT, trigger_timeout INTEGER NOT NULL, timed_out_event BLOB,triggered_event BLOB, triggered_timestamp INTEGER NOT NULL, time_to_live INTEGER NOT NULL, expired_event BLOB, PRIMARY KEY (app_id, name)) ;", "app_id,origin,name,value,active,trigger_event_name,trigger_timeout,creation_timestamp,timed_out_event,triggered_event,triggered_timestamp,time_to_live,expired_event", 0);
        com.google.android.gms.internal.zzcay.zza(this.zzind.zzaul(), 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", com.google.android.gms.internal.zzcay.zzaxr());
        com.google.android.gms.internal.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zzaxs());
        com.google.android.gms.internal.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zzaxt());
        com.google.android.gms.internal.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zzaxu());
        com.google.android.gms.internal.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zza(this.zzind.zzaul(), 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.zzcay.zzaxv());
        return;
    }

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


    private final boolean zzb(int p14, byte[] p15)
    {
        int v0_3;
        this.zzatv();
        this.zzuj();
        if (!this.zzipm) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            int v0_1 = 5;
            com.google.android.gms.internal.zzcax.zzawt();
            int v6 = 0;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzcby v1_0) {
                    this.zzaul().zzayd().zzj("Error writing entry to local database", v1_0);
                    this.zzipm = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                        v6++;
                    } else {
                        v3.close();
                    }
                    v3.insertOrThrow("messages", 0, v7_1);
                    v3.setTransactionSuccessful();
                    v3.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 1;
                } catch (com.google.android.gms.internal.zzcby v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzaul().zzayd().zzj("Error writing entry to local database", v1_20);
                        this.zzipm = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                    } else {
                        v3.close();
                    }
                } catch (int v0_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_2;
                }
                if (v3 != null) {
                    v3.beginTransaction();
                    Long v4_4 = 0;
                    v2 = v3.rawQuery("select count(1) from messages", 0);
                    if ((v2 != null) && (v2.moveToFirst())) {
                        v4_4 = v2.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzaul().zzayd().log("Data loss, local db full");
                        Long v4_6 = ((100000 - v4_4) + 1);
                        String[] v9_1 = new String[1];
                        v9_1[0] = Long.toString(v4_6);
                        long v8_6 = ((long) v3.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v9_1));
                        if (v8_6 != v4_6) {
                            this.zzaul().zzayd().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_6), Long.valueOf(v8_6), Long.valueOf((v4_6 - v8_6)));
                        }
                    }
                } else {
                    this.zzipm = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzaul().zzayf().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p7)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.zzcbw 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.zzcay.zza(this.zzipn.zzaul(), 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.zzccw.zzg() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean zzg(String p19, long p20)
    {
        this.zzauf().beginTransaction();
        try {
            com.google.android.gms.internal.zzccw$zza v15_1 = new com.google.android.gms.internal.zzccw$zza(this, 0);
            int v14_1 = this.zzauf();
            com.google.android.gms.internal.zzcgh v4_9 = 0;
            com.google.android.gms.internal.zzcgk v16_0 = this.zzitx;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzuj();
            v14_1.zzwk();
            int v3_4 = 0;
            try {
                String[] v12_0;
                com.google.android.gms.internal.zzcgh v13_0;
                com.google.android.gms.internal.zzcby v2_3 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v14_1.zzaul().zzayd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v4_9), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.zzaoc != null) && (!v15_1.zzaoc.isEmpty())) {
                        com.google.android.gms.internal.zzcby v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcby v2_27;
                    if (v2_24 != null) {
                        this.zzauf().setTransactionSuccessful();
                        this.zzauf().endTransaction();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcgh v13_1 = 0;
                        com.google.android.gms.internal.zzcgk v16_1 = v15_1.zziue;
                        com.google.android.gms.internal.zzcby v2_30 = new com.google.android.gms.internal.zzcgh[v15_1.zzaoc.size()];
                        v16_1.zzizf = v2_30;
                        String[] v12_1 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.zzaoc.size()) {
                            com.google.android.gms.internal.zzcby v2_171;
                            com.google.android.gms.internal.zzcgh v4_70;
                            if (!this.zzaui().zzao(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                boolean v17 = this.zzaui().zzap(v15_1.zziue.zzci, ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcgh v4_42 = 0;
                                    if (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcgi[0];
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx;
                                    com.google.android.gms.internal.zzcgi[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcby v2_173;
                                        com.google.android.gms.internal.zzcby v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_42;
                                            } else {
                                                v2_172.zzizb = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zzizb = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_42;
                                        }
                                        v5_35++;
                                        v4_42 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzaul().zzayj().zzj("Marking event as conversion", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_127 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcgi();
                                        v3_46.name = "_c";
                                        v3_46.zzizb = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_127;
                                    }
                                    if (v4_42 == null) {
                                        this.zzaul().zzayj().zzj("Marking event as real-time", this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcby v2_144 = ((com.google.android.gms.internal.zzcgi[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx, (((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcgi();
                                        v3_53.name = "_r";
                                        v3_53.zzizb = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).zziyx = v2_144;
                                    }
                                    if (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 0, 0, 1).zzinc <= ((long) this.zziss.zzis(v15_1.zziue.zzci))) {
                                        v13_1 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcby v2_148 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziyx.length) {
                                            if (!"_r".equals(v2_148.zziyx[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcgh v4_58 = new com.google.android.gms.internal.zzcgi[(v2_148.zziyx.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziyx, 0, v4_58, 0, v3_62);
                                                }
                                                if (v3_62 < v4_58.length) {
                                                    System.arraycopy(v2_148.zziyx, (v3_62 + 1), v4_58, v3_62, (v4_58.length - v3_62));
                                                }
                                                v2_148.zziyx = v4_58;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfw.zzju(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) || ((!v17) || (this.zzauf().zza(this.zzazf(), v15_1.zziue.zzci, 0, 0, 1, 0, 0).zzina <= ((long) this.zziss.zzb(v15_1.zziue.zzci, com.google.android.gms.internal.zzcbm.zzioo))))) {
                                        v4_70 = v13_1;
                                    } else {
                                        this.zzaul().zzayf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                        com.google.android.gms.internal.zzcby v2_162 = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcgh v4_66 = 0;
                                        com.google.android.gms.internal.zzcgi[] v7_33 = v2_162.zziyx;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            int v3_73 = v7_33[v6_34];
                                            if (!"_c".equals(v3_73.name)) {
                                                if (!"_err".equals(v3_73.name)) {
                                                    v3_73 = v4_66;
                                                } else {
                                                    v5_57 = 1;
                                                    v3_73 = v4_66;
                                                }
                                            }
                                            v6_34++;
                                            v4_66 = v3_73;
                                        }
                                        if ((v5_57 == 0) || (v4_66 == null)) {
                                            if (v4_66 == null) {
                                                this.zzaul().zzayd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                            } else {
                                                v4_66.name = "_err";
                                                v4_66.zzizb = Long.valueOf(10);
                                                v4_70 = v13_1;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgi[] v7_35 = new com.google.android.gms.internal.zzcgi[(v2_162.zziyx.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcgi[] v8_17 = v2_162.zziyx;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_72;
                                                com.google.android.gms.internal.zzcgi v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_66) {
                                                    v3_72 = v5_58;
                                                } else {
                                                    v3_72 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_72;
                                            }
                                            v2_162.zziyx = v7_35;
                                            v4_70 = v13_1;
                                        }
                                    }
                                } else {
                                    this.zzauh();
                                    if (!com.google.android.gms.internal.zzcfw.zzki(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_1 + 1);
                                v16_1.zzizf[v12_1] = ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0));
                                v2_171 = v3_71;
                            } else {
                                com.google.android.gms.internal.zzcby v2_186;
                                this.zzaul().zzayf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci), this.zzaug().zzjc(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name));
                                if ((!this.zzauh().zzkg(v15_1.zziue.zzci)) && (!this.zzauh().zzkh(v15_1.zziue.zzci))) {
                                    v2_186 = 0;
                                } else {
                                    v2_186 = 1;
                                }
                                if ((v2_186 != null) || ("_err".equals(((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name))) {
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                } else {
                                    this.zzauh().zza(v15_1.zziue.zzci, 11, "_ev", ((com.google.android.gms.internal.zzcgh) v15_1.zzaoc.get(v14_0)).name, 0);
                                    v2_171 = v12_1;
                                    v4_70 = v13_1;
                                }
                            }
                            v14_0++;
                            v12_1 = v2_171;
                            v13_1 = v4_70;
                        }
                        if (v12_1 < v15_1.zzaoc.size()) {
                            v16_1.zzizf = ((com.google.android.gms.internal.zzcgh[]) java.util.Arrays.copyOf(v16_1.zzizf, v12_1));
                        }
                        v16_1.zzizy = this.zza(v15_1.zziue.zzci, v15_1.zziue.zzizg, v16_1.zzizf);
                        v16_1.zzizi = Long.valueOf(nan);
                        v16_1.zzizj = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcby v2_46 = 0;
                        while (v2_46 < v16_1.zzizf.length) {
                            int v3_37 = v16_1.zzizf[v2_46];
                            if (v3_37.zziyy.longValue() < v16_1.zzizi.longValue()) {
                                v16_1.zzizi = v3_37.zziyy;
                            }
                            if (v3_37.zziyy.longValue() > v16_1.zzizj.longValue()) {
                                v16_1.zzizj = v3_37.zziyy;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.zziue.zzci;
                        com.google.android.gms.internal.zzcgi[] v7_18 = this.zzauf().zziw(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zzizf.length > 0) {
                                com.google.android.gms.internal.zzcgh v4_21;
                                com.google.android.gms.internal.zzcby v2_52 = v7_18.zzaus();
                                if (v2_52 == 0) {
                                    v4_21 = 0;
                                } else {
                                    v4_21 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizl = v4_21;
                                com.google.android.gms.internal.zzcgh v4_22 = v7_18.zzaur();
                                if (v4_22 != 0) {
                                    v2_52 = v4_22;
                                }
                                com.google.android.gms.internal.zzcby v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizk = v2_53;
                                v7_18.zzavb();
                                v16_1.zzizw = Integer.valueOf(((int) v7_18.zzauy()));
                                v7_18.zzal(v16_1.zzizi.longValue());
                                v7_18.zzam(v16_1.zzizj.longValue());
                                v16_1.zzily = v7_18.zzavj();
                                this.zzauf().zza(v7_18);
                            }
                        } else {
                            this.zzaul().zzayd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                        }
                        if (v16_1.zzizf.length > 0) {
                            com.google.android.gms.internal.zzcax.zzawk();
                            com.google.android.gms.internal.zzcby v2_68 = this.zzaui().zzjn(v15_1.zziue.zzci);
                            if ((v2_68 != null) && (v2_68.zziym != null)) {
                                v16_1.zzjad = v2_68.zziym;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.zziue.zzilu)) {
                                    this.zzaul().zzayf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbw.zzjf(v15_1.zziue.zzci));
                                } else {
                                    v16_1.zzjad = Long.valueOf(-1);
                                }
                            }
                            this.zzauf().zza(v16_1, v13_1);
                        }
                        this.zzauf().zzae(v15_1.zziuf);
                        int v3_32 = this.zzauf();
                        com.google.android.gms.internal.zzcby v2_79 = v3_32.getWritableDatabase();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_29);
                        this.zzauf().setTransactionSuccessful();
                        if (v16_1.zzizf.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzauf().endTransaction();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_0 = v5_45;
                    v12_0 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p20);
                    v6_36 = v5_56;
                } else {
                    int v5_61 = new String[2];
                    v5_61[0] = String.valueOf(v16_0);
                    v5_61[1] = String.valueOf(p20);
                    v6_36 = v5_61;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcgh v4_0 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_0 = v5_8;
                    v12_0 = v4_0;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcgh v4_2 = new String[1];
                v4_2[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_0;
                v6_2[1] = v13_0;
                int v11_0 = v2_3.query("raw_events_metadata", v4_2, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcby v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcby v2_1) {
                v3_4 = v11_0;
                v4_9 = v12_0;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzeye.zzm(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcgh v4_5 = new com.google.android.gms.internal.zzcgk();
                try {
                    v4_5.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcby v2_2) {
                    v14_1.zzaul().zzayd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzaul().zzayf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                }
                int v6_4;
                int v5_15;
                v11_0.close();
                v15_1.zzb(v4_5);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_0;
                    v6_4[1] = v13_0;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcgh v4_11 = new String[4];
                v4_11[0] = "rowid";
                v4_11[1] = "name";
                v4_11[2] = "timestamp";
                v4_11[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_11, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzaul().zzayf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcby v2_1) {
                    v4_9 = v12_0;
                }
                do {
                    com.google.android.gms.internal.zzcgh v4_12 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcby v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcby v2_9 = com.google.android.gms.internal.zzeye.zzm(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcgh();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyy = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.zza(v4_12, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzaul().zzayd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbw.zzjf(v12_0));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcby v2_192) {
            this.zzauf().endTransaction();
            throw v2_192;
        }
    }

Method com.google.android.gms.tagmanager.zzec.zzbee() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final int zzbee()
    {
        int v0_0 = 0;
        String v2_5 = this.zzln("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.zzdj.zzcr("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.internal.zzcay.zza() calling method android.database.sqlite.SQLiteDatabase.update()


    public final void zza(com.google.android.gms.internal.zzcar p8)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p8);
        this.zzuj();
        this.zzwk();
        com.google.android.gms.internal.zzcby v0_6 = new android.content.ContentValues();
        v0_6.put("app_id", p8.getAppId());
        v0_6.put("app_instance_id", p8.getAppInstanceId());
        v0_6.put("gmp_app_id", p8.getGmpAppId());
        v0_6.put("resettable_device_id_hash", p8.zzaup());
        v0_6.put("last_bundle_index", Long.valueOf(p8.zzauy()));
        v0_6.put("last_bundle_start_timestamp", Long.valueOf(p8.zzaur()));
        v0_6.put("last_bundle_end_timestamp", Long.valueOf(p8.zzaus()));
        v0_6.put("app_version", p8.zzuo());
        v0_6.put("app_store", p8.zzauu());
        v0_6.put("gmp_version", Long.valueOf(p8.zzauv()));
        v0_6.put("dev_cert_hash", Long.valueOf(p8.zzauw()));
        v0_6.put("measurement_enabled", Boolean.valueOf(p8.zzaux()));
        v0_6.put("day", Long.valueOf(p8.zzavc()));
        v0_6.put("daily_public_events_count", Long.valueOf(p8.zzavd()));
        v0_6.put("daily_events_count", Long.valueOf(p8.zzave()));
        v0_6.put("daily_conversions_count", Long.valueOf(p8.zzavf()));
        v0_6.put("config_fetched_time", Long.valueOf(p8.zzauz()));
        v0_6.put("failed_config_fetch_time", Long.valueOf(p8.zzava()));
        v0_6.put("app_version_int", Long.valueOf(p8.zzaut()));
        v0_6.put("firebase_instance_id", p8.zzauq());
        v0_6.put("daily_error_events_count", Long.valueOf(p8.zzavh()));
        v0_6.put("daily_realtime_events_count", Long.valueOf(p8.zzavg()));
        v0_6.put("health_monitor_sample", p8.zzavi());
        v0_6.put("android_id", Long.valueOf(p8.zzavk()));
        try {
            String v1_7 = this.getWritableDatabase();
            int v4_1 = new String[1];
            v4_1[0] = p8.getAppId();
        } catch (com.google.android.gms.internal.zzcby v0_4) {
            this.zzaul().zzayd().zze("Error storing app. appId", com.google.android.gms.internal.zzcbw.zzjf(p8.getAppId()), v0_4);
            return;
        }
        if ((((long) v1_7.update("apps", v0_6, "app_id = ?", v4_1)) != 0) || (v1_7.insertWithOnConflict("apps", 0, v0_6, 5) != -1)) {
            return;
        } else {
            this.zzaul().zzayd().zzj("Failed to insert/update app (got -1). appId", com.google.android.gms.internal.zzcbw.zzjf(p8.getAppId()));
            return;
        }
    }

Method com.google.android.gms.internal.zzcay.zzam() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final long zzam(String p13, String p14)
    {
        com.google.android.gms.common.internal.zzbp.zzgg(p13);
        com.google.android.gms.common.internal.zzbp.zzgg(p14);
        this.zzuj();
        this.zzwk();
        android.database.sqlite.SQLiteDatabase v6 = this.getWritableDatabase();
        v6.beginTransaction();
        try {
            android.database.sqlite.SQLiteException v0_10 = new StringBuilder((String.valueOf(p14).length() + 32)).append("select ").append(p14).append(" from app2 where app_id=?").toString();
            String v1_5 = new String[1];
            v1_5[0] = p13;
            android.database.sqlite.SQLiteException v0_1 = this.zza(v0_10, v1_5, -1);
        } catch (android.database.sqlite.SQLiteException v0_15) {
            v6.endTransaction();
            throw v0_15;
        } catch (android.database.sqlite.SQLiteException v2_1) {
            v0_1 = 0;
            this.zzaul().zzayd().zzd("Error inserting column. appId", com.google.android.gms.internal.zzcbw.zzjf(p13), p14, v2_1);
            v6.endTransaction();
            return v0_1;
        }
        if (v0_1 == -1) {
            android.database.sqlite.SQLiteException v0_12 = new android.content.ContentValues();
            v0_12.put("app_id", p13);
            v0_12.put("first_open_count", Integer.valueOf(0));
            v0_12.put("previous_install_count", Integer.valueOf(0));
            if (v6.insertWithOnConflict("app2", 0, v0_12, 5) != -1) {
                v0_1 = 0;
            } else {
                this.zzaul().zzayd().zze("Failed to insert column (got -1). appId", com.google.android.gms.internal.zzcbw.zzjf(p13), p14);
                v6.endTransaction();
                v0_1 = -1;
                return v0_1;
            }
        }
        try {
            Object v7_10 = new android.content.ContentValues();
            v7_10.put("app_id", p13);
            v7_10.put(p14, Long.valueOf((1 + v0_1)));
            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_1;
        } else {
            this.zzaul().zzayd().zze("Failed to update column (got 0). appId", com.google.android.gms.internal.zzcbw.zzjf(p13), p14);
            v6.endTransaction();
            v0_1 = -1;
            return v0_1;
        }
    }

Method com.google.android.gms.internal.zzccq.zzb() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final boolean zzb(String p17, byte[] p18, String p19)
    {
        int v2_7;
        this.zzwk();
        this.zzuj();
        com.google.android.gms.common.internal.zzbp.zzgg(p17);
        Object v5_0 = this.zzc(p17, p18);
        if (v5_0 != null) {
            this.zza(p17, v5_0);
            this.zziry.put(p17, v5_0);
            this.zzirz.put(p17, p19);
            this.zzirv.put(p17, com.google.android.gms.internal.zzccq.zza(v5_0));
            long v6_0 = this.zzaty();
            String[] v7_0 = v5_0.zziyq;
            com.google.android.gms.common.internal.zzbp.zzu(v7_0);
            int v8_0 = v7_0.length;
            String v4_0 = 0;
            while (v4_0 < v8_0) {
                int v9_1 = v7_0[v4_0];
                com.google.android.gms.internal.zzcay v10_1 = v9_1.zzixl;
                String v11_0 = v10_1.length;
                int v3_0 = 0;
                while (v3_0 < v11_0) {
                    int v2_4 = v10_1[v3_0];
                    com.google.android.gms.internal.zzcfz[] v12_1 = com.google.android.gms.measurement.AppMeasurement$Event.zzil(v2_4.zzixo);
                    if (v12_1 != null) {
                        v2_4.zzixo = v12_1;
                    }
                    com.google.android.gms.internal.zzcfz[] v12_2 = v2_4.zzixp;
                    int v13 = v12_2.length;
                    int v2_5 = 0;
                    while (v2_5 < v13) {
                        com.google.android.gms.internal.zzcfz v14 = v12_2[v2_5];
                        String v15_1 = com.google.android.gms.measurement.AppMeasurement$Param.zzil(v14.zzixw);
                        if (v15_1 != null) {
                            v14.zzixw = v15_1;
                        }
                        v2_5++;
                    }
                    v3_0++;
                }
                int v3_1 = v9_1.zzixk;
                int v9_0 = v3_1.length;
                int v2_2 = 0;
                while (v2_2 < v9_0) {
                    com.google.android.gms.internal.zzcay v10_0 = v3_1[v2_2];
                    String v11_2 = com.google.android.gms.measurement.AppMeasurement$UserProperty.zzil(v10_0.zziyd);
                    if (v11_2 != null) {
                        v10_0.zziyd = v11_2;
                    }
                    v2_2++;
                }
                v4_0++;
            }
            v6_0.zzauf().zza(p17, v7_0);
            try {
                v5_0.zziyq = 0;
                int v2_14 = new byte[v5_0.zzhi()];
                v5_0.zza(com.google.android.gms.internal.zzeyf.zzn(v2_14, 0, v2_14.length));
                byte[] v18_1 = v2_14;
            } catch (int v2_15) {
                this.zzaul().zzayf().zze("Unable to serialize reduced-size config. Storing full config instead. appId", com.google.android.gms.internal.zzcbw.zzjf(p17), v2_15);
            }
            int v3_7 = this.zzauf();
            com.google.android.gms.common.internal.zzbp.zzgg(p17);
            v3_7.zzuj();
            v3_7.zzwk();
            int v2_17 = new android.content.ContentValues();
            v2_17.put("remote_config", v18_1);
            try {
                String v4_4 = v3_7.getWritableDatabase();
                String[] v7_2 = new String[1];
                v7_2[0] = p17;
            } catch (int v2_22) {
                v3_7.zzaul().zzayd().zze("Error storing remote config. appId", com.google.android.gms.internal.zzcbw.zzjf(p17), v2_22);
                v2_7 = 1;
            }
            if (((long) v4_4.update("apps", v2_17, "app_id = ?", v7_2)) != 0) {
            } else {
                v3_7.zzaul().zzayd().zzj("Failed to update remote config (got 0). appId", com.google.android.gms.internal.zzcbw.zzjf(p17));
            }
        } else {
            v2_7 = 0;
        }
        return v2_7;
    }

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


    private final void zzh(long p8, long p10)
    {
        String v0_1 = this.zzln("Error opening database for getNumStoredHits.");
        if (v0_1 != null) {
            StringBuilder 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.zzdj.zzcr(new StringBuilder(69).append("Error setting HIT_FIRST_DISPATCH_TIME for hitId: ").append(p8).toString());
                this.zzp(p8);
            }
        }
        return;
    }