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.internal.aln.a() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final boolean a(String p17, byte[] p18, String p19)
    {
        this.Q();
        void v16_1 = super.e();
        com.google.android.gms.common.internal.ae.a(p17);
        com.google.android.gms.internal.aku v0_3 = v16_1.a(p17, p18);
        if (v0_3 != null) {
            void v1_1 = this.a(p17, v0_3);
            v1_1.d.put(p17, v0_3);
            v1_1.e.put(p17, p19);
            v1_1.a.put(p17, ark>com.google.android.gms.internal.alnark>.a(v0_3));
            com.google.android.gms.internal.aku v4_3 = super.g();
            String v5_2 = v0_3.g;
            com.google.android.gms.common.internal.ae.a(v5_2);
            Object v6_0 = v5_2.length;
            int v7_0 = 0;
            while (v7_0 < v6_0) {
                String[] v8_1 = v5_2[v7_0];
                int v9_2 = v8_1.e;
                int v10_1 = v9_2.length;
                int v11_2 = 0;
                while (v11_2 < v10_1) {
                    com.google.android.gms.internal.aoz[] v12_0 = v9_2[v11_2];
                    int v13_1 = com.google.android.gms.measurement.AppMeasurement$a.a(v12_0.d);
                    if (v13_1 != 0) {
                        v12_0.d = v13_1;
                    }
                    com.google.android.gms.internal.aoz[] v12_1 = v12_0.e;
                    int v13_2 = v12_1.length;
                    int v14 = 0;
                    while (v14 < v13_2) {
                        com.google.android.gms.internal.aoz v15 = v12_1[v14];
                        int v3_1 = com.google.android.gms.measurement.AppMeasurement$d.a(v15.f);
                        if (v3_1 != 0) {
                            v15.f = v3_1;
                        }
                        v14++;
                    }
                    v11_2++;
                }
                int v3_10 = v8_1.d;
                String[] v8_2 = v3_10.length;
                int v9_0 = 0;
                while (v9_0 < v8_2) {
                    int v10_0 = v3_10[v9_0];
                    int v11_1 = com.google.android.gms.measurement.AppMeasurement$e.a(v10_0.d);
                    if (v11_1 != 0) {
                        v10_0.d = v11_1;
                    }
                    v9_0++;
                }
                v7_0++;
            }
            v4_3.p().a(p17, v5_2);
            try {
                v0_3.g = 0;
                int v3_5 = new byte[v0_3.e()];
                v0_3.a(com.google.android.gms.internal.g.a(v3_5, 0, v3_5.length));
            } catch (com.google.android.gms.internal.aku v0_0) {
                super.v().A().a("Unable to serialize reduced-size config. Storing full config instead. appId", com.google.android.gms.internal.aks.a(p17), v0_0);
                v3_5 = p18;
            }
            com.google.android.gms.internal.aku v4_7 = super.p();
            com.google.android.gms.common.internal.ae.a(p17);
            v4_7.e();
            v4_7.Q();
            com.google.android.gms.internal.aku v0_2 = new android.content.ContentValues();
            v0_2.put("remote_config", v3_5);
            try {
                String v5_6 = v4_7.B();
                String[] v8_0 = new String[1];
                v8_0[0] = p17;
            } catch (com.google.android.gms.internal.aku v0_6) {
                v4_7.v().y().a("Error storing remote config. appId", com.google.android.gms.internal.aks.a(p17), v0_6);
                return 1;
            }
            if (((long) v5_6.update("apps", v0_2, "app_id = ?", v8_0)) != 0) {
                return 1;
            } else {
                v4_7.v().y().a("Failed to update remote config (got 0). appId", com.google.android.gms.internal.aks.a(p17));
                return 1;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.h() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final long h(String p14, String p15)
    {
        com.google.android.gms.common.internal.ae.a(p14);
        com.google.android.gms.common.internal.ae.a(p15);
        this.e();
        this.Q();
        android.database.sqlite.SQLiteDatabase v0 = this.B();
        v0.beginTransaction();
        try {
            String v4_2 = new StringBuilder((String.valueOf(p15).length() + 32));
            v4_2.append("select ");
            v4_2.append(p15);
            v4_2.append(" from app2 where app_id=?");
            Object v3_4 = v4_2.toString();
            Object v5_1 = new String[1];
            v5_1[0] = p14;
            com.google.android.gms.internal.aku v9_0 = this.a(v3_4, v5_1, -1);
        } catch (Object v14_2) {
            v0.endTransaction();
            throw v14_2;
        } catch (Object v3_9) {
            v9_0 = 0;
            this.v().y().a("Error inserting column. appId", com.google.android.gms.internal.aks.a(p14), p15, v3_9);
            v0.endTransaction();
            return v9_0;
        }
        if (v9_0 == -1) {
            Object v3_7 = new android.content.ContentValues();
            v3_7.put("app_id", p14);
            v3_7.put("first_open_count", Integer.valueOf(0));
            v3_7.put("previous_install_count", Integer.valueOf(0));
            if (v0.insertWithOnConflict("app2", 0, v3_7, 5) != -1) {
                v9_0 = 0;
            } else {
                this.v().y().a("Failed to insert column (got -1). appId", com.google.android.gms.internal.aks.a(p14), p15);
                v0.endTransaction();
                return -1;
            }
        }
        try {
            Object v3_11 = new android.content.ContentValues();
            v3_11.put("app_id", p14);
            v3_11.put(p15, Long.valueOf((1 + v9_0)));
            String v4_4 = new String[1];
            v4_4[0] = p14;
        } catch (Object v3_9) {
        }
        if (((long) v0.update("app2", v3_11, "app_id = ?", v4_4)) != 0) {
            v0.setTransactionSuccessful();
            v0.endTransaction();
            return v9_0;
        } else {
            this.v().y().a("Failed to update column (got 0). appId", com.google.android.gms.internal.aks.a(p14), p15);
            v0.endTransaction();
            return -1;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final void a(com.google.android.gms.internal.ajm p8)
    {
        com.google.android.gms.common.internal.ae.a(p8);
        this.e();
        this.Q();
        com.google.android.gms.internal.aku v0_5 = new android.content.ContentValues();
        v0_5.put("app_id", p8.b());
        v0_5.put("app_instance_id", p8.c());
        v0_5.put("gmp_app_id", p8.d());
        v0_5.put("resettable_device_id_hash", p8.e());
        v0_5.put("last_bundle_index", Long.valueOf(p8.o()));
        v0_5.put("last_bundle_start_timestamp", Long.valueOf(p8.g()));
        v0_5.put("last_bundle_end_timestamp", Long.valueOf(p8.h()));
        v0_5.put("app_version", p8.i());
        v0_5.put("app_store", p8.k());
        v0_5.put("gmp_version", Long.valueOf(p8.l()));
        v0_5.put("dev_cert_hash", Long.valueOf(p8.m()));
        v0_5.put("measurement_enabled", Boolean.valueOf(p8.n()));
        v0_5.put("day", Long.valueOf(p8.s()));
        v0_5.put("daily_public_events_count", Long.valueOf(p8.t()));
        v0_5.put("daily_events_count", Long.valueOf(p8.u()));
        v0_5.put("daily_conversions_count", Long.valueOf(p8.v()));
        v0_5.put("config_fetched_time", Long.valueOf(p8.p()));
        v0_5.put("failed_config_fetch_time", Long.valueOf(p8.q()));
        v0_5.put("app_version_int", Long.valueOf(p8.j()));
        v0_5.put("firebase_instance_id", p8.f());
        v0_5.put("daily_error_events_count", Long.valueOf(p8.x()));
        v0_5.put("daily_realtime_events_count", Long.valueOf(p8.w()));
        v0_5.put("health_monitor_sample", p8.y());
        v0_5.put("android_id", Long.valueOf(p8.A()));
        try {
            String v1_7 = this.B();
            long v4_1 = new String[1];
            v4_1[0] = p8.b();
        } catch (com.google.android.gms.internal.aku v0_3) {
            this.v().y().a("Error storing app. appId", com.google.android.gms.internal.aks.a(p8.b()), v0_3);
            return;
        }
        if ((((long) v1_7.update("apps", v0_5, "app_id = ?", v4_1)) == 0) && (v1_7.insertWithOnConflict("apps", 0, v0_5, 5) == -1)) {
            this.v().y().a("Failed to insert/update app (got -1). appId", com.google.android.gms.internal.aks.a(p8.b()));
        }
        return;
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final com.google.android.gms.internal.aju a(long p16, String p18, boolean p19, boolean p20, boolean p21, boolean p22, boolean p23)
    {
        com.google.android.gms.common.internal.ae.a(p18);
        this.e();
        this.Q();
        String v2_1 = new String[1];
        v2_1[0] = p18;
        com.google.android.gms.internal.aju v4_1 = new com.google.android.gms.internal.aju();
        String v5_8 = 0;
        try {
            android.database.sqlite.SQLiteDatabase v14 = this.B();
            String[] v10 = "daily_public_events_count";
            int v12 = "daily_error_events_count";
            v10 = new String[1];
            v10[0] = p18;
            int v6_1 = v14.query("apps", new String[] {"day", "daily_realtime_events_count"}), "app_id=?", v10, 0, 0, 0);
            try {
                if (v6_1.moveToFirst()) {
                    if (v6_1.getLong(0) == p16) {
                        v4_1.b = v6_1.getLong(1);
                        v4_1.a = v6_1.getLong(2);
                        v4_1.c = v6_1.getLong(3);
                        v4_1.d = v6_1.getLong(4);
                        v4_1.e = v6_1.getLong(5);
                    }
                    if (p19) {
                        v4_1.b = (v4_1.b + 1);
                    }
                    if (p20) {
                        v4_1.a = (v4_1.a + 1);
                    }
                    if (p21) {
                        v4_1.c = (v4_1.c + 1);
                    }
                    if (p22) {
                        v4_1.d = (v4_1.d + 1);
                    }
                    if (p23) {
                        v4_1.e = (v4_1.e + 1);
                    }
                    android.content.ContentValues v0_1 = new android.content.ContentValues();
                    v0_1.put("day", Long.valueOf(p16));
                    v0_1.put("daily_public_events_count", Long.valueOf(v4_1.a));
                    v0_1.put("daily_events_count", Long.valueOf(v4_1.b));
                    v0_1.put("daily_conversions_count", Long.valueOf(v4_1.c));
                    v0_1.put("daily_error_events_count", Long.valueOf(v4_1.d));
                    v0_1.put("daily_realtime_events_count", Long.valueOf(v4_1.e));
                    v14.update("apps", v0_1, "app_id=?", v2_1);
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                } else {
                    this.v().A().a("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.aks.a(p18));
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                }
            } catch (android.content.ContentValues v0_10) {
                if (v6_1 != 0) {
                    v6_1.close();
                }
                throw v0_10;
            } catch (android.content.ContentValues v0_5) {
                v5_8 = v6_1;
                this.v().y().a("Error updating daily counts. appId", com.google.android.gms.internal.aks.a(p18), v0_5);
                if (v5_8 != null) {
                    v5_8.close();
                }
                return v4_1;
            }
        } catch (android.content.ContentValues v0_10) {
            v6_1 = v5_8;
        } catch (android.content.ContentValues v0_5) {
        }
    }

Method com.google.android.gms.internal.ata.a() calling method android.database.sqlite.SQLiteDatabase.update()


    private final void a(long p6, long p8)
    {
        StringBuilder v0_1 = this.b("Error opening database for getNumStoredHits.");
        if (v0_1 != null) {
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.put("hit_first_send_time", Long.valueOf(p8));
            try {
                String[] v2_1 = new String[1];
                v2_1[0] = String.valueOf(p6);
                v0_1.update("gtm_hits", v1_1, "hit_id=?", v2_1);
                return;
            } catch (String v8_2) {
                String v8_4 = String.valueOf(v8_2.getMessage());
                StringBuilder v0_3 = new StringBuilder((String.valueOf(v8_4).length() + 70));
                v0_3.append("Error setting HIT_FIRST_DISPATCH_TIME for hitId ");
                v0_3.append(p6);
                v0_3.append(": ");
                v0_3.append(v8_4);
                com.google.android.gms.internal.asx.b(v0_3.toString());
                this.a(p6);
                return;
            }
        } else {
            return;
        }
    }

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


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

Method com.google.android.gms.internal.wo.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long a(String p1, String[] p2, long p3)
    {
        String v4 = 0;
        try {
            String v2_2 = this.A().rawQuery(p1, p2);
            try {
                if (!v2_2.moveToFirst()) {
                    if (v2_2 != null) {
                        v2_2.close();
                    }
                    return 0;
                } else {
                    long v3_2 = v2_2.getLong(0);
                    if (v2_2 != null) {
                        v2_2.close();
                    }
                    return v3_2;
                }
            } catch (long v1_1) {
                v4 = v2_2;
                if (v4 != null) {
                    v4.close();
                }
                throw v1_1;
            } catch (long v3_3) {
                v4 = v2_2;
                this.d("Database error", p1, v3_3);
                throw v3_3;
            }
        } catch (long v1_1) {
        } catch (long v3_3) {
        }
    }

Method com.google.android.gms.internal.wo.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long a(String p4, String[] p5)
    {
        try {
            int v5_1 = this.A().rawQuery(p4, 0);
            try {
                if (!v5_1.moveToFirst()) {
                    throw new android.database.sqlite.SQLiteException("Database returned empty set");
                } else {
                    android.database.sqlite.SQLiteException v0_6 = v5_1.getLong(0);
                    if (v5_1 != 0) {
                        v5_1.close();
                    }
                    return v0_6;
                }
            } catch (android.database.sqlite.SQLiteException v0_3) {
                this.d("Database error", p4, v0_3);
                throw v0_3;
            }
        } catch (Throwable v4_1) {
            v5_1 = 0;
            if (v5_1 != 0) {
                v5_1.close();
            }
            throw v4_1;
        } catch (int v5_2) {
            v0_3 = v5_2;
            v5_1 = 0;
        } catch (Throwable v4_1) {
        }
    }

Method com.google.android.gms.internal.ako.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(int p18, byte[] p19)
    {
        super.c();
        void v17_1 = super.e();
        Long v2_7 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p18));
            v3_1.put("entry", p19);
            com.google.android.gms.internal.ajs.ai();
            Long v4_5 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_5) {
                int v7 = 0;
                try {
                    int v9 = v17_1.y();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_0 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            if ((v12 != 0) && (v12.moveToFirst())) {
                                v10_0 = v12.getLong(v2_7);
                            }
                            if (v10_0 >= 100000) {
                                super.v().y().a("Data loss, local db full");
                                long v13_2 = ((100000 - v10_0) + 1);
                                String[] v11 = new String[1];
                                v11[v2_7] = Long.toString(v13_2);
                                Long v10_3 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                if (v10_3 != v13_2) {
                                    super.v().y().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_3), Long.valueOf((v13_2 - v10_3)));
                                }
                            }
                            v9.insertOrThrow("messages", 0, v3_1);
                            v9.setTransactionSuccessful();
                            v9.endTransaction();
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v9 != 0) {
                                v9.close();
                            }
                            return 1;
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_7;
                        }
                        v7 = v9;
                        try {
                            if (android.os.Build$VERSION.SDK_INT < 11) {
                                if (v7 != 0) {
                                    if (v7.inTransaction()) {
                                        v7.endTransaction();
                                    }
                                }
                                super.v().y().a("Error writing entry to local database", com.google.android.gms.internal.aku v0_0);
                                this.b = 1;
                            } else {
                                if (!(v0_0 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                } else {
                                    android.os.SystemClock.sleep(((long) v6));
                                    v6 += 20;
                                }
                            }
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v7 == 0) {
                                v5++;
                                v2_7 = 0;
                                v4_5 = 5;
                            } else {
                                v7.close();
                            }
                        } catch (com.google.android.gms.internal.aku v0_2) {
                            v9 = v7;
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v9 != 0) {
                                v9.close();
                            }
                            throw v0_2;
                        }
                    } catch (com.google.android.gms.internal.aku v0_3) {
                        super.v().y().a("Error writing entry to local database", v0_3);
                        this.b = 1;
                        if (v7 != 0) {
                            v7.close();
                        }
                        if (v9 == 0) {
                        } else {
                            v9.close();
                        }
                    } catch (com.google.android.gms.internal.aku v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.internal.aku v0_2) {
                    v9 = 0;
                    v12 = 0;
                } catch (com.google.android.gms.internal.aku v0_3) {
                    v9 = 0;
                } catch (com.google.android.gms.internal.aku v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.internal.aku v0_2) {
                    v12 = v7;
                }
            }
            super.v().A().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String a(long p5)
    {
        this.e();
        this.Q();
        try {
            String v1_3 = this.B();
            String[] v3_1 = new String[1];
            v3_1[0] = String.valueOf(p5);
            int v5_1 = v1_3.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_1);
            try {
                if (v5_1.moveToFirst()) {
                    String v6_3 = v5_1.getString(0);
                    if (v5_1 != 0) {
                        v5_1.close();
                    }
                    return v6_3;
                } else {
                    this.v().E().a("No expired configs for apps with pending events");
                    if (v5_1 != 0) {
                        v5_1.close();
                    }
                    return 0;
                }
            } catch (String v6_1) {
                this.v().y().a("Error selecting expired configs", v6_1);
                if (v5_1 != 0) {
                    v5_1.close();
                }
                return 0;
            }
        } catch (String v6_2) {
            v5_1 = 0;
            if (v5_1 != 0) {
                v5_1.close();
            }
            throw v6_2;
        } catch (String v6_1) {
            v5_1 = 0;
        } catch (String v6_2) {
        }
    }

Method com.google.android.gms.internal.ajt.J() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long J()
    {
        int v2_0 = 0;
        try {
            android.database.sqlite.SQLiteException v3_2 = this.B().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
            try {
                if (v3_2.moveToFirst()) {
                    long v4_0 = v3_2.getLong(0);
                    if (v3_2 != null) {
                        v3_2.close();
                    }
                    return v4_0;
                } else {
                    if (v3_2 != null) {
                        v3_2.close();
                    }
                    return -1;
                }
            } catch (Throwable v0_1) {
                v2_0 = v3_2;
                if (v2_0 != 0) {
                    v2_0.close();
                }
                throw v0_1;
            } catch (int v2_2) {
                android.database.sqlite.SQLiteException v3_0 = v2_2;
                v2_0 = v3_2;
                this.v().y().a("Error querying raw events", v3_0);
                if (v2_0 != 0) {
                    v2_0.close();
                }
                return -1;
            }
        } catch (Throwable v0_1) {
        } catch (android.database.sqlite.SQLiteException v3_0) {
        }
    }

Method com.google.android.gms.internal.ajt.C() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String C()
    {
        try {
            Throwable v0_1 = this.B().rawQuery("select app_id from queue order by has_realtime desc, rowid asc limit 1;", 0);
            try {
                if (!v0_1.moveToFirst()) {
                    if (v0_1 != null) {
                        v0_1.close();
                    }
                    return 0;
                } else {
                    String v2_4 = v0_1.getString(0);
                    if (v0_1 != null) {
                        v0_1.close();
                    }
                    return v2_4;
                }
            } catch (String v2_1) {
                this.v().y().a("Database error getting next bundle app id", v2_1);
                if (v0_1 != null) {
                    v0_1.close();
                }
                return 0;
            }
        } catch (Throwable v0_2) {
            Throwable v1_0 = v0_2;
            v0_1 = 0;
            if (v0_1 != null) {
                v0_1.close();
            }
            throw v1_0;
        } catch (String v2_1) {
            v0_1 = 0;
        } catch (Throwable v1_0) {
        }
    }

Method com.google.android.gms.internal.ajt.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long b(String p4, String[] p5)
    {
        String v1_1 = 0;
        try {
            com.google.android.gms.internal.aku v5_3 = this.B().rawQuery(p4, p5);
            try {
                if (!v5_3.moveToFirst()) {
                    throw new android.database.sqlite.SQLiteException("Database returned empty set");
                } else {
                    android.database.sqlite.SQLiteException v0_4 = v5_3.getLong(0);
                    if (v5_3 != null) {
                        v5_3.close();
                    }
                    return v0_4;
                }
            } catch (Throwable v4_1) {
                if (v5_3 != null) {
                    v5_3.close();
                }
                throw v4_1;
            } catch (android.database.sqlite.SQLiteException v0_2) {
                v1_1 = v5_3;
                this.v().y().a("Database error", p4, v0_2);
                throw v0_2;
            }
        } catch (Throwable v4_1) {
            v5_3 = v1_1;
        } catch (android.database.sqlite.SQLiteException v0_2) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


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

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long a(String p3, String[] p4, long p5)
    {
        com.google.android.gms.internal.aku v1 = 0;
        try {
            com.google.android.gms.internal.aku v4_3 = this.B().rawQuery(p3, p4);
            try {
                if (!v4_3.moveToFirst()) {
                    if (v4_3 != null) {
                        v4_3.close();
                    }
                    return p5;
                } else {
                    long v5_2 = v4_3.getLong(0);
                    if (v4_3 != null) {
                        v4_3.close();
                    }
                    return v5_2;
                }
            } catch (Throwable v3_1) {
                v1 = v4_3;
                if (v1 != null) {
                    v1.close();
                }
                throw v3_1;
            } catch (long v5_3) {
                v1 = v4_3;
                this.v().y().a("Database error", p3, v5_3);
                throw v5_3;
            }
        } catch (Throwable v3_1) {
        } catch (long v5_3) {
        }
    }

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


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

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


    public Object queryForOne(String p3, Object[] p4, com.j256.ormlite.field.FieldType[] p5, com.j256.ormlite.stmt.GenericRowMapper p6, com.j256.ormlite.dao.ObjectCache p7)
    {
        Object v5_0 = 0;
        try {
            int v4_1 = this.db.rawQuery(p3, this.toStrings(p4));
            try {
                android.database.SQLException v0_1 = new com.j256.ormlite.android.AndroidDatabaseResults(v4_1, p7, 1);
                try {
                    com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: queried for one result: {}", this, p3);
                } catch (Object v5_1) {
                    boolean v6_4 = new StringBuilder();
                    v6_4.append("queryForOne from database failed: ");
                    v6_4.append(p3);
                    throw com.j256.ormlite.misc.SqlExceptionUtil.create(v6_4.toString(), v5_1);
                }
                if (v0_1.first()) {
                    v5_0 = p6.mapRow(v0_1);
                    if (v0_1.next()) {
                        v5_0 = com.j256.ormlite.android.AndroidDatabaseConnection.MORE_THAN_ONE;
                    }
                }
                com.j256.ormlite.misc.IOUtils.closeQuietly(v0_1);
                this.closeQuietly(v4_1);
                return v5_0;
            } catch (Throwable v3_1) {
                v0_1 = 0;
                com.j256.ormlite.misc.IOUtils.closeQuietly(v0_1);
                this.closeQuietly(v4_1);
                throw v3_1;
            } catch (boolean v6_1) {
                v0_1 = 0;
                v5_1 = v6_1;
            }
        } catch (Throwable v3_1) {
            v4_1 = 0;
            v0_1 = 0;
        } catch (int v4_3) {
            v0_1 = 0;
            v5_1 = v4_3;
            v4_1 = 0;
        } catch (Throwable v3_1) {
        }
    }

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


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

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


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

Method com.google.android.gms.internal.ata.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final int a(String p6)
    {
        android.database.sqlite.SQLiteException v0_1 = this.b("Error opening database for getNumRecords.");
        int v1 = 0;
        if (v0_1 != null) {
            long v2_0 = 0;
            try {
                android.database.sqlite.SQLiteException v6_2;
                android.database.sqlite.SQLiteException v6_10 = String.valueOf(p6);
            } catch (android.database.sqlite.SQLiteException v6_9) {
                if (v2_0 != 0) {
                    v2_0.close();
                }
                throw v6_9;
            } catch (android.database.sqlite.SQLiteException v6_4) {
                android.database.sqlite.SQLiteException v6_6 = String.valueOf(v6_4.getMessage());
                if (v6_6.length() == 0) {
                    android.database.sqlite.SQLiteException v6_8 = new String("Error getting numStoredRecords: ");
                } else {
                    v6_8 = "Error getting numStoredRecords: ".concat(v6_6);
                }
                com.google.android.gms.internal.asx.b(v6_8);
                if (v2_0 == 0) {
                    return v1;
                } else {
                    v2_0.close();
                    return v1;
                }
                if (android.database.sqlite.SQLiteException v6_3 == null) {
                    return v1;
                } else {
                    v6_3.close();
                    return v1;
                }
            }
            if (v6_10.length() == 0) {
                v6_2 = new String("SELECT COUNT(*) from ");
            } else {
                v6_2 = "SELECT COUNT(*) from ".concat(v6_10);
            }
            v6_3 = v0_1.rawQuery(v6_2, 0);
            try {
                if (v6_3.moveToFirst()) {
                    v1 = ((int) v6_3.getLong(0));
                }
            } catch (android.database.sqlite.SQLiteException v0_5) {
                v2_0 = v6_3;
                v6_9 = v0_5;
            } catch (android.database.sqlite.SQLiteException v0_3) {
                v2_0 = v6_3;
                v6_4 = v0_3;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.wp.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) {
            String v0_11 = p6.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_11.moveToFirst();
                v0_11.close();
            } catch (android.database.sqlite.SQLiteException v6_5) {
                v0_11.close();
                throw v6_5;
            }
        }
        String v0_8;
        if (this.a(p6, "hits2")) {
            String v0_4 = com.google.android.gms.internal.wp.b(p6, "hits2");
            int v2_1 = 0;
            while (v2_1 < 4) {
                String v3_2 = new String[] {"hit_id", "hit_string", "hit_time", "hit_url"})[v2_1];
                if (v0_4.remove(v3_2)) {
                    v2_1++;
                } else {
                    String v0_10;
                    String v1_7 = String.valueOf(v3_2);
                    if (v1_7.length() == 0) {
                        v0_10 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_10 = "Database hits2 is missing required column: ".concat(v1_7);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_10);
                }
            }
            String v1_5 = (v0_4.remove("hit_app_id") ^ 1);
            if (!v0_4.isEmpty()) {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            } else {
                if (v1_5 != null) {
                    v0_8 = "ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER";
                    p6.execSQL(v0_8);
                }
            }
        } else {
            v0_8 = com.google.android.gms.internal.wo.B();
        }
        if (this.a(p6, "properties")) {
            com.google.android.gms.internal.wp.a(p6);
            return;
        } else {
            p6.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.wp.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private static java.util.Set b(android.database.sqlite.SQLiteDatabase p3, String p4)
    {
        java.util.HashSet v0_1 = new java.util.HashSet();
        Throwable v2_3 = new StringBuilder((String.valueOf(p4).length() + 22));
        v2_3.append("SELECT * FROM ");
        v2_3.append(p4);
        v2_3.append(" LIMIT 0");
        android.database.Cursor v3_1 = p3.rawQuery(v2_3.toString(), 0);
        try {
            Throwable v4_3 = v3_1.getColumnNames();
            int v1_1 = 0;
        } catch (Throwable v4_4) {
            v3_1.close();
            throw v4_4;
        }
        while (v1_1 < v4_3.length) {
            v0_1.add(v4_3[v1_1]);
            v1_1++;
        }
        v3_1.close();
        return v0_1;
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p10)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_15 = p10.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_15.moveToFirst();
                v0_15.close();
            } catch (Throwable v10_1) {
                v0_15.close();
                throw v10_1;
            }
        }
        if (com.google.android.gms.internal.atc.a("gtm_hit_unique_ids", p10)) {
            com.google.android.gms.internal.atc.a(p10, "gtm_hit_unique_ids", java.util.Arrays.asList(new String[] {"hit_unique_id"})));
        } else {
            p10.execSQL(com.google.android.gms.internal.ata.b());
        }
        if (com.google.android.gms.internal.atc.a("gtm_hits", p10)) {
            String v3 = "hit_time";
            String v5 = "hit_method";
            String v7 = "hit_headers";
            com.google.android.gms.internal.atc.a(p10, "gtm_hits", java.util.Arrays.asList(new String[] {"hit_id", "hit_body"})));
        } else {
            p10.execSQL(com.google.android.gms.internal.ata.c());
        }
        p10.execSQL(com.google.android.gms.internal.ata.d());
        p10.execSQL(com.google.android.gms.internal.ata.e());
        return;
    }

Method com.google.android.gms.internal.atc.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private static void a(android.database.sqlite.SQLiteDatabase p5, String p6, java.util.List p7)
    {
        int v1_4 = new StringBuilder((String.valueOf(p6).length() + 22));
        v1_4.append("SELECT * FROM ");
        v1_4.append(p6);
        v1_4.append(" WHERE 0");
        android.database.sqlite.SQLiteException v5_1 = p5.rawQuery(v1_4.toString(), 0);
        Object[] v0_4 = new java.util.HashSet();
        try {
            int v1_1 = v5_1.getColumnNames();
            boolean v3_0 = 0;
        } catch (String v6_1) {
            v5_1.close();
            throw v6_1;
        }
        while (v3_0 < v1_1.length) {
            v0_4.add(v1_1[v3_0]);
            v3_0++;
        }
        v5_1.close();
        android.database.sqlite.SQLiteException v5_2 = p7.iterator();
        while (v5_2.hasNext()) {
            Object[] v7_4 = ((String) v5_2.next());
            if (!v0_4.remove(v7_4)) {
                Object[] v0_8 = new Object[2];
                v0_8[0] = v7_4;
                v0_8[1] = p6;
                throw new android.database.sqlite.SQLiteException(String.format("Database column %s missing in table %s.", v0_8));
            }
        }
        if (!v0_4.isEmpty()) {
            Object[] v7_2 = new Object[1];
            v7_2[0] = p6;
            throw new android.database.sqlite.SQLiteException(String.format("Database has extra columns in table %s.", v7_2));
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(String p27, long p28)
    {
        this.q().y();
        try {
            String v3_0 = 0;
            com.google.android.gms.internal.ajt v2_14 = new ark>com.google.android.gms.internal.altark>$a(this, 0);
            Object v4_20 = this.q();
            android.database.sqlite.SQLiteException v5_11 = this.J;
            com.google.android.gms.common.internal.ae.a(v2_14);
            v4_20.e();
            v4_20.Q();
            int v11_0 = 0;
            try {
                String v21_1;
                int v22;
                int v15_2 = v4_20.B();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Long v12_21;
                        if (v5_11 == -1) {
                            v3_0 = 0;
                            v12_21 = new String[] {0});
                        } else {
                            String v3_3 = new String[2];
                            v3_3[0] = 0;
                            v3_3[1] = String.valueOf(v5_11);
                            v12_21 = v3_3;
                            v3_0 = 0;
                        }
                        int v13_9;
                        if (v5_11 == -1) {
                            v13_9 = "";
                        } else {
                            v13_9 = " and rowid <= ?";
                        }
                        String v3_10 = new StringBuilder((String.valueOf(v13_9).length() + 84));
                        v3_10.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v3_10.append(v13_9);
                        v3_10.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_10.toString(), v12_21);
                        if (v3_0.moveToFirst()) {
                            int v13_12 = v3_0.getString(0);
                            v3_0.close();
                            v22 = v3_0;
                            v21_1 = v13_12;
                            v3_0 = 0;
                            try {
                                Long v12_3 = new String[2];
                                v12_3[0] = v3_0;
                                v12_3[1] = v21_1;
                                android.database.sqlite.SQLiteDatabase v24 = v15_2;
                                int v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_3, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Long v12_6 = v15_1.getBlob(0);
                                        Long v12_7 = com.google.android.gms.internal.f.a(v12_6, 0, v12_6.length);
                                        int v13_4 = new com.google.android.gms.internal.apk();
                                        try {
                                            v13_4.a(v12_7);
                                        } catch (java.io.IOException v0_5) {
                                            boolean v6_0 = v15_1;
                                            v4_20.v().y().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.aks.a(v3_0), v0_5);
                                            if (!v6_0) {
                                                String v3_7;
                                                if (v2_14.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_14.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.q().z();
                                                    this.q().A();
                                                    return 0;
                                                } else {
                                                    String v3_8 = v2_14.a;
                                                    Object v4_4 = new com.google.android.gms.internal.aph[v2_14.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_5 = 0;
                                                    android.database.sqlite.SQLiteException v5_7 = 0;
                                                    boolean v6_12 = 0;
                                                    while (v4_5 < v2_14.c.size()) {
                                                        if (!this.j().b(v2_14.a.q, ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) {
                                                            com.google.android.gms.internal.aku v7_39 = this.j().c(v2_14.a.q, ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d);
                                                            if (v7_39 != null) {
                                                                if (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c == null) {
                                                                    Object v9_17 = new com.google.android.gms.internal.api[v11_0];
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v9_17;
                                                                }
                                                                String v8_34 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c;
                                                                Object v9_18 = v8_34.length;
                                                                Long v12_26 = 0;
                                                                int v13_13 = 0;
                                                                Object v14_8 = 0;
                                                                while (v12_26 < v9_18) {
                                                                    int v11_31 = v8_34[v12_26];
                                                                    if (!"_c".equals(v11_31.c)) {
                                                                        if ("_r".equals(v11_31.c)) {
                                                                            v11_31.e = Long.valueOf(1);
                                                                            v14_8 = 1;
                                                                        }
                                                                    } else {
                                                                        v11_31.e = Long.valueOf(1);
                                                                        v13_13 = 1;
                                                                    }
                                                                    v12_26++;
                                                                    int v11 = 0;
                                                                }
                                                                if ((v13_13 == 0) && (v7_39 != null)) {
                                                                    this.f().E().a("Marking event as conversion", this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                                    String v8_42 = ((com.google.android.gms.internal.api[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c, (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c.length + 1)));
                                                                    Object v9_27 = new com.google.android.gms.internal.api();
                                                                    v9_27.c = "_c";
                                                                    v9_27.e = Long.valueOf(1);
                                                                    v8_42[(v8_42.length - 1)] = v9_27;
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v8_42;
                                                                }
                                                                if (v14_8 == null) {
                                                                    this.f().E().a("Marking event as real-time", this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                                    String v8_50 = ((com.google.android.gms.internal.api[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c, (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c.length + 1)));
                                                                    Object v9_39 = new com.google.android.gms.internal.api();
                                                                    v9_39.c = "_r";
                                                                    v9_39.e = Long.valueOf(1);
                                                                    v8_50[(v8_50.length - 1)] = v9_39;
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v8_50;
                                                                }
                                                                if (this.q().a(this.K(), v2_14.a.q, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v2_14.a.q))) {
                                                                    v5_7 = 1;
                                                                } else {
                                                                    String v8_56 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                                    Object v9_43 = 0;
                                                                    while (v9_43 < v8_56.c.length) {
                                                                        if (!"_r".equals(v8_56.c[v9_43].c)) {
                                                                            v9_43++;
                                                                        } else {
                                                                            int v10_28 = new com.google.android.gms.internal.api[(v8_56.c.length - 1)];
                                                                            if (v9_43 > null) {
                                                                                System.arraycopy(v8_56.c, 0, v10_28, 0, v9_43);
                                                                            }
                                                                            if (v9_43 < v10_28.length) {
                                                                                System.arraycopy(v8_56.c, (v9_43 + 1), v10_28, v9_43, (v10_28.length - v9_43));
                                                                            }
                                                                            v8_56.c = v10_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                }
                                                                if ((com.google.android.gms.internal.aow.a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) && ((v7_39 != null) && (this.q().a(this.K(), v2_14.a.q, 0, 0, 1, 0, 0).c > ((long) this.c.b(v2_14.a.q, com.google.android.gms.internal.aki.o))))) {
                                                                    this.f().A().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                                    com.google.android.gms.internal.aku v7_47 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                                    String v8_63 = v7_47.c;
                                                                    int v10_32 = 0;
                                                                    int v11_29 = 0;
                                                                    Long v12_34 = 0;
                                                                    while (v10_32 < v8_63.length) {
                                                                        int v13_24 = v8_63[v10_32];
                                                                        if (!"_c".equals(v13_24.c)) {
                                                                            if ("_err".equals(v13_24.c)) {
                                                                                v11_29 = 1;
                                                                            }
                                                                        } else {
                                                                            v12_34 = v13_24;
                                                                        }
                                                                        v10_32++;
                                                                    }
                                                                    if ((v11_29 == 0) || (v12_34 == null)) {
                                                                        if (v12_34 == null) {
                                                                            this.f().y().a("Did not find conversion parameter. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                                        } else {
                                                                            v12_34.c = "_err";
                                                                            v12_34.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        String v8_68 = new com.google.android.gms.internal.api[(v7_47.c.length - 1)];
                                                                        Object v9_56 = v7_47.c;
                                                                        int v10_33 = v9_56.length;
                                                                        int v11_30 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_30 < v10_33) {
                                                                            Object v14_11 = v9_56[v11_30];
                                                                            if (v14_11 != v12_34) {
                                                                                int v15_6 = (v13_23 + 1);
                                                                                v8_68[v13_23] = v14_11;
                                                                                v13_23 = v15_6;
                                                                            }
                                                                            v11_30++;
                                                                        }
                                                                        v7_47.c = v8_68;
                                                                    }
                                                                }
                                                            } else {
                                                                this.o();
                                                                if (com.google.android.gms.internal.aow.n(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) {
                                                                }
                                                            }
                                                            String v8_69 = (v6_12 + 1);
                                                            v3_8.d[v6_12] = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                            v6_12 = v8_69;
                                                        } else {
                                                            com.google.android.gms.internal.aku v7_60;
                                                            this.f().A().a("Dropping blacklisted raw event. appId", com.google.android.gms.internal.aks.a(v2_14.a.q), this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                            if (this.o().l(v2_14.a.q)) {
                                                                v7_60 = 1;
                                                            } else {
                                                                if (!this.o().m(v2_14.a.q)) {
                                                                    v7_60 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_60 == null) && (!"_err".equals(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d))) {
                                                                this.o().a(v2_14.a.q, 11, "_ev", ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d, 0);
                                                            }
                                                        }
                                                        v4_5++;
                                                        v11_0 = 0;
                                                    }
                                                    if (v6_12 < v2_14.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.internal.aph[]) java.util.Arrays.copyOf(v3_8.d, v6_12));
                                                    }
                                                    v3_8.C = this.a(v2_14.a.q, v2_14.a.e, v3_8.d);
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_16 = 0;
                                                    while (v4_16 < v3_8.d.length) {
                                                        boolean v6_38 = v3_8.d[v4_16];
                                                        if (v6_38.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v6_38.e;
                                                        }
                                                        if (v6_38.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v6_38.e;
                                                        }
                                                        v4_16++;
                                                    }
                                                    Object v4_18 = v2_14.a.q;
                                                    boolean v6_20 = this.q().b(v4_18);
                                                    if (v6_20) {
                                                        if (v3_8.d.length > 0) {
                                                            int v11_2;
                                                            com.google.android.gms.internal.aku v7_13 = v6_20.h();
                                                            if (v7_13 == 0) {
                                                                v11_2 = 0;
                                                            } else {
                                                                v11_2 = Long.valueOf(v7_13);
                                                            }
                                                            v3_8.j = v11_2;
                                                            int v11_3 = v6_20.g();
                                                            if (v11_3 != 0) {
                                                                v7_13 = v11_3;
                                                            } else {
                                                            }
                                                            com.google.android.gms.internal.aku v7_14;
                                                            if (v7_13 == 0) {
                                                                v7_14 = 0;
                                                            } else {
                                                                v7_14 = Long.valueOf(v7_13);
                                                            }
                                                            v3_8.i = v7_14;
                                                            v6_20.r();
                                                            v3_8.y = Integer.valueOf(((int) v6_20.o()));
                                                            v6_20.a(v3_8.g.longValue());
                                                            v6_20.b(v3_8.h.longValue());
                                                            v3_8.z = v6_20.z();
                                                            this.q().a(v6_20);
                                                        }
                                                    } else {
                                                        this.f().y().a("Bundling raw events w/o app info. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        boolean v6_27;
                                                        com.google.android.gms.internal.ajs.X();
                                                        boolean v6_26 = this.j().a(v2_14.a.q);
                                                        if (!v6_26) {
                                                            if (!android.text.TextUtils.isEmpty(v2_14.a.A)) {
                                                                this.f().A().a("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                            } else {
                                                                v6_27 = Long.valueOf(-1);
                                                                v3_8.F = v6_27;
                                                            }
                                                        } else {
                                                            if (v6_26.c != null) {
                                                                v6_27 = v6_26.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.q().a(v3_8, v5_7);
                                                    }
                                                    this.q().a(v2_14.b);
                                                    com.google.android.gms.internal.ajt v2_7 = this.q();
                                                    android.database.sqlite.SQLiteException v5_9 = v2_7.B();
                                                    try {
                                                        com.google.android.gms.internal.aku v7_30 = new String[2];
                                                        v7_30[0] = v4_18;
                                                        try {
                                                            v7_30[1] = v4_18;
                                                            v5_9.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v7_30);
                                                        } catch (java.io.IOException v0_10) {
                                                            v2_7.v().y().a("Failed to remove unused event metadata. appId", com.google.android.gms.internal.aks.a(v4_18), v0_10);
                                                        }
                                                        int v25;
                                                        this.q().z();
                                                        if (v3_8.d.length <= 0) {
                                                            v25 = 0;
                                                        } else {
                                                            v25 = 1;
                                                        }
                                                        this.q().A();
                                                        return v25;
                                                    } catch (java.io.IOException v0_10) {
                                                    }
                                                }
                                            } else {
                                                v6_0.close();
                                            }
                                        } catch (java.io.IOException v0_2) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_20.v().A().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.aks.a(v3_0));
                                        }
                                        android.database.sqlite.SQLiteException v5_1;
                                        int v16_2;
                                        v15_1.close();
                                        v2_14.a(v13_4);
                                        if (v5_11 == -1) {
                                            v5_1 = "app_id = ? and metadata_fingerprint = ?";
                                            Long v12_12 = new String[2];
                                            v12_12[0] = v3_0;
                                            v12_12[1] = v21_1;
                                            v16_2 = v12_12;
                                        } else {
                                            int v13_5 = new String[3];
                                            v13_5[0] = v3_0;
                                            v13_5[1] = v21_1;
                                            v13_5[2] = String.valueOf(v5_11);
                                            v5_1 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v13_5;
                                        }
                                        v6_0 = v15_1;
                                        android.database.sqlite.SQLiteException v5_3 = v24.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_1, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_3.moveToFirst()) {
                                                do {
                                                    boolean v6_5 = v5_3.getLong(0);
                                                    String v8_1 = v5_3.getBlob(3);
                                                    String v8_2 = com.google.android.gms.internal.f.a(v8_1, 0, v8_1.length);
                                                    Long v12_19 = new com.google.android.gms.internal.aph();
                                                    v12_19.a(v8_2);
                                                    v12_19.d = v5_3.getString(1);
                                                    v12_19.e = Long.valueOf(v5_3.getLong(2));
                                                    if (v2_14.a(v6_5, v12_19)) {
                                                    } else {
                                                        if (v5_3 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_3.moveToNext());
                                                if (v5_3 == null) {
                                                }
                                            } else {
                                                v4_20.v().A().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.aks.a(v3_0));
                                                if (v5_3 == null) {
                                                }
                                            }
                                        } catch (java.io.IOException v0_8) {
                                            com.google.android.gms.internal.ajt v2_0 = v0_8;
                                            v6_0 = v5_3;
                                            if (v6_0) {
                                                v6_0.close();
                                            }
                                            throw v2_0;
                                        } catch (java.io.IOException v0_2) {
                                            String v21_0 = v3_0;
                                            v6_0 = v5_3;
                                            String v3_1 = v0_2;
                                            v4_20.v().y().a("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.aks.a(v21_0), v3_1);
                                            if (!v6_0) {
                                            }
                                        }
                                        v5_3.close();
                                    } else {
                                        v4_20.v().y().a("Raw event metadata record is missing. appId", com.google.android.gms.internal.aks.a(v3_0));
                                        if (v15_1 == 0) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (java.io.IOException v0_6) {
                                    v6_0 = v15_1;
                                    v2_0 = v0_6;
                                } catch (java.io.IOException v0_2) {
                                    v6_0 = v15_1;
                                } catch (java.io.IOException v0_9) {
                                    v2_0 = v0_9;
                                    v6_0 = v15_1;
                                } catch (java.io.IOException v0_2) {
                                    v21_0 = v3_0;
                                    v6_0 = v15_1;
                                }
                                v21_0 = v3_0;
                            } catch (java.io.IOException v0_4) {
                                v2_0 = v0_4;
                                v6_0 = v22;
                            } catch (java.io.IOException v0_2) {
                                v21_0 = v3_0;
                                v6_0 = v22;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Long v12_29;
                        if (v5_11 == -1) {
                            v12_29 = new String[1];
                            v12_29[0] = String.valueOf(p28);
                        } else {
                            v12_29 = new String[2];
                            v12_29[0] = String.valueOf(v5_11);
                            v12_29[1] = String.valueOf(p28);
                        }
                        int v13_22;
                        if (v5_11 == -1) {
                            v13_22 = "";
                        } else {
                            v13_22 = "rowid <= ? and ";
                        }
                        String v3_13 = new StringBuilder((String.valueOf(v13_22).length() + 148));
                        v3_13.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_13.append(v13_22);
                        v3_13.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_13.toString(), v12_29);
                        if (v3_0.moveToFirst()) {
                            Long v12_1 = v3_0.getString(0);
                            try {
                                int v13_0 = v3_0.getString(1);
                                v3_0.close();
                                v22 = v3_0;
                                v3_0 = v12_1;
                                v21_1 = v13_0;
                            } catch (java.io.IOException v0_2) {
                                v6_0 = v3_0;
                                v21_0 = v12_1;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (java.io.IOException v0_3) {
                    v2_0 = v0_3;
                    v6_0 = v3_0;
                } catch (java.io.IOException v0_2) {
                    v6_0 = v3_0;
                    v21_0 = v6_0;
                } catch (java.io.IOException v0_2) {
                    v6_0 = v3_0;
                    v21_0 = 0;
                }
                v3_0.close();
            } catch (java.io.IOException v0_1) {
                v2_0 = v0_1;
                v6_0 = 0;
            } catch (java.io.IOException v0_0) {
                v3_1 = v0_0;
                v6_0 = 0;
                v21_0 = 0;
            } catch (java.io.IOException v0_6) {
            }
        } catch (java.io.IOException v0_11) {
            com.google.android.gms.internal.ajt v2_15 = v0_11;
            this.q().A();
            throw v2_15;
        }
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p8)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.ako v0_3 = p8.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_3.moveToFirst();
                v0_3.close();
            } catch (Throwable v8_1) {
                v0_3.close();
                throw v8_1;
            }
        }
        com.google.android.gms.internal.ajt.a(this.a.v(), p8, "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.ajw.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p8)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.ajt v0_8 = p8.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_8.moveToFirst();
                v0_8.close();
            } catch (Throwable v8_1) {
                v0_8.close();
                throw v8_1;
            }
        }
        com.google.android.gms.internal.ajt.a(this.a.v(), p8, "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.ajt.a(this.a.v(), p8, "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.ajt.a(this.a.v(), p8, "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.ajt.K());
        com.google.android.gms.internal.ajt.a(this.a.v(), p8, "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.ajt.L());
        com.google.android.gms.internal.ajt.a(this.a.v(), p8, "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.ajt.M());
        com.google.android.gms.internal.ajt.a(this.a.v(), p8, "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.ajt.a(this.a.v(), p8, "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.ajt.N());
        com.google.android.gms.internal.ajt.a(this.a.v(), p8, "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.ajt.a(this.a.v(), p8, "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.ajt.a(this.a.v(), p8, "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.ajt.a(this.a.v(), p8, "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.ajt.O());
        return;
    }

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


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

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


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

Method com.google.android.gms.internal.ako.a() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    private final boolean a(int p18, byte[] p19)
    {
        super.c();
        void v17_1 = super.e();
        Long v2_7 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p18));
            v3_1.put("entry", p19);
            com.google.android.gms.internal.ajs.ai();
            Long v4_5 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_5) {
                int v7 = 0;
                try {
                    int v9 = v17_1.y();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_0 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            if ((v12 != 0) && (v12.moveToFirst())) {
                                v10_0 = v12.getLong(v2_7);
                            }
                            if (v10_0 >= 100000) {
                                super.v().y().a("Data loss, local db full");
                                long v13_2 = ((100000 - v10_0) + 1);
                                String[] v11 = new String[1];
                                v11[v2_7] = Long.toString(v13_2);
                                Long v10_3 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                if (v10_3 != v13_2) {
                                    super.v().y().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_3), Long.valueOf((v13_2 - v10_3)));
                                }
                            }
                            v9.insertOrThrow("messages", 0, v3_1);
                            v9.setTransactionSuccessful();
                            v9.endTransaction();
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v9 != 0) {
                                v9.close();
                            }
                            return 1;
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_7;
                        }
                        v7 = v9;
                        try {
                            if (android.os.Build$VERSION.SDK_INT < 11) {
                                if (v7 != 0) {
                                    if (v7.inTransaction()) {
                                        v7.endTransaction();
                                    }
                                }
                                super.v().y().a("Error writing entry to local database", com.google.android.gms.internal.aku v0_0);
                                this.b = 1;
                            } else {
                                if (!(v0_0 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                } else {
                                    android.os.SystemClock.sleep(((long) v6));
                                    v6 += 20;
                                }
                            }
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v7 == 0) {
                                v5++;
                                v2_7 = 0;
                                v4_5 = 5;
                            } else {
                                v7.close();
                            }
                        } catch (com.google.android.gms.internal.aku v0_2) {
                            v9 = v7;
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v9 != 0) {
                                v9.close();
                            }
                            throw v0_2;
                        }
                    } catch (com.google.android.gms.internal.aku v0_3) {
                        super.v().y().a("Error writing entry to local database", v0_3);
                        this.b = 1;
                        if (v7 != 0) {
                            v7.close();
                        }
                        if (v9 == 0) {
                        } else {
                            v9.close();
                        }
                    } catch (com.google.android.gms.internal.aku v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.internal.aku v0_2) {
                    v9 = 0;
                    v12 = 0;
                } catch (com.google.android.gms.internal.aku v0_3) {
                    v9 = 0;
                } catch (com.google.android.gms.internal.aku v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.internal.aku v0_2) {
                    v12 = v7;
                }
            }
            super.v().A().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ata.a() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()

Couldn't retrieve source code

Method com.google.android.gms.internal.wo.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final void a(com.google.android.gms.internal.xu p8)
    {
        com.google.android.gms.common.internal.ae.a(p8);
        com.google.android.gms.a.r.d();
        this.x();
        com.google.android.gms.common.internal.ae.a(p8);
        Long v0_3 = new android.net.Uri$Builder();
        android.database.sqlite.SQLiteDatabase v1_0 = p8.b().entrySet().iterator();
        while (v1_0.hasNext()) {
            String v2_1 = ((java.util.Map$Entry) v1_0.next());
            int v3_1 = ((String) v2_1.getKey());
            if ((!"ht".equals(v3_1)) && ((!"qt".equals(v3_1)) && (!"AppUID".equals(v3_1)))) {
                v0_3.appendQueryParameter(v3_1, ((String) v2_1.getValue()));
            }
        }
        Long v0_1 = v0_3.build().getEncodedQuery();
        if (v0_1 == null) {
            v0_1 = "";
        }
        if (v0_1.length() <= 8192) {
            android.database.sqlite.SQLiteDatabase v1_5 = ((Integer) com.google.android.gms.internal.xp.c.a()).intValue();
            String v2_6 = this.C();
            if (v2_6 > ((long) (v1_5 - 1))) {
                android.database.sqlite.SQLiteDatabase v1_6 = this.d(((v2_6 - ((long) v1_5)) + 1));
                this.d("Store full, deleting hits to make room, count", Integer.valueOf(v1_6.size()));
                this.a(v1_6);
            }
            int v3_10;
            android.database.sqlite.SQLiteDatabase v1_7 = this.A();
            String v2_11 = new android.content.ContentValues();
            v2_11.put("hit_string", v0_1);
            v2_11.put("hit_time", Long.valueOf(p8.d()));
            v2_11.put("hit_app_id", Integer.valueOf(p8.a()));
            if (!p8.f()) {
                v3_10 = com.google.android.gms.internal.xh.i();
            } else {
                v3_10 = com.google.android.gms.internal.xh.h();
            }
            v2_11.put("hit_url", v3_10);
            try {
                Long v0_8 = v1_7.insert("hits2", 0, v2_11);
            } catch (String v8_2) {
                this.e("Error storing a hit", v8_2);
                return;
            }
            if (v0_8 != -1) {
                this.b("Hit saved to database. db-id, hit", Long.valueOf(v0_8), p8);
                return;
            } else {
                this.f("Failed to insert a hit (got -1)");
                return;
            }
        } else {
            this.j().a(p8, "Hit length exceeds the maximum allowed size");
            return;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(com.google.android.gms.internal.apk p8, boolean p9)
    {
        this.e();
        this.Q();
        com.google.android.gms.common.internal.ae.a(p8);
        com.google.android.gms.common.internal.ae.a(p8.q);
        com.google.android.gms.common.internal.ae.a(p8.h);
        this.E();
        int v0_0 = this.m().a();
        if ((p8.h.longValue() < (v0_0 - com.google.android.gms.internal.ajs.ab())) || (p8.h.longValue() > (com.google.android.gms.internal.ajs.ab() + v0_0))) {
            this.v().A().a("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.internal.aks.a(p8.q), Long.valueOf(v0_0), p8.h);
        }
        try {
            String v1_3 = new byte[p8.e()];
            Object v2_9 = com.google.android.gms.internal.g.a(v1_3, 0, v1_3.length);
            p8.a(v2_9);
            v2_9.a();
            String v1_4 = this.r().a(v1_3);
            this.v().E().a("Saving bundle, size", Integer.valueOf(v1_4.length));
            Object v2_14 = new android.content.ContentValues();
            v2_14.put("app_id", p8.q);
            v2_14.put("bundle_end_timestamp", p8.h);
            v2_14.put("data", v1_4);
            v2_14.put("has_realtime", Integer.valueOf(p9));
            try {
                if (this.B().insert("queue", 0, v2_14) != -1) {
                    return 1;
                } else {
                    this.v().y().a("Failed to insert bundle (got -1). appId", com.google.android.gms.internal.aks.a(p8.q));
                    return 0;
                }
            } catch (com.google.android.gms.internal.aku v9_4) {
                String v1_7 = this.v().y();
                Object v2_15 = "Error storing bundle. appId";
                v1_7.a(v2_15, com.google.android.gms.internal.aks.a(p8.q), v9_4);
                return 0;
            }
        } catch (com.google.android.gms.internal.aku v9_4) {
            v1_7 = this.v().y();
            v2_15 = "Data loss. Failed to serialize bundle. appId";
            v1_7.a(v2_15, com.google.android.gms.internal.aks.a(p8.q), v9_4);
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(com.google.android.gms.internal.aka p9, long p10, boolean p12)
    {
        this.e();
        this.Q();
        com.google.android.gms.common.internal.ae.a(p9);
        com.google.android.gms.common.internal.ae.a(p9.a);
        long v0_6 = new com.google.android.gms.internal.aph();
        v0_6.f = Long.valueOf(p9.d);
        byte[] v1_2 = new com.google.android.gms.internal.api[p9.e.a()];
        v0_6.c = v1_2;
        byte[] v1_4 = p9.e.iterator();
        String v3_2 = 0;
        while (v1_4.hasNext()) {
            Long v4_1 = ((String) v1_4.next());
            Integer v5_1 = new com.google.android.gms.internal.api();
            int v7 = (v3_2 + 1);
            v0_6.c[v3_2] = v5_1;
            v5_1.c = v4_1;
            this.r().a(v5_1, p9.e.a(v4_1));
            v3_2 = v7;
        }
        try {
            byte[] v1_6 = new byte[v0_6.e()];
            String v3_4 = com.google.android.gms.internal.g.a(v1_6, 0, v1_6.length);
            v0_6.a(v3_4);
            v3_4.a();
            this.v().E().a("Saving event, name, data size", this.q().a(p9.b), Integer.valueOf(v1_6.length));
            long v0_4 = new android.content.ContentValues();
            v0_4.put("app_id", p9.a);
            v0_4.put("name", p9.b);
            v0_4.put("timestamp", Long.valueOf(p9.c));
            v0_4.put("metadata_fingerprint", Long.valueOf(p10));
            v0_4.put("data", v1_6);
            v0_4.put("realtime", Integer.valueOf(p12));
            try {
                if (this.B().insert("raw_events", 0, v0_4) != -1) {
                    return 1;
                } else {
                    this.v().y().a("Failed to insert raw event (got -1). appId", com.google.android.gms.internal.aks.a(p9.a));
                    return 0;
                }
            } catch (com.google.android.gms.internal.aku v10_5) {
                String v11_3 = this.v().y();
                Object v12_3 = "Error storing raw event. appId";
                v11_3.a(v12_3, com.google.android.gms.internal.aks.a(p9.a), v10_5);
                return 0;
            }
        } catch (com.google.android.gms.internal.aku v10_5) {
            v11_3 = this.v().y();
            v12_3 = "Data loss. Failed to serialize event params/data. appId";
            v11_3.a(v12_3, com.google.android.gms.internal.aks.a(p9.a), v10_5);
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private static void a(com.google.android.gms.internal.aks p5, android.database.sqlite.SQLiteDatabase p6, String p7, String p8, java.util.Map p9)
    {
        if (p5 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            java.util.Set v0 = ark>com.google.android.gms.internal.ajtark>.a(p6, p7);
            String v8_9 = p8.split(",");
            int v2 = 0;
            while (v2 < v8_9.length) {
                String v3 = v8_9[v2];
                if (!v0.remove(v3)) {
                    String v8_8 = new StringBuilder(((String.valueOf(p7).length() + 35) + String.valueOf(v3).length()));
                    v8_8.append("Table ");
                    v8_8.append(p7);
                    v8_8.append(" is missing required column: ");
                    v8_8.append(v3);
                    throw new android.database.sqlite.SQLiteException(v8_8.toString());
                } else {
                    v2++;
                }
            }
            if (p9 != null) {
                String v8_2 = p9.entrySet().iterator();
                while (v8_2.hasNext()) {
                    String v9_3 = ((java.util.Map$Entry) v8_2.next());
                    if (!v0.remove(v9_3.getKey())) {
                        p6.execSQL(((String) v9_3.getValue()));
                    }
                }
            }
            if (!v0.isEmpty()) {
                p5.A().a("Table has extra columns. table, columns", p7, android.text.TextUtils.join(", ", v0));
            }
            return;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void a(com.google.android.gms.internal.aks p1, android.database.sqlite.SQLiteDatabase p2, String p3, String p4, String p5, java.util.Map p6)
    {
        if (p1 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            if (!ark>com.google.android.gms.internal.ajtark>.a(p1, p2, p3)) {
                p2.execSQL(p4);
            }
            try {
                ark>com.google.android.gms.internal.ajtark>.a(p1, p2, p3, p5, p6);
                return;
            } catch (android.database.sqlite.SQLiteException v2_1) {
                p1.y().a("Failed to verify columns on table that was just created", p3);
                throw v2_1;
            }
        }
    }

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


    static int execSql(android.database.sqlite.SQLiteDatabase p2, String p3, String p4, Object[] p5)
    {
        try {
            p2.execSQL(p4, p5);
            com.j256.ormlite.logger.Logger v5_1 = 0;
            try {
                int v2_2 = p2.compileStatement("SELECT CHANGES()");
                try {
                    com.j256.ormlite.logger.Logger v5_2 = ((int) v2_2.simpleQueryForLong());
                } catch (Throwable v3_2) {
                    v5_1 = v2_2;
                    if (v5_1 != null) {
                        v5_1.close();
                    }
                    throw v3_2;
                } catch (android.database.SQLException) {
                    v5_1 = v2_2;
                    int v2_4 = 1;
                    if (v5_1 == null) {
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p3, Integer.valueOf(v2_4), p4);
                        return v2_4;
                    } else {
                        v5_1.close();
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p3, Integer.valueOf(v2_4), p4);
                        return v2_4;
                    }
                }
                if (v2_2 != 0) {
                    v2_2.close();
                }
                v2_4 = v5_2;
                com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p3, Integer.valueOf(v2_4), p4);
                return v2_4;
            } catch (Throwable v3_2) {
            } catch (android.database.SQLException) {
            }
        } catch (int v2_3) {
            com.j256.ormlite.logger.Logger v5_5 = new StringBuilder();
            v5_5.append("Problems executing ");
            v5_5.append(p3);
            v5_5.append(" Android statement: ");
            v5_5.append(p4);
            throw com.j256.ormlite.misc.SqlExceptionUtil.create(v5_5.toString(), v2_3);
        }
    }

Method com.google.android.gms.internal.wp.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) {
            String v0_11 = p6.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_11.moveToFirst();
                v0_11.close();
            } catch (android.database.sqlite.SQLiteException v6_5) {
                v0_11.close();
                throw v6_5;
            }
        }
        String v0_8;
        if (this.a(p6, "hits2")) {
            String v0_4 = com.google.android.gms.internal.wp.b(p6, "hits2");
            int v2_1 = 0;
            while (v2_1 < 4) {
                String v3_2 = new String[] {"hit_id", "hit_string", "hit_time", "hit_url"})[v2_1];
                if (v0_4.remove(v3_2)) {
                    v2_1++;
                } else {
                    String v0_10;
                    String v1_7 = String.valueOf(v3_2);
                    if (v1_7.length() == 0) {
                        v0_10 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_10 = "Database hits2 is missing required column: ".concat(v1_7);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_10);
                }
            }
            String v1_5 = (v0_4.remove("hit_app_id") ^ 1);
            if (!v0_4.isEmpty()) {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            } else {
                if (v1_5 != null) {
                    v0_8 = "ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER";
                    p6.execSQL(v0_8);
                }
            }
        } else {
            v0_8 = com.google.android.gms.internal.wo.B();
        }
        if (this.a(p6, "properties")) {
            com.google.android.gms.internal.wp.a(p6);
            return;
        } else {
            p6.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.atc.onOpen() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p10)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_15 = p10.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_15.moveToFirst();
                v0_15.close();
            } catch (Throwable v10_1) {
                v0_15.close();
                throw v10_1;
            }
        }
        if (com.google.android.gms.internal.atc.a("gtm_hit_unique_ids", p10)) {
            com.google.android.gms.internal.atc.a(p10, "gtm_hit_unique_ids", java.util.Arrays.asList(new String[] {"hit_unique_id"})));
        } else {
            p10.execSQL(com.google.android.gms.internal.ata.b());
        }
        if (com.google.android.gms.internal.atc.a("gtm_hits", p10)) {
            String v3 = "hit_time";
            String v5 = "hit_method";
            String v7 = "hit_headers";
            com.google.android.gms.internal.atc.a(p10, "gtm_hits", java.util.Arrays.asList(new String[] {"hit_id", "hit_body"})));
        } else {
            p10.execSQL(com.google.android.gms.internal.ata.c());
        }
        p10.execSQL(com.google.android.gms.internal.ata.d());
        p10.execSQL(com.google.android.gms.internal.ata.e());
        return;
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final void b(com.google.android.gms.internal.akf p25, com.google.android.gms.internal.ajn p26)
    {
        com.google.android.gms.common.internal.ae.a(p26);
        com.google.android.gms.common.internal.ae.a(p26.a);
        android.os.Bundle v13_2 = System.nanoTime();
        this.h().e();
        this.a();
        String v15 = p26.a;
        this.o();
        if (com.google.android.gms.internal.aow.a(p25, p26)) {
            if (p26.h) {
                com.google.android.gms.internal.akb v10_0 = 0;
                if (!this.j().b(v15, p25.a)) {
                    if (this.f().a(2)) {
                        this.f().E().a("Logging event", this.p().a(p25));
                    }
                    this.q().y();
                    try {
                        long v19;
                        Long v8_6 = p25.b.b();
                        void v11_1 = this.c(p26);
                    } catch (com.google.android.gms.internal.aov v0_68) {
                        this.q().A();
                        throw v0_68;
                    }
                    if ("_iap".equals(p25.a)) {
                        String v3_0;
                        com.google.android.gms.internal.aov v0_86 = v8_6.getString("currency");
                        if (!"ecommerce_purchase".equals(p25.a)) {
                            v3_0 = v8_6.getLong("value");
                        } else {
                            String v3_43 = (v8_6.getDouble("value") * 1000000.0);
                            if (v3_43 == 0) {
                                String v3_46 = ((double) v8_6.getLong("value"));
                                Double.isNaN(v3_46);
                                v3_43 = (v3_46 * 1000000.0);
                            }
                            if ((v3_43 > 9.223372036854776e+18) || (v3_43 < -9.223372036854776e+18)) {
                                this.f().A().a("Data lost. Currency value is too big. appId", com.google.android.gms.internal.aks.a(v15), Double.valueOf(v3_43));
                                this.q().z();
                                this.q().A();
                                return;
                            } else {
                                v3_0 = Math.round(v3_43);
                            }
                        }
                        if (android.text.TextUtils.isEmpty(v0_86)) {
                            v19 = v8_6;
                        } else {
                            com.google.android.gms.internal.aov v0_2 = v0_86.toUpperCase(java.util.Locale.US);
                            if (!v0_2.matches("[A-Z]{3}")) {
                            } else {
                                com.google.android.gms.internal.aov v0_5;
                                int v5_5 = String.valueOf("_ltv_");
                                com.google.android.gms.internal.aov v0_3 = String.valueOf(v0_2);
                                if (v0_3.length() == 0) {
                                    v0_5 = new String(v5_5);
                                } else {
                                    v0_5 = v5_5.concat(v0_3);
                                }
                                int v5_6 = v0_5;
                                com.google.android.gms.internal.aov v0_10;
                                com.google.android.gms.internal.aov v0_7 = this.q().c(v15, v5_6);
                                if (v0_7 == null) {
                                    v19 = v8_6;
                                    long v6_6 = this.q();
                                    com.google.android.gms.internal.aov v0_15 = (v11_1.c.b(v15, com.google.android.gms.internal.aki.F) - 1);
                                    com.google.android.gms.common.internal.ae.a(v15);
                                    v6_6.e();
                                    v6_6.Q();
                                    try {
                                        long v7_1 = v6_6.B();
                                        Long v9_3 = new String[3];
                                        v9_3[0] = v15;
                                        v9_3[1] = v15;
                                        try {
                                            v9_3[2] = String.valueOf(v0_15);
                                            v7_1.execSQL("delete from user_attributes where app_id=? and name in (select name from user_attributes where app_id=? and name like \'_ltv_%\' order by set_timestamp desc limit ?,10);", v9_3);
                                        } catch (com.google.android.gms.internal.aov v0_17) {
                                            v6_6.v().y().a("Error pruning currencies. appId", com.google.android.gms.internal.aks.a(v15), v0_17);
                                        }
                                        v0_10 = new com.google.android.gms.internal.aov;
                                        v0_10(v15, p25.c, v5_6, v11_1.p.a(), Long.valueOf(v3_0));
                                    } catch (com.google.android.gms.internal.aov v0_17) {
                                    }
                                } else {
                                    if ((v0_7.e instanceof Long)) {
                                        v0_10 = new com.google.android.gms.internal.aov;
                                        v19 = v8_6;
                                        v0_10(v15, p25.c, v5_6, v11_1.p.a(), Long.valueOf((((Long) v0_7.e).longValue() + v3_0)));
                                    } else {
                                    }
                                }
                                if (!this.q().a(v0_10)) {
                                    this.f().y().a("Too many unique user properties are set. Ignoring user property. appId", com.google.android.gms.internal.aks.a(v15), this.p().c(v0_10.c), v0_10.e);
                                    this.o().a(v15, 9, 0, 0, 0);
                                }
                            }
                        }
                    } else {
                        if (!"ecommerce_purchase".equals(p25.a)) {
                        } else {
                        }
                    }
                    com.google.android.gms.internal.aov v0_22 = com.google.android.gms.internal.aow.a(p25.a);
                    boolean v17 = "_err".equals(p25.a);
                    long v20 = v13_2;
                    com.google.android.gms.internal.aov v2_15 = this.q().a(this.K(), v15, 1, v0_22, 0, v17, 0);
                    String v3_8 = (v2_15.b - com.google.android.gms.internal.ajs.I());
                    if (v3_8 <= 0) {
                        if (v0_22 != null) {
                            String v3_10 = (v2_15.a - com.google.android.gms.internal.ajs.J());
                            if (v3_10 > 0) {
                                if ((v3_10 % 1000) == 1) {
                                    this.f().y().a("Data loss. Too many public events logged. appId, count", com.google.android.gms.internal.aks.a(v15), Long.valueOf(v2_15.a));
                                }
                                this.o().a(v15, 16, "_ev", p25.a, 0);
                                this.q().z();
                                this.q().A();
                                return;
                            }
                        }
                        if (v17) {
                            String v3_12 = (v2_15.d - ((long) Math.max(0, Math.min(1000000, v11_1.c.b(p26.a, com.google.android.gms.internal.aki.m)))));
                            if (v3_12 > 0) {
                                if (v3_12 == 1) {
                                    this.f().y().a("Too many error events logged. appId, count", com.google.android.gms.internal.aks.a(v15), Long.valueOf(v2_15.d));
                                }
                                this.q().z();
                                this.q().A();
                                return;
                            }
                        }
                        android.os.Bundle v13_1 = v19;
                        this.o().a(v13_1, "_o", p25.c);
                        if (this.o().j(v15)) {
                            this.o().a(v13_1, "_dbg", Long.valueOf(1));
                            this.o().a(v13_1, "_r", Long.valueOf(1));
                        }
                        com.google.android.gms.internal.aov v2_19 = this.q().c(v15);
                        if (v2_19 > 0) {
                            this.f().A().a("Data lost. Too many events stored on disk, deleted. appId", com.google.android.gms.internal.aks.a(v15), Long.valueOf(v2_19));
                        }
                        com.google.android.gms.internal.akb v10_3;
                        com.google.android.gms.internal.aov v0_40 = new com.google.android.gms.internal.aka;
                        v0_40(this, p25.c, v15, p25.a, p25.d, 0, v13_1);
                        String v1_3 = this.q().a(v15, v0_40.b);
                        if (v1_3 != null) {
                            v0_40 = v0_40.a(v11_1, v1_3.e);
                            v10_3 = v1_3.a(v0_40.c);
                        } else {
                            String v1_5 = this.q().f(v15);
                            com.google.android.gms.internal.ajs.H();
                            if (v1_5 < 500) {
                                v10_3 = new com.google.android.gms.internal.akb;
                                v10_3(v15, v0_40.b, 0, 0, v0_40.c);
                            } else {
                                this.f().y().a("Too many event names used, ignoring event. appId, name, supported count", com.google.android.gms.internal.aks.a(v15), this.p().a(v0_40.b), Integer.valueOf(com.google.android.gms.internal.ajs.H()));
                                this.o().a(v15, 8, 0, 0, 0);
                                this.q().A();
                                return;
                            }
                        }
                        this.q().a(v10_3);
                        v11_1.a(v0_40, p26);
                        this.q().z();
                        if (this.f().a(2)) {
                            this.f().E().a("Event recorded", this.p().a(v0_40));
                        }
                        this.q().A();
                        this.M().f().E().a("Background event processing time, ms", Long.valueOf((((System.nanoTime() - v20) + 500000) / 1000000)));
                        return;
                    } else {
                        if ((v3_8 % 1000) == 1) {
                            this.f().y().a("Data loss. Too many events logged. appId, count", com.google.android.gms.internal.aks.a(v15), Long.valueOf(v2_15.b));
                        }
                        this.q().z();
                        this.q().A();
                        return;
                    }
                } else {
                    this.f().A().a("Dropping blacklisted event. appId", com.google.android.gms.internal.aks.a(v15), this.p().a(p25.a));
                    if ((this.o().l(v15)) || (this.o().m(v15))) {
                        v10_0 = 1;
                    }
                    if ((v10_0 == null) && (!"_err".equals(p25.a))) {
                        this.o().a(v15, 11, "_ev", p25.a, 0);
                    }
                    if (v10_0 != null) {
                        com.google.android.gms.internal.aov v0_83 = this.q().b(v15);
                        if ((v0_83 != null) && (Math.abs((this.p.a() - Math.max(v0_83.q(), v0_83.p()))) > com.google.android.gms.internal.ajs.ad())) {
                            this.f().D().a("Fetching config for blacklisted app");
                            this.a(v0_83);
                        }
                    }
                    return;
                }
            } else {
                this.c(p26);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean a(String p27, long p28)
    {
        this.q().y();
        try {
            String v3_0 = 0;
            com.google.android.gms.internal.ajt v2_14 = new ark>com.google.android.gms.internal.altark>$a(this, 0);
            Object v4_20 = this.q();
            android.database.sqlite.SQLiteException v5_11 = this.J;
            com.google.android.gms.common.internal.ae.a(v2_14);
            v4_20.e();
            v4_20.Q();
            int v11_0 = 0;
            try {
                String v21_1;
                int v22;
                int v15_2 = v4_20.B();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Long v12_21;
                        if (v5_11 == -1) {
                            v3_0 = 0;
                            v12_21 = new String[] {0});
                        } else {
                            String v3_3 = new String[2];
                            v3_3[0] = 0;
                            v3_3[1] = String.valueOf(v5_11);
                            v12_21 = v3_3;
                            v3_0 = 0;
                        }
                        int v13_9;
                        if (v5_11 == -1) {
                            v13_9 = "";
                        } else {
                            v13_9 = " and rowid <= ?";
                        }
                        String v3_10 = new StringBuilder((String.valueOf(v13_9).length() + 84));
                        v3_10.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v3_10.append(v13_9);
                        v3_10.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_10.toString(), v12_21);
                        if (v3_0.moveToFirst()) {
                            int v13_12 = v3_0.getString(0);
                            v3_0.close();
                            v22 = v3_0;
                            v21_1 = v13_12;
                            v3_0 = 0;
                            try {
                                Long v12_3 = new String[2];
                                v12_3[0] = v3_0;
                                v12_3[1] = v21_1;
                                android.database.sqlite.SQLiteDatabase v24 = v15_2;
                                int v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_3, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Long v12_6 = v15_1.getBlob(0);
                                        Long v12_7 = com.google.android.gms.internal.f.a(v12_6, 0, v12_6.length);
                                        int v13_4 = new com.google.android.gms.internal.apk();
                                        try {
                                            v13_4.a(v12_7);
                                        } catch (java.io.IOException v0_5) {
                                            boolean v6_0 = v15_1;
                                            v4_20.v().y().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.aks.a(v3_0), v0_5);
                                            if (!v6_0) {
                                                String v3_7;
                                                if (v2_14.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_14.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.q().z();
                                                    this.q().A();
                                                    return 0;
                                                } else {
                                                    String v3_8 = v2_14.a;
                                                    Object v4_4 = new com.google.android.gms.internal.aph[v2_14.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_5 = 0;
                                                    android.database.sqlite.SQLiteException v5_7 = 0;
                                                    boolean v6_12 = 0;
                                                    while (v4_5 < v2_14.c.size()) {
                                                        if (!this.j().b(v2_14.a.q, ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) {
                                                            com.google.android.gms.internal.aku v7_39 = this.j().c(v2_14.a.q, ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d);
                                                            if (v7_39 != null) {
                                                                if (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c == null) {
                                                                    Object v9_17 = new com.google.android.gms.internal.api[v11_0];
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v9_17;
                                                                }
                                                                String v8_34 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c;
                                                                Object v9_18 = v8_34.length;
                                                                Long v12_26 = 0;
                                                                int v13_13 = 0;
                                                                Object v14_8 = 0;
                                                                while (v12_26 < v9_18) {
                                                                    int v11_31 = v8_34[v12_26];
                                                                    if (!"_c".equals(v11_31.c)) {
                                                                        if ("_r".equals(v11_31.c)) {
                                                                            v11_31.e = Long.valueOf(1);
                                                                            v14_8 = 1;
                                                                        }
                                                                    } else {
                                                                        v11_31.e = Long.valueOf(1);
                                                                        v13_13 = 1;
                                                                    }
                                                                    v12_26++;
                                                                    int v11 = 0;
                                                                }
                                                                if ((v13_13 == 0) && (v7_39 != null)) {
                                                                    this.f().E().a("Marking event as conversion", this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                                    String v8_42 = ((com.google.android.gms.internal.api[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c, (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c.length + 1)));
                                                                    Object v9_27 = new com.google.android.gms.internal.api();
                                                                    v9_27.c = "_c";
                                                                    v9_27.e = Long.valueOf(1);
                                                                    v8_42[(v8_42.length - 1)] = v9_27;
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v8_42;
                                                                }
                                                                if (v14_8 == null) {
                                                                    this.f().E().a("Marking event as real-time", this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                                    String v8_50 = ((com.google.android.gms.internal.api[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c, (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c.length + 1)));
                                                                    Object v9_39 = new com.google.android.gms.internal.api();
                                                                    v9_39.c = "_r";
                                                                    v9_39.e = Long.valueOf(1);
                                                                    v8_50[(v8_50.length - 1)] = v9_39;
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v8_50;
                                                                }
                                                                if (this.q().a(this.K(), v2_14.a.q, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v2_14.a.q))) {
                                                                    v5_7 = 1;
                                                                } else {
                                                                    String v8_56 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                                    Object v9_43 = 0;
                                                                    while (v9_43 < v8_56.c.length) {
                                                                        if (!"_r".equals(v8_56.c[v9_43].c)) {
                                                                            v9_43++;
                                                                        } else {
                                                                            int v10_28 = new com.google.android.gms.internal.api[(v8_56.c.length - 1)];
                                                                            if (v9_43 > null) {
                                                                                System.arraycopy(v8_56.c, 0, v10_28, 0, v9_43);
                                                                            }
                                                                            if (v9_43 < v10_28.length) {
                                                                                System.arraycopy(v8_56.c, (v9_43 + 1), v10_28, v9_43, (v10_28.length - v9_43));
                                                                            }
                                                                            v8_56.c = v10_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                }
                                                                if ((com.google.android.gms.internal.aow.a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) && ((v7_39 != null) && (this.q().a(this.K(), v2_14.a.q, 0, 0, 1, 0, 0).c > ((long) this.c.b(v2_14.a.q, com.google.android.gms.internal.aki.o))))) {
                                                                    this.f().A().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                                    com.google.android.gms.internal.aku v7_47 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                                    String v8_63 = v7_47.c;
                                                                    int v10_32 = 0;
                                                                    int v11_29 = 0;
                                                                    Long v12_34 = 0;
                                                                    while (v10_32 < v8_63.length) {
                                                                        int v13_24 = v8_63[v10_32];
                                                                        if (!"_c".equals(v13_24.c)) {
                                                                            if ("_err".equals(v13_24.c)) {
                                                                                v11_29 = 1;
                                                                            }
                                                                        } else {
                                                                            v12_34 = v13_24;
                                                                        }
                                                                        v10_32++;
                                                                    }
                                                                    if ((v11_29 == 0) || (v12_34 == null)) {
                                                                        if (v12_34 == null) {
                                                                            this.f().y().a("Did not find conversion parameter. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                                        } else {
                                                                            v12_34.c = "_err";
                                                                            v12_34.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        String v8_68 = new com.google.android.gms.internal.api[(v7_47.c.length - 1)];
                                                                        Object v9_56 = v7_47.c;
                                                                        int v10_33 = v9_56.length;
                                                                        int v11_30 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_30 < v10_33) {
                                                                            Object v14_11 = v9_56[v11_30];
                                                                            if (v14_11 != v12_34) {
                                                                                int v15_6 = (v13_23 + 1);
                                                                                v8_68[v13_23] = v14_11;
                                                                                v13_23 = v15_6;
                                                                            }
                                                                            v11_30++;
                                                                        }
                                                                        v7_47.c = v8_68;
                                                                    }
                                                                }
                                                            } else {
                                                                this.o();
                                                                if (com.google.android.gms.internal.aow.n(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) {
                                                                }
                                                            }
                                                            String v8_69 = (v6_12 + 1);
                                                            v3_8.d[v6_12] = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                            v6_12 = v8_69;
                                                        } else {
                                                            com.google.android.gms.internal.aku v7_60;
                                                            this.f().A().a("Dropping blacklisted raw event. appId", com.google.android.gms.internal.aks.a(v2_14.a.q), this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                            if (this.o().l(v2_14.a.q)) {
                                                                v7_60 = 1;
                                                            } else {
                                                                if (!this.o().m(v2_14.a.q)) {
                                                                    v7_60 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_60 == null) && (!"_err".equals(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d))) {
                                                                this.o().a(v2_14.a.q, 11, "_ev", ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d, 0);
                                                            }
                                                        }
                                                        v4_5++;
                                                        v11_0 = 0;
                                                    }
                                                    if (v6_12 < v2_14.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.internal.aph[]) java.util.Arrays.copyOf(v3_8.d, v6_12));
                                                    }
                                                    v3_8.C = this.a(v2_14.a.q, v2_14.a.e, v3_8.d);
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_16 = 0;
                                                    while (v4_16 < v3_8.d.length) {
                                                        boolean v6_38 = v3_8.d[v4_16];
                                                        if (v6_38.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v6_38.e;
                                                        }
                                                        if (v6_38.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v6_38.e;
                                                        }
                                                        v4_16++;
                                                    }
                                                    Object v4_18 = v2_14.a.q;
                                                    boolean v6_20 = this.q().b(v4_18);
                                                    if (v6_20) {
                                                        if (v3_8.d.length > 0) {
                                                            int v11_2;
                                                            com.google.android.gms.internal.aku v7_13 = v6_20.h();
                                                            if (v7_13 == 0) {
                                                                v11_2 = 0;
                                                            } else {
                                                                v11_2 = Long.valueOf(v7_13);
                                                            }
                                                            v3_8.j = v11_2;
                                                            int v11_3 = v6_20.g();
                                                            if (v11_3 != 0) {
                                                                v7_13 = v11_3;
                                                            } else {
                                                            }
                                                            com.google.android.gms.internal.aku v7_14;
                                                            if (v7_13 == 0) {
                                                                v7_14 = 0;
                                                            } else {
                                                                v7_14 = Long.valueOf(v7_13);
                                                            }
                                                            v3_8.i = v7_14;
                                                            v6_20.r();
                                                            v3_8.y = Integer.valueOf(((int) v6_20.o()));
                                                            v6_20.a(v3_8.g.longValue());
                                                            v6_20.b(v3_8.h.longValue());
                                                            v3_8.z = v6_20.z();
                                                            this.q().a(v6_20);
                                                        }
                                                    } else {
                                                        this.f().y().a("Bundling raw events w/o app info. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        boolean v6_27;
                                                        com.google.android.gms.internal.ajs.X();
                                                        boolean v6_26 = this.j().a(v2_14.a.q);
                                                        if (!v6_26) {
                                                            if (!android.text.TextUtils.isEmpty(v2_14.a.A)) {
                                                                this.f().A().a("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                            } else {
                                                                v6_27 = Long.valueOf(-1);
                                                                v3_8.F = v6_27;
                                                            }
                                                        } else {
                                                            if (v6_26.c != null) {
                                                                v6_27 = v6_26.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.q().a(v3_8, v5_7);
                                                    }
                                                    this.q().a(v2_14.b);
                                                    com.google.android.gms.internal.ajt v2_7 = this.q();
                                                    android.database.sqlite.SQLiteException v5_9 = v2_7.B();
                                                    try {
                                                        com.google.android.gms.internal.aku v7_30 = new String[2];
                                                        v7_30[0] = v4_18;
                                                        try {
                                                            v7_30[1] = v4_18;
                                                            v5_9.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v7_30);
                                                        } catch (java.io.IOException v0_10) {
                                                            v2_7.v().y().a("Failed to remove unused event metadata. appId", com.google.android.gms.internal.aks.a(v4_18), v0_10);
                                                        }
                                                        int v25;
                                                        this.q().z();
                                                        if (v3_8.d.length <= 0) {
                                                            v25 = 0;
                                                        } else {
                                                            v25 = 1;
                                                        }
                                                        this.q().A();
                                                        return v25;
                                                    } catch (java.io.IOException v0_10) {
                                                    }
                                                }
                                            } else {
                                                v6_0.close();
                                            }
                                        } catch (java.io.IOException v0_2) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_20.v().A().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.aks.a(v3_0));
                                        }
                                        android.database.sqlite.SQLiteException v5_1;
                                        int v16_2;
                                        v15_1.close();
                                        v2_14.a(v13_4);
                                        if (v5_11 == -1) {
                                            v5_1 = "app_id = ? and metadata_fingerprint = ?";
                                            Long v12_12 = new String[2];
                                            v12_12[0] = v3_0;
                                            v12_12[1] = v21_1;
                                            v16_2 = v12_12;
                                        } else {
                                            int v13_5 = new String[3];
                                            v13_5[0] = v3_0;
                                            v13_5[1] = v21_1;
                                            v13_5[2] = String.valueOf(v5_11);
                                            v5_1 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v13_5;
                                        }
                                        v6_0 = v15_1;
                                        android.database.sqlite.SQLiteException v5_3 = v24.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_1, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_3.moveToFirst()) {
                                                do {
                                                    boolean v6_5 = v5_3.getLong(0);
                                                    String v8_1 = v5_3.getBlob(3);
                                                    String v8_2 = com.google.android.gms.internal.f.a(v8_1, 0, v8_1.length);
                                                    Long v12_19 = new com.google.android.gms.internal.aph();
                                                    v12_19.a(v8_2);
                                                    v12_19.d = v5_3.getString(1);
                                                    v12_19.e = Long.valueOf(v5_3.getLong(2));
                                                    if (v2_14.a(v6_5, v12_19)) {
                                                    } else {
                                                        if (v5_3 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_3.moveToNext());
                                                if (v5_3 == null) {
                                                }
                                            } else {
                                                v4_20.v().A().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.aks.a(v3_0));
                                                if (v5_3 == null) {
                                                }
                                            }
                                        } catch (java.io.IOException v0_8) {
                                            com.google.android.gms.internal.ajt v2_0 = v0_8;
                                            v6_0 = v5_3;
                                            if (v6_0) {
                                                v6_0.close();
                                            }
                                            throw v2_0;
                                        } catch (java.io.IOException v0_2) {
                                            String v21_0 = v3_0;
                                            v6_0 = v5_3;
                                            String v3_1 = v0_2;
                                            v4_20.v().y().a("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.aks.a(v21_0), v3_1);
                                            if (!v6_0) {
                                            }
                                        }
                                        v5_3.close();
                                    } else {
                                        v4_20.v().y().a("Raw event metadata record is missing. appId", com.google.android.gms.internal.aks.a(v3_0));
                                        if (v15_1 == 0) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (java.io.IOException v0_6) {
                                    v6_0 = v15_1;
                                    v2_0 = v0_6;
                                } catch (java.io.IOException v0_2) {
                                    v6_0 = v15_1;
                                } catch (java.io.IOException v0_9) {
                                    v2_0 = v0_9;
                                    v6_0 = v15_1;
                                } catch (java.io.IOException v0_2) {
                                    v21_0 = v3_0;
                                    v6_0 = v15_1;
                                }
                                v21_0 = v3_0;
                            } catch (java.io.IOException v0_4) {
                                v2_0 = v0_4;
                                v6_0 = v22;
                            } catch (java.io.IOException v0_2) {
                                v21_0 = v3_0;
                                v6_0 = v22;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Long v12_29;
                        if (v5_11 == -1) {
                            v12_29 = new String[1];
                            v12_29[0] = String.valueOf(p28);
                        } else {
                            v12_29 = new String[2];
                            v12_29[0] = String.valueOf(v5_11);
                            v12_29[1] = String.valueOf(p28);
                        }
                        int v13_22;
                        if (v5_11 == -1) {
                            v13_22 = "";
                        } else {
                            v13_22 = "rowid <= ? and ";
                        }
                        String v3_13 = new StringBuilder((String.valueOf(v13_22).length() + 148));
                        v3_13.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_13.append(v13_22);
                        v3_13.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_13.toString(), v12_29);
                        if (v3_0.moveToFirst()) {
                            Long v12_1 = v3_0.getString(0);
                            try {
                                int v13_0 = v3_0.getString(1);
                                v3_0.close();
                                v22 = v3_0;
                                v3_0 = v12_1;
                                v21_1 = v13_0;
                            } catch (java.io.IOException v0_2) {
                                v6_0 = v3_0;
                                v21_0 = v12_1;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (java.io.IOException v0_3) {
                    v2_0 = v0_3;
                    v6_0 = v3_0;
                } catch (java.io.IOException v0_2) {
                    v6_0 = v3_0;
                    v21_0 = v6_0;
                } catch (java.io.IOException v0_2) {
                    v6_0 = v3_0;
                    v21_0 = 0;
                }
                v3_0.close();
            } catch (java.io.IOException v0_1) {
                v2_0 = v0_1;
                v6_0 = 0;
            } catch (java.io.IOException v0_0) {
                v3_1 = v0_0;
                v6_0 = 0;
                v21_0 = 0;
            } catch (java.io.IOException v0_6) {
            }
        } catch (java.io.IOException v0_11) {
            com.google.android.gms.internal.ajt v2_15 = v0_11;
            this.q().A();
            throw v2_15;
        }
    }

Method com.google.android.gms.internal.wr.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long a(com.google.android.gms.internal.wi p11, boolean p12)
    {
        com.google.android.gms.common.internal.ae.a(p11);
        this.x();
        com.google.android.gms.a.r.d();
        try {
            this.b.b();
            String v12_8 = this.b;
            long v2_6 = p11.a();
            String v4_0 = p11.b();
            com.google.android.gms.common.internal.ae.a(v4_0);
            v12_8.x();
            com.google.android.gms.a.r.d();
            int v5_1 = v12_8.A();
            long v8_3 = new String[2];
            v8_3[0] = String.valueOf(v2_6);
            v8_3[1] = v4_0;
            long v2_2 = v5_1.delete("properties", "app_uid=? AND cid<>?", v8_3);
        } catch (android.database.sqlite.SQLiteException v11_10) {
            try {
                this.b.d();
            } catch (String v12_4) {
                this.e("Failed to end transaction", v12_4);
            }
            throw v11_10;
        } catch (android.database.sqlite.SQLiteException v11_7) {
            this.e("Failed to update Analytics property", v11_7);
            try {
                this.b.d();
            } catch (android.database.sqlite.SQLiteException v11_9) {
                this.e("Failed to end transaction", v11_9);
            }
            return -1;
        }
        if (v2_2 > 0) {
            v12_8.a("Deleted property records", Integer.valueOf(v2_2));
        }
        long v2_5 = this.b.a(p11.a(), p11.b(), p11.c());
        p11.a((1 + v2_5));
        String v12_7 = this.b;
        com.google.android.gms.common.internal.ae.a(p11);
        v12_7.x();
        com.google.android.gms.a.r.d();
        String v4_6 = v12_7.A();
        int v5_3 = p11.f();
        com.google.android.gms.common.internal.ae.a(v5_3);
        android.content.ContentValues v6_2 = new android.net.Uri$Builder();
        int v5_5 = v5_3.entrySet().iterator();
        while (v5_5.hasNext()) {
            int v7_2 = ((java.util.Map$Entry) v5_5.next());
            v6_2.appendQueryParameter(((String) v7_2.getKey()), ((String) v7_2.getValue()));
        }
        int v5_7 = v6_2.build().getEncodedQuery();
        if (v5_7 == 0) {
            v5_7 = "";
        }
        android.content.ContentValues v6_4 = new android.content.ContentValues();
        v6_4.put("app_uid", Long.valueOf(p11.a()));
        v6_4.put("cid", p11.b());
        v6_4.put("tid", p11.c());
        v6_4.put("adid", Integer.valueOf(p11.d()));
        v6_4.put("hits_count", Long.valueOf(p11.e()));
        v6_4.put("params", v5_7);
        try {
            if (v4_6.insertWithOnConflict("properties", 0, v6_4, 5) == -1) {
                v12_7.f("Failed to insert/update a property (got -1)");
            }
        } catch (android.database.sqlite.SQLiteException v11_2) {
            v12_7.e("Error storing a property", v11_2);
        }
        this.b.c();
        try {
            this.b.d();
        } catch (android.database.sqlite.SQLiteException v11_6) {
            this.e("Failed to end transaction", v11_6);
        }
        return v2_5;
    }

Method com.google.android.gms.internal.wo.f() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int f()
    {
        com.google.android.gms.a.r.d();
        this.x();
        if (this.d.a(86400000)) {
            this.d.a();
            this.b("Deleting stale hits (if any)");
            int v0_1 = this.A();
            String[] v6_1 = new String[1];
            v6_1[0] = Long.toString((this.h().a() - 1.280618154e-314));
            int v0_3 = v0_1.delete("hits2", "hit_time < ?", v6_1);
            this.a("Deleted stale hits, count", Integer.valueOf(v0_3));
            return v0_3;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.wo.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(java.util.List p9)
    {
        com.google.android.gms.common.internal.ae.a(p9);
        com.google.android.gms.a.r.d();
        this.x();
        if (!p9.isEmpty()) {
            String v0_5 = new StringBuilder("hit_id");
            v0_5.append(" in (");
            int v1_0 = 0;
            while (v1_0 < p9.size()) {
                String v2_6 = ((Long) p9.get(v1_0));
                if ((v2_6 == null) || (v2_6.longValue() == 0)) {
                    throw new android.database.sqlite.SQLiteException("Invalid hit id");
                } else {
                    if (v1_0 > 0) {
                        v0_5.append(",");
                    }
                    v0_5.append(v2_6);
                    v1_0++;
                }
            }
            v0_5.append(")");
            String v0_0 = v0_5.toString();
            try {
                int v1_2 = this.A();
                this.a("Deleting dispatched hits. count", Integer.valueOf(p9.size()));
                int v1_3 = v1_2.delete("hits2", v0_0, 0);
            } catch (Integer v9_3) {
                this.e("Error deleting hits", v9_3);
                throw v9_3;
            }
            if (v1_3 != p9.size()) {
                this.b("Deleted fewer hits then expected", Integer.valueOf(p9.size()), Integer.valueOf(v1_3), v0_0);
            }
            return;
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.ako.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final java.util.List a(int p19)
    {
        super.e();
        void v18_1 = super.c();
        if (!this.b) {
            String v3_2 = new java.util.ArrayList();
            if (super.n().getDatabasePath(com.google.android.gms.internal.ajs.V()).exists()) {
                int v4_1 = 5;
                int v6 = 0;
                int v7 = 5;
                while (v6 < v4_1) {
                    try {
                        int v15_0 = v18_1.y();
                    } catch (int v0_26) {
                        int v4_2 = 0;
                        int v9_0 = 0;
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        if (v4_2 != 0) {
                            v4_2.close();
                        }
                        throw v0_26;
                    } catch (int v0_25) {
                        v4_2 = 0;
                        v9_0 = 0;
                        super.v().y().a("Error reading entries from local database", v0_25);
                        this.b = 1;
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        if (v4_2 == 0) {
                            v6++;
                            v4_1 = 5;
                        } else {
                            v4_2.close();
                        }
                        v3_2.add(int v0_6);
                        try {
                            while (v9_0.moveToNext()) {
                                String v10_0 = v9_0.getLong(0);
                                int v0_0 = v9_0.getInt(1);
                                String v13_0 = v9_0.getBlob(2);
                                if (v0_0 != 0) {
                                    if (v0_0 != 1) {
                                        if (v0_0 != 2) {
                                            super.v().y().a("Unknown record type in local database");
                                        } else {
                                            String v12_2 = android.os.Parcel.obtain();
                                            try {
                                                v12_2.unmarshall(v13_0, 0, v13_0.length);
                                                v12_2.setDataPosition(0);
                                                v0_6 = ((com.google.android.gms.internal.ajq) com.google.android.gms.internal.ajq.CREATOR.createFromParcel(v12_2));
                                            } catch (int v0_10) {
                                                v12_2.recycle();
                                                throw v0_10;
                                            }
                                            v12_2.recycle();
                                            if (v0_6 != 0) {
                                            }
                                        }
                                    } else {
                                        String v12_3 = android.os.Parcel.obtain();
                                        try {
                                            v12_3.unmarshall(v13_0, 0, v13_0.length);
                                            v12_3.setDataPosition(0);
                                            v0_6 = ((com.google.android.gms.internal.aot) com.google.android.gms.internal.aot.CREATOR.createFromParcel(v12_3));
                                        } catch (int v0_17) {
                                            v12_3.recycle();
                                            throw v0_17;
                                        }
                                        v12_3.recycle();
                                        if (v0_6 != 0) {
                                        }
                                    }
                                } else {
                                    String v12_4 = android.os.Parcel.obtain();
                                    try {
                                        v12_4.unmarshall(v13_0, 0, v13_0.length);
                                        v12_4.setDataPosition(0);
                                        v0_6 = ((com.google.android.gms.internal.akf) com.google.android.gms.internal.akf.CREATOR.createFromParcel(v12_4));
                                    } catch (int v0_23) {
                                        v12_4.recycle();
                                        throw v0_23;
                                    }
                                    v12_4.recycle();
                                    if (v0_6 != 0) {
                                    }
                                }
                            }
                        } catch (int v0_25) {
                        } catch (int v0_24) {
                            if (android.os.Build$VERSION.SDK_INT < 11) {
                                if (v4_2 != 0) {
                                    if (v4_2.inTransaction()) {
                                        v4_2.endTransaction();
                                    }
                                }
                                super.v().y().a("Error reading entries from local database", v0_24);
                                this.b = 1;
                            } else {
                                if (!(v0_24 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                } else {
                                    android.os.SystemClock.sleep(((long) v7));
                                    v7 += 20;
                                }
                            }
                            if (v9_0 != 0) {
                                v9_0.close();
                            }
                            if (v4_2 == 0) {
                            }
                        }
                        String v13_5 = new String[1];
                        v13_5[0] = Long.toString(v10_0);
                        if (v4_2.delete("messages", "rowid <= ?", v13_5) < v3_2.size()) {
                            super.v().y().a("Fewer entries removed from local database than expected");
                        }
                        v4_2.setTransactionSuccessful();
                        v4_2.endTransaction();
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        if (v4_2 != 0) {
                            v4_2.close();
                        }
                        return v3_2;
                    } catch (int v0_24) {
                        v4_2 = 0;
                        v9_0 = 0;
                    } catch (int v0_26) {
                    }
                    if (v15_0 != 0) {
                        try {
                            v15_0.beginTransaction();
                            v4_2 = v15_0;
                            try {
                                v9_0 = v15_0.query("messages", new String[] {"rowid", "type", "entry"}), 0, 0, 0, 0, "rowid asc", Integer.toString(100));
                                v10_0 = -1;
                            } catch (int v0_26) {
                                v9_0 = 0;
                            } catch (int v0_25) {
                                v9_0 = 0;
                            } catch (int v0_24) {
                                v9_0 = 0;
                            }
                        } catch (int v0_26) {
                            v4_2 = 0;
                        } catch (int v0_25) {
                            v4_2 = 0;
                        } catch (int v0_24) {
                            v4_2 = 0;
                        }
                    } else {
                        try {
                            this.b = 1;
                        } catch (int v0_26) {
                            v9_0 = 0;
                            v4_2 = v15_0;
                        } catch (int v0_25) {
                            v9_0 = 0;
                            v4_2 = v15_0;
                        } catch (int v0_24) {
                            v9_0 = 0;
                            v4_2 = v15_0;
                        }
                        if (v15_0 != 0) {
                            v15_0.close();
                        }
                        return 0;
                    }
                }
                super.v().A().a("Failed to read events from database in reasonable time");
                return 0;
            } else {
                return v3_2;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ako.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(int p18, byte[] p19)
    {
        super.c();
        void v17_1 = super.e();
        Long v2_7 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p18));
            v3_1.put("entry", p19);
            com.google.android.gms.internal.ajs.ai();
            Long v4_5 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_5) {
                int v7 = 0;
                try {
                    int v9 = v17_1.y();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_0 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            if ((v12 != 0) && (v12.moveToFirst())) {
                                v10_0 = v12.getLong(v2_7);
                            }
                            if (v10_0 >= 100000) {
                                super.v().y().a("Data loss, local db full");
                                long v13_2 = ((100000 - v10_0) + 1);
                                String[] v11 = new String[1];
                                v11[v2_7] = Long.toString(v13_2);
                                Long v10_3 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                if (v10_3 != v13_2) {
                                    super.v().y().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_3), Long.valueOf((v13_2 - v10_3)));
                                }
                            }
                            v9.insertOrThrow("messages", 0, v3_1);
                            v9.setTransactionSuccessful();
                            v9.endTransaction();
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v9 != 0) {
                                v9.close();
                            }
                            return 1;
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_7;
                        }
                        v7 = v9;
                        try {
                            if (android.os.Build$VERSION.SDK_INT < 11) {
                                if (v7 != 0) {
                                    if (v7.inTransaction()) {
                                        v7.endTransaction();
                                    }
                                }
                                super.v().y().a("Error writing entry to local database", com.google.android.gms.internal.aku v0_0);
                                this.b = 1;
                            } else {
                                if (!(v0_0 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                } else {
                                    android.os.SystemClock.sleep(((long) v6));
                                    v6 += 20;
                                }
                            }
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v7 == 0) {
                                v5++;
                                v2_7 = 0;
                                v4_5 = 5;
                            } else {
                                v7.close();
                            }
                        } catch (com.google.android.gms.internal.aku v0_2) {
                            v9 = v7;
                            if (v12 != 0) {
                                v12.close();
                            }
                            if (v9 != 0) {
                                v9.close();
                            }
                            throw v0_2;
                        }
                    } catch (com.google.android.gms.internal.aku v0_3) {
                        super.v().y().a("Error writing entry to local database", v0_3);
                        this.b = 1;
                        if (v7 != 0) {
                            v7.close();
                        }
                        if (v9 == 0) {
                        } else {
                            v9.close();
                        }
                    } catch (com.google.android.gms.internal.aku v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.internal.aku v0_2) {
                    v9 = 0;
                    v12 = 0;
                } catch (com.google.android.gms.internal.aku v0_3) {
                    v9 = 0;
                } catch (com.google.android.gms.internal.aku v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.internal.aku v0_2) {
                    v12 = v7;
                }
            }
            super.v().A().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.e() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int e(String p7, String p8)
    {
        com.google.android.gms.common.internal.ae.a(p7);
        com.google.android.gms.common.internal.ae.a(p8);
        this.e();
        this.Q();
        try {
            android.database.sqlite.SQLiteException v1_2 = this.B();
            com.google.android.gms.internal.akq v4_0 = new String[2];
            v4_0[0] = p7;
            v4_0[1] = p8;
            return v1_2.delete("conditional_properties", "app_id=? and name=?", v4_0);
        } catch (android.database.sqlite.SQLiteException v1_1) {
            this.v().y().a("Error deleting conditional property", com.google.android.gms.internal.aks.a(p7), this.q().c(p8), v1_1);
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long c(String p7)
    {
        com.google.android.gms.common.internal.ae.a(p7);
        this.e();
        this.Q();
        try {
            long v0_4 = this.B();
            com.google.android.gms.internal.aku v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.x().b(p7, com.google.android.gms.internal.aki.q))));
            String[] v5_1 = new String[2];
            v5_1[0] = p7;
            v5_1[1] = v1_2;
            return ((long) v0_4.delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", v5_1));
        } catch (long v0_2) {
            this.v().y().a("Error deleting over the limit events. appId", com.google.android.gms.internal.aks.a(p7), v0_2);
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(String p6, String p7)
    {
        com.google.android.gms.common.internal.ae.a(p6);
        com.google.android.gms.common.internal.ae.a(p7);
        this.e();
        this.Q();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.B();
            com.google.android.gms.internal.akq v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.v().E().a("Deleted user attribute rows", Integer.valueOf(v0_3.delete("user_attributes", "app_id=? and name=?", v3_2)));
            return;
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.v().y().a("Error deleting user attribute. appId", com.google.android.gms.internal.aks.a(p6), this.q().c(p7), v0_2);
            return;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(java.util.List p5)
    {
        com.google.android.gms.common.internal.ae.a(p5);
        this.e();
        this.Q();
        Integer v0_4 = new StringBuilder("rowid in (");
        com.google.android.gms.internal.aku v1_6 = 0;
        while (v1_6 < p5.size()) {
            if (v1_6 != null) {
                v0_4.append(",");
            }
            v0_4.append(((Long) p5.get(v1_6)).longValue());
            v1_6++;
        }
        v0_4.append(")");
        Integer v0_1 = this.B().delete("raw_events", v0_4.toString(), 0);
        if (v0_1 != p5.size()) {
            this.v().y().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v0_1), Integer.valueOf(p5.size()));
        }
        return;
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void a(String p13, com.google.android.gms.internal.aox[] p14)
    {
        this.Q();
        this.e();
        com.google.android.gms.common.internal.ae.a(p13);
        com.google.android.gms.common.internal.ae.a(p14);
        android.database.sqlite.SQLiteDatabase v0 = this.B();
        v0.beginTransaction();
        try {
            this.Q();
            this.e();
            com.google.android.gms.common.internal.ae.a(p13);
            java.util.ArrayList v1_0 = this.B();
            String v5_5 = new String[1];
            int v6 = 0;
            v5_5[0] = p13;
            v1_0.delete("property_filters", "app_id=?", v5_5);
            String v5_6 = new String[1];
            v5_6[0] = p13;
            v1_0.delete("event_filters", "app_id=?", v5_6);
            java.util.ArrayList v1_1 = p14.length;
            int v2_1 = 0;
        } catch (Throwable v13_1) {
            v0.endTransaction();
            throw v13_1;
        }
        while (v2_1 < v1_1) {
            android.database.sqlite.SQLiteDatabase v3_7 = p14[v2_1];
            this.Q();
            this.e();
            com.google.android.gms.common.internal.ae.a(p13);
            com.google.android.gms.common.internal.ae.a(v3_7);
            com.google.android.gms.common.internal.ae.a(v3_7.e);
            com.google.android.gms.common.internal.ae.a(v3_7.d);
            if (v3_7.c != null) {
                String v5_11 = v3_7.c.intValue();
                int v7_2 = v3_7.e;
                int v9_2 = 0;
                while (v9_2 < v7_2.length) {
                    if (v7_2[v9_2].c != null) {
                        v9_2++;
                    } else {
                        String v5_2 = this.v().A();
                        int v7_0 = "Event filter with no ID. Audience definition ignored. appId, audienceId";
                        String v8_0 = com.google.android.gms.internal.aks.a(p13);
                        android.database.sqlite.SQLiteDatabase v3_0 = v3_7.c;
                    }
                    v5_2.a(v7_0, v8_0, v3_0);
                }
                int v7_3 = v3_7.d;
                int v9_1 = 0;
                while (v9_1 < v7_3.length) {
                    if (v7_3[v9_1].c != null) {
                        v9_1++;
                    } else {
                        v5_2 = this.v().A();
                        v7_0 = "Property filter with no ID. Audience definition ignored. appId, audienceId";
                        v8_0 = com.google.android.gms.internal.aks.a(p13);
                        v3_0 = v3_7.c;
                    }
                }
                int v7_4 = v3_7.e;
                int v9_3 = 0;
                while (v9_3 < v7_4.length) {
                    if (this.a(p13, v5_11, v7_4[v9_3])) {
                        v9_3++;
                    } else {
                        int v7_5 = 0;
                    }
                    if (v7_5 != 0) {
                        android.database.sqlite.SQLiteDatabase v3_8 = v3_7.d;
                        int v9_4 = 0;
                        while (v9_4 < v3_8.length) {
                            if (this.a(p13, v5_11, v3_8[v9_4])) {
                                v9_4++;
                            } else {
                                v7_5 = 0;
                                break;
                            }
                        }
                    }
                    if (v7_5 != 0) {
                        v2_1++;
                    } else {
                        this.Q();
                        this.e();
                        com.google.android.gms.common.internal.ae.a(p13);
                        android.database.sqlite.SQLiteDatabase v3_9 = this.B();
                        boolean v10_8 = new String[2];
                        v10_8[0] = p13;
                        v10_8[1] = String.valueOf(v5_11);
                        v3_9.delete("property_filters", "app_id=? and audience_id=?", v10_8);
                        int v9_0 = new String[2];
                        v9_0[0] = p13;
                        v9_0[1] = String.valueOf(v5_11);
                        v3_9.delete("event_filters", "app_id=? and audience_id=?", v9_0);
                    }
                }
                v7_5 = 1;
            } else {
                this.v().A().a("Audience with no ID. appId", com.google.android.gms.internal.aks.a(p13));
            }
        }
        java.util.ArrayList v1_3 = new java.util.ArrayList();
        int v2_3 = p14.length;
        while (v6 < v2_3) {
            v1_3.add(p14[v6].c);
            v6++;
        }
        this.a(p13, v1_3);
        v0.setTransactionSuccessful();
        v0.endTransaction();
        return;
    }

Method com.google.android.gms.internal.ajt.E() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void E()
    {
        this.e();
        this.Q();
        if (this.S()) {
            Integer v0_11 = this.w().f.a();
            String v2_1 = this.m().b();
            if (Math.abs((v2_1 - v0_11)) > com.google.android.gms.internal.ajs.ac()) {
                this.w().f.a(v2_1);
                this.e();
                this.Q();
                if (this.S()) {
                    Integer v0_6 = this.B();
                    com.google.android.gms.internal.aku v1_1 = new String[2];
                    v1_1[0] = String.valueOf(this.m().a());
                    v1_1[1] = String.valueOf(com.google.android.gms.internal.ajs.ab());
                    Integer v0_7 = v0_6.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_1);
                    if (v0_7 > null) {
                        this.v().E().a("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_7));
                    }
                }
            }
            return;
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(String p10, java.util.List p11)
    {
        com.google.android.gms.common.internal.ae.a(p10);
        this.Q();
        this.e();
        com.google.android.gms.internal.aku v0_2 = this.B();
        try {
            String v4_8 = new String[1];
            v4_8[0] = p10;
            String v4_0 = this.b("select count(1) from audience_filter_values where app_id=?", v4_8);
            String v2_3 = Math.max(0, Math.min(2000, this.x().b(p10, com.google.android.gms.internal.aki.G)));
        } catch (String v11_1) {
            this.v().y().a("Database error querying filters. appId", com.google.android.gms.internal.aks.a(p10), v11_1);
            return 0;
        }
        if (v4_0 > ((long) v2_3)) {
            String v4_2 = new java.util.ArrayList();
            int v5_0 = 0;
            while (v5_0 < p11.size()) {
                String v6_11 = ((Integer) p11.get(v5_0));
                if ((v6_11 != null) && ((v6_11 instanceof Integer))) {
                    v4_2.add(Integer.toString(v6_11.intValue()));
                    v5_0++;
                } else {
                    return 0;
                }
            }
            String v11_4 = String.valueOf(android.text.TextUtils.join(",", v4_2));
            String v6_5 = new StringBuilder((String.valueOf(v11_4).length() + 2));
            v6_5.append("(");
            v6_5.append(v11_4);
            v6_5.append(")");
            String v11_6 = v6_5.toString();
            boolean v7_1 = new StringBuilder((String.valueOf(v11_6).length() + 140));
            v7_1.append("audience_id in (select audience_id from audience_filter_values where app_id=? and audience_id not in ");
            v7_1.append(v11_6);
            v7_1.append(" order by rowid desc limit -1 offset ?)");
            String v11_8 = v7_1.toString();
            int v5_2 = new String[2];
            v5_2[0] = p10;
            v5_2[1] = Integer.toString(v2_3);
            if (v0_2.delete("audience_filter_values", v11_8, v5_2) <= 0) {
                return 0;
            } else {
                return 1;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ata.a() calling method android.database.sqlite.SQLiteDatabase.delete()

Couldn't retrieve source code

Method com.google.android.gms.internal.ata.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final void a(String[] p8)
    {
        if ((p8 != null) && (p8.length != 0)) {
            String v0_5 = this.b("Error opening database for deleteHits.");
            if (v0_5 != null) {
                int v2 = 1;
                String v3_1 = new Object[1];
                v3_1[0] = android.text.TextUtils.join(",", java.util.Collections.nCopies(p8.length, "?"));
                try {
                    v0_5.delete("gtm_hits", String.format("HIT_ID in (%s)", v3_1), p8);
                } catch (String v8_2) {
                    String v8_4 = String.valueOf(v8_2.getMessage());
                    if (v8_4.length() == 0) {
                        String v8_6 = new String("Error deleting hits: ");
                    } else {
                        v8_6 = "Error deleting hits: ".concat(v8_4);
                    }
                    com.google.android.gms.internal.asx.b(v8_6);
                }
                if (this.a("gtm_hits") != 0) {
                    v2 = 0;
                } else {
                }
                this.g.a(v2);
                return;
            } else {
                return;
            }
        }
        return;
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                String v0_11;
                String v8_4;
                com.google.android.gms.internal.aot v7_8;
                String v0_12;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                com.google.android.gms.internal.aot v7_8;
                String v0_11;
                String v0_12;
                String v8_4;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                String v0_11;
                com.google.android.gms.internal.aot v7_8;
                String v0_12;
                String v8_4;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                String v8_4;
                String v0_11;
                com.google.android.gms.internal.aot v7_8;
                String v0_12;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                String v0_12;
                String v0_11;
                com.google.android.gms.internal.aot v7_8;
                String v8_4;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                String v0_12;
                String v0_11;
                String v8_4;
                com.google.android.gms.internal.aot v7_8;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(com.google.android.gms.internal.ajn p19)
    {
        this.h().e();
        this.a();
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_8 = this.q().b(p19.a);
            if ((v0_8 != null) && ((android.text.TextUtils.isEmpty(v0_8.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_8.g(0);
                this.q().a(v0_8);
                this.j().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.p.a();
                }
                android.os.Bundle v15_3;
                String v0_61 = p19.n;
                if ((v0_61 == null) || (v0_61 == 1)) {
                    v15_3 = v0_61;
                } else {
                    this.f().A().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.aks.a(p19.a), Integer.valueOf(v0_61));
                    v15_3 = 0;
                }
                this.q().y();
                try {
                    String v0_7 = this.q().b(p19.a);
                } catch (String v0_57) {
                    this.q().A();
                    throw v0_57;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.f().A().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.aks.a(v0_7.b()));
                    com.google.android.gms.internal.aot v7_34 = this.q();
                    String v8_19 = v0_7.b();
                    v7_34.Q();
                    v7_34.e();
                    com.google.android.gms.common.internal.ae.a(v8_19);
                    try {
                        String v0_0 = v7_34.B();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_19;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_34.v().y().a("Error deleting application data. appId, error", com.google.android.gms.internal.aks.a(v8_19), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_34.v().E().a("Deleted application data. app, records", v8_19, Integer.valueOf(v10_10));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p19.c)))) {
                    com.google.android.gms.internal.aot v7_6 = new android.os.Bundle();
                    v7_6.putString("_pv", v0_7.i());
                    String v0_10 = new com.google.android.gms.internal.akf;
                    v0_10("_au", new com.google.android.gms.internal.akc(v7_6), "auto", v5_6);
                    this.a(v0_10, p19);
                }
                String v8_4;
                String v0_11;
                String v0_12;
                com.google.android.gms.internal.aot v7_8;
                this = this.c(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_11 = 0;
                    } else {
                        v0_12 = this.q();
                        v7_8 = p19.a;
                        v8_4 = "_v";
                        v0_11 = v0_12.a(v7_8, v8_4);
                    }
                } else {
                    v0_12 = this.q();
                    v7_8 = p19.a;
                    v8_4 = "_f";
                }
                com.google.android.gms.internal.aot v3_2;
                if (v0_11 != null) {
                    if (p19.i) {
                        v3_2 = new com.google.android.gms.internal.akf;
                        v3_2("_cd", new com.google.android.gms.internal.akc(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_9 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_16 = new com.google.android.gms.internal.aot;
                            v0_16("_fvt", v5_6, Long.valueOf(v9_9), "auto");
                            this.a(v0_16, p19);
                            this.h().e();
                            this.a();
                            String v0_19 = new android.os.Bundle();
                            v0_19.putLong("_c", 1);
                            v0_19.putLong("_r", 1);
                            com.google.android.gms.internal.aot v3_6 = new com.google.android.gms.internal.akf;
                            v3_6("_v", new com.google.android.gms.internal.akc(v0_19), "auto", v5_6);
                            this.a(v3_6, p19);
                        }
                    } else {
                        String v0_20 = new com.google.android.gms.internal.aot;
                        v13_0 = 1;
                        v0_20("_fot", v5_6, Long.valueOf(v9_9), "auto");
                        this.a(v0_20, p19);
                        this.h().e();
                        this.a();
                        android.os.Bundle v15_2 = new android.os.Bundle();
                        v15_2.putLong("_c", 1);
                        v15_2.putLong("_r", 1);
                        v15_2.putLong("_uwa", 0);
                        v15_2.putLong("_pfo", 0);
                        v15_2.putLong("_sys", 0);
                        v15_2.putLong("_sysu", 0);
                        if (this.b.getPackageManager() != null) {
                            try {
                                String v0_32 = com.google.android.gms.internal.ahx.a(this.b).b(p19.a, 0);
                            } catch (String v0_33) {
                                this.f().y().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_33);
                                v0_32 = 0;
                            }
                            if ((v0_32 != null) && (v0_32.firstInstallTime != 0)) {
                                String v0_36;
                                if (v0_32.firstInstallTime == v0_32.lastUpdateTime) {
                                    v0_36 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_36 = 0;
                                }
                                long v9_18;
                                String v12_10 = new com.google.android.gms.internal.aot;
                                if (v0_36 == null) {
                                    v9_18 = 0;
                                } else {
                                    v9_18 = 1;
                                }
                                com.google.android.gms.internal.aot v3_7 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_18), "auto");
                                this.a(v3_7, p19);
                            }
                            try {
                                String v0_42 = com.google.android.gms.internal.ahx.a(this.b).a(p19.a, 0);
                            } catch (String v0_43) {
                                this.f().y().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a), v0_43);
                                v0_42 = 0;
                            }
                            if (v0_42 != null) {
                                if ((v0_42.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_42.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.f().y().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.aks.a(p19.a));
                        }
                        String v0_50 = this.q();
                        com.google.android.gms.internal.aot v3_14 = p19.a;
                        com.google.android.gms.common.internal.ae.a(v3_14);
                        v0_50.e();
                        v0_50.Q();
                        com.google.android.gms.internal.aot v3_15 = v0_50.h(v3_14, "first_open_count");
                        if (v3_15 >= 0) {
                            v15_2.putLong("_pfo", v3_15);
                        }
                        String v0_53 = new com.google.android.gms.internal.akf;
                        v0_53("_f", new com.google.android.gms.internal.akc(v15_2), "auto", v5_6);
                        this.a(v0_53, p19);
                    }
                    String v0_55 = new android.os.Bundle();
                    v0_55.putLong("_et", v13_0);
                    v3_2 = new com.google.android.gms.internal.akf;
                    v3_2("_e", new com.google.android.gms.internal.akc(v0_55), "auto", v5_6);
                }
                this.q().z();
                this.q().A();
                return;
            } else {
                this.c(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.alt.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    protected final void a(int p8, Throwable p9, byte[] p10)
    {
        this.h().e();
        this.a();
        if (p10 == null) {
            p10 = new byte[0];
        }
        String v1_6 = this.F;
        this.F = 0;
        int v3 = 1;
        if (((p8 != 200) && (p8 != 204)) || (p9 != null)) {
            this.f().E().a("Network upload failed. Will retry later. code, error", Integer.valueOf(p8), p9);
            this.e().d.a(this.p.a());
            if (p8 != 503) {
                if (p8 != 429) {
                    v3 = 0;
                } else {
                }
            }
            if (v3 != 0) {
                this.e().e.a(this.p.a());
            }
            this.M();
        } else {
            try {
                this.e().c.a(this.p.a());
                this.e().d.a(0);
                this.M();
                this.f().E().a("Successful upload. Got network response. code, size", Integer.valueOf(p8), Integer.valueOf(p10.length));
                this.q().y();
            } catch (long v8_5) {
                this.f().y().a("Database error while trying to delete uploaded bundles", v8_5);
                this.K = this.p.b();
                this.f().E().a("Disable upload, time", Long.valueOf(this.K));
            }
            long v8_15 = v1_6.iterator();
            while (v8_15.hasNext()) {
                com.google.android.gms.internal.aku v9_24 = ((Long) v8_15.next());
                String v10_1 = this.q();
                String v1_0 = v9_24.longValue();
                v10_1.e();
                v10_1.Q();
                com.google.android.gms.internal.aku v9_1 = v10_1.B();
                String[] v6 = new String[1];
                v6[0] = String.valueOf(v1_0);
                try {
                    if (v9_1.delete("queue", "rowid=?", v6) != 1) {
                        throw new android.database.sqlite.SQLiteException("Deleted fewer rows from queue than expected");
                    } else {
                    }
                } catch (long v8_3) {
                    v10_1.v().y().a("Failed to delete a bundle in a queue table", v8_3);
                    throw v8_3;
                }
            }
            this.q().z();
            this.q().A();
            if ((!this.s().y()) || (!this.L())) {
                this.J = -1;
                this.M();
            } else {
                this.E();
            }
            this.K = 0;
        }
        this.M = 0;
        this.O();
        return;
    }

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


    public long queryForLong(String p8)
    {
        try {
            int v1_1 = this.db.compileStatement(p8);
            try {
                StringBuilder v2_0 = v1_1.simpleQueryForLong();
                com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: query for long simple query returned {}: {}", this, Long.valueOf(v2_0), p8);
                this.closeQuietly(v1_1);
                return v2_0;
            } catch (android.database.SQLException v0_2) {
                StringBuilder v2_2 = new StringBuilder();
                v2_2.append("queryForLong from database failed: ");
                v2_2.append(p8);
                throw com.j256.ormlite.misc.SqlExceptionUtil.create(v2_2.toString(), v0_2);
            }
        } catch (Throwable v8_3) {
            v1_1 = 0;
            this.closeQuietly(v1_1);
            throw v8_3;
        } catch (int v1_2) {
            v1_1 = 0;
            v0_2 = v1_2;
        } catch (Throwable v8_3) {
        }
        v2_0 = v1_1.simpleQueryForLong();
        com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: query for long simple query returned {}: {}", this, Long.valueOf(v2_0), p8);
        this.closeQuietly(v1_1);
        return v2_0;
    }

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


    public int insert(String p3, Object[] p4, com.j256.ormlite.field.FieldType[] p5, com.j256.ormlite.support.GeneratedKeyHolder p6)
    {
        Integer v0_0 = 0;
        try {
            android.database.sqlite.SQLiteStatement v1_1 = this.db.compileStatement(p3);
            try {
                this.bindArgs(v1_1, p4, p5);
                int v4_4 = v1_1.executeInsert();
            } catch (Throwable v3_3) {
                v0_0 = v1_1;
                this.closeQuietly(v0_0);
                throw v3_3;
            } catch (int v4_2) {
                v0_0 = v1_1;
                com.j256.ormlite.logger.Logger v5_2 = new StringBuilder();
                v5_2.append("inserting to database failed: ");
                v5_2.append(p3);
                throw com.j256.ormlite.misc.SqlExceptionUtil.create(v5_2.toString(), v4_2);
            }
            if (p6 != null) {
                p6.addKey(Long.valueOf(v4_4));
            }
            com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{}: insert statement is compiled and executed, changed {}: {}", this, Integer.valueOf(1), p3);
            this.closeQuietly(v1_1);
            return 1;
        } catch (Throwable v3_3) {
        } catch (int v4_2) {
        }
    }

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


    private int update(String p3, Object[] p4, com.j256.ormlite.field.FieldType[] p5, String p6)
    {
        com.j256.ormlite.logger.Logger v0_0 = 0;
        try {
            Integer v1_1 = this.db.compileStatement(p3);
            try {
                this.bindArgs(v1_1, p4, p5);
                v1_1.execute();
                this.closeQuietly(v1_1);
                try {
                    com.j256.ormlite.logger.Logger v4_2 = this.db.compileStatement("SELECT CHANGES()");
                    try {
                        int v5_4 = ((int) v4_2.simpleQueryForLong());
                        this.closeQuietly(v4_2);
                    } catch (Throwable v3_4) {
                        v0_0 = v4_2;
                        this.closeQuietly(v0_0);
                        throw v3_4;
                    } catch (android.database.SQLException) {
                        v0_0 = v4_2;
                        v5_4 = 1;
                        this.closeQuietly(v0_0);
                    }
                    com.j256.ormlite.android.AndroidDatabaseConnection.logger.trace("{} statement is compiled and executed, changed {}: {}", p6, Integer.valueOf(v5_4), p3);
                    return v5_4;
                } catch (Throwable v3_4) {
                } catch (android.database.SQLException) {
                }
            } catch (Throwable v3_3) {
                v0_0 = v1_1;
                this.closeQuietly(v0_0);
                throw v3_3;
            } catch (com.j256.ormlite.logger.Logger v4_3) {
                v0_0 = v1_1;
                int v5_2 = new StringBuilder();
                v5_2.append("updating database failed: ");
                v5_2.append(p3);
                throw com.j256.ormlite.misc.SqlExceptionUtil.create(v5_2.toString(), v4_3);
            }
        } catch (Throwable v3_3) {
        } catch (com.j256.ormlite.logger.Logger v4_3) {
        }
    }

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


    static int execSql(android.database.sqlite.SQLiteDatabase p2, String p3, String p4, Object[] p5)
    {
        try {
            p2.execSQL(p4, p5);
            com.j256.ormlite.logger.Logger v5_1 = 0;
            try {
                int v2_2 = p2.compileStatement("SELECT CHANGES()");
                try {
                    com.j256.ormlite.logger.Logger v5_2 = ((int) v2_2.simpleQueryForLong());
                } catch (Throwable v3_2) {
                    v5_1 = v2_2;
                    if (v5_1 != null) {
                        v5_1.close();
                    }
                    throw v3_2;
                } catch (android.database.SQLException) {
                    v5_1 = v2_2;
                    int v2_4 = 1;
                    if (v5_1 == null) {
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p3, Integer.valueOf(v2_4), p4);
                        return v2_4;
                    } else {
                        v5_1.close();
                        com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p3, Integer.valueOf(v2_4), p4);
                        return v2_4;
                    }
                }
                if (v2_2 != 0) {
                    v2_2.close();
                }
                v2_4 = v5_2;
                com.j256.ormlite.android.AndroidCompiledStatement.logger.trace("executing statement {} changed {} rows: {}", p3, Integer.valueOf(v2_4), p4);
                return v2_4;
            } catch (Throwable v3_2) {
            } catch (android.database.SQLException) {
            }
        } catch (int v2_3) {
            com.j256.ormlite.logger.Logger v5_5 = new StringBuilder();
            v5_5.append("Problems executing ");
            v5_5.append(p3);
            v5_5.append(" Android statement: ");
            v5_5.append(p4);
            throw com.j256.ormlite.misc.SqlExceptionUtil.create(v5_5.toString(), v2_3);
        }
    }

Method com.google.android.gms.internal.wo.c() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List c(long p12)
    {
        this.x();
        com.google.android.gms.a.r.d();
        Throwable v0_1 = this.A();
        try {
            String v13_3 = ((Integer) com.google.android.gms.internal.xp.d.a()).intValue();
            Throwable v0_0 = v0_1.query("properties", new String[] {"cid", "tid", "adid", "hits_count", "params"}), "app_uid=?", new String[] {"0"}), 0, 0, 0, String.valueOf(v13_3));
            try {
                android.database.sqlite.SQLiteException v12_3 = new java.util.ArrayList();
            } catch (android.database.sqlite.SQLiteException v12_0) {
                this.e("Error loading hits from the database", v12_0);
                throw v12_0;
            }
            if (v0_0.moveToFirst()) {
                do {
                    int v7_1;
                    String v5_1 = v0_0.getString(0);
                    String v6_1 = v0_0.getString(1);
                    if (v0_0.getInt(2) == 0) {
                        v7_1 = 0;
                    } else {
                        v7_1 = 1;
                    }
                    long v8_1 = ((long) v0_0.getInt(3));
                    java.util.Map vtmp15 = this.g(v0_0.getString(4));
                    if (android.text.TextUtils.isEmpty(v5_1)) {
                        this.c("Read property with empty client id or tracker id", v5_1, v6_1);
                    } else {
                        if (!android.text.TextUtils.isEmpty(v6_1)) {
                            boolean v1_11 = new com.google.android.gms.internal.wi;
                            v1_11(0, v5_1, v6_1, v7_1, v8_1, vtmp15);
                            v12_3.add(v1_11);
                        } else {
                        }
                    }
                } while(v0_0.moveToNext());
            }
            if (v12_3.size() >= v13_3) {
                this.e("Sending hits to too many properties. Campaign report might be incorrect");
            }
            if (v0_0 != null) {
                v0_0.close();
            }
            return v12_3;
        } catch (String v13_5) {
            v0_0 = 0;
            android.database.sqlite.SQLiteException v12_1 = v13_5;
            if (v0_0 != null) {
                v0_0.close();
            }
            throw v12_1;
        } catch (String v13_4) {
            v0_0 = 0;
            v12_0 = v13_4;
        } catch (android.database.sqlite.SQLiteException v12_1) {
        }
    }

Method com.google.android.gms.internal.wo.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(long p14)
    {
        boolean v2_3;
        if (p14 < 0) {
            v2_3 = 0;
        } else {
            v2_3 = 1;
        }
        com.google.android.gms.common.internal.ae.b(v2_3);
        com.google.android.gms.a.r.d();
        this.x();
        com.google.android.gms.internal.xu v3_0 = this.A();
        boolean v2_0 = 0;
        try {
            int v11_0 = new Object[1];
            v11_0[0] = "hit_id";
            String v14_1 = v3_0.query("hits2", new String[] {"hit_id", "hit_time", "hit_string", "hit_url", "hit_app_id"}), 0, 0, 0, 0, String.format("%s ASC", v11_0), Long.toString(p14));
            try {
                android.database.sqlite.SQLiteException v15_2 = new java.util.ArrayList();
            } catch (android.database.sqlite.SQLiteException v15_3) {
                v2_0 = v14_1;
                if (v2_0) {
                    v2_0.close();
                }
                throw v15_3;
            } catch (android.database.sqlite.SQLiteException v15_0) {
                v2_0 = v14_1;
                this.e("Error loading hits from the database", v15_0);
                throw v15_0;
            }
            if (v14_1.moveToFirst()) {
                do {
                    boolean v2_6 = new com.google.android.gms.internal.xu;
                    v2_6(this, this.a(v14_1.getString(2)), v14_1.getLong(1), com.google.android.gms.internal.yk.c(v14_1.getString(3)), v14_1.getLong(0), v14_1.getInt(4));
                    v15_2.add(v2_6);
                } while(v14_1.moveToNext());
            }
            if (v14_1 != null) {
                v14_1.close();
            }
            return v15_2;
        } catch (android.database.sqlite.SQLiteException v15_3) {
        } catch (android.database.sqlite.SQLiteException v15_0) {
        }
    }

Method com.google.android.gms.internal.wo.d() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List d(long p14)
    {
        com.google.android.gms.a.r.d();
        this.x();
        if (p14 > 0) {
            long v0_2 = this.A();
            java.util.ArrayList v9_1 = new java.util.ArrayList();
            String v10 = 0;
            try {
                String v8_1 = new Object[1];
                v8_1[0] = "hit_id";
                String v14_1 = v0_2.query("hits2", new String[] {"hit_id"}), 0, 0, 0, 0, String.format("%s ASC", v8_1), Long.toString(p14));
                try {
                    if (v14_1.moveToFirst()) {
                        do {
                            v9_1.add(Long.valueOf(v14_1.getLong(0)));
                        } while(v14_1.moveToNext());
                    }
                } catch (boolean v15_2) {
                    v10 = v14_1;
                    if (v10 != null) {
                        v10.close();
                    }
                    throw v15_2;
                } catch (boolean v15_0) {
                    v10 = v14_1;
                    this.d("Error selecting hit ids", v15_0);
                    if (v10 == null) {
                        return v9_1;
                    } else {
                        v10.close();
                        return v9_1;
                    }
                }
                if (v14_1 == null) {
                    return v9_1;
                } else {
                    v14_1.close();
                    return v9_1;
                }
            } catch (boolean v15_2) {
            } catch (boolean v15_0) {
            }
        } else {
            return java.util.Collections.emptyList();
        }
    }

Method com.google.android.gms.internal.ako.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(int p19)
    {
        super.e();
        void v18_1 = super.c();
        if (!this.b) {
            String v3_2 = new java.util.ArrayList();
            if (super.n().getDatabasePath(com.google.android.gms.internal.ajs.V()).exists()) {
                int v4_1 = 5;
                int v6 = 0;
                int v7 = 5;
                while (v6 < v4_1) {
                    try {
                        int v15_0 = v18_1.y();
                    } catch (int v0_26) {
                        int v4_2 = 0;
                        int v9_0 = 0;
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        if (v4_2 != 0) {
                            v4_2.close();
                        }
                        throw v0_26;
                    } catch (int v0_25) {
                        v4_2 = 0;
                        v9_0 = 0;
                        super.v().y().a("Error reading entries from local database", v0_25);
                        this.b = 1;
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        if (v4_2 == 0) {
                            v6++;
                            v4_1 = 5;
                        } else {
                            v4_2.close();
                        }
                        v3_2.add(int v0_6);
                        try {
                            while (v9_0.moveToNext()) {
                                String v10_0 = v9_0.getLong(0);
                                int v0_0 = v9_0.getInt(1);
                                String v13_0 = v9_0.getBlob(2);
                                if (v0_0 != 0) {
                                    if (v0_0 != 1) {
                                        if (v0_0 != 2) {
                                            super.v().y().a("Unknown record type in local database");
                                        } else {
                                            String v12_2 = android.os.Parcel.obtain();
                                            try {
                                                v12_2.unmarshall(v13_0, 0, v13_0.length);
                                                v12_2.setDataPosition(0);
                                                v0_6 = ((com.google.android.gms.internal.ajq) com.google.android.gms.internal.ajq.CREATOR.createFromParcel(v12_2));
                                            } catch (int v0_10) {
                                                v12_2.recycle();
                                                throw v0_10;
                                            }
                                            v12_2.recycle();
                                            if (v0_6 != 0) {
                                            }
                                        }
                                    } else {
                                        String v12_3 = android.os.Parcel.obtain();
                                        try {
                                            v12_3.unmarshall(v13_0, 0, v13_0.length);
                                            v12_3.setDataPosition(0);
                                            v0_6 = ((com.google.android.gms.internal.aot) com.google.android.gms.internal.aot.CREATOR.createFromParcel(v12_3));
                                        } catch (int v0_17) {
                                            v12_3.recycle();
                                            throw v0_17;
                                        }
                                        v12_3.recycle();
                                        if (v0_6 != 0) {
                                        }
                                    }
                                } else {
                                    String v12_4 = android.os.Parcel.obtain();
                                    try {
                                        v12_4.unmarshall(v13_0, 0, v13_0.length);
                                        v12_4.setDataPosition(0);
                                        v0_6 = ((com.google.android.gms.internal.akf) com.google.android.gms.internal.akf.CREATOR.createFromParcel(v12_4));
                                    } catch (int v0_23) {
                                        v12_4.recycle();
                                        throw v0_23;
                                    }
                                    v12_4.recycle();
                                    if (v0_6 != 0) {
                                    }
                                }
                            }
                        } catch (int v0_25) {
                        } catch (int v0_24) {
                            if (android.os.Build$VERSION.SDK_INT < 11) {
                                if (v4_2 != 0) {
                                    if (v4_2.inTransaction()) {
                                        v4_2.endTransaction();
                                    }
                                }
                                super.v().y().a("Error reading entries from local database", v0_24);
                                this.b = 1;
                            } else {
                                if (!(v0_24 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                } else {
                                    android.os.SystemClock.sleep(((long) v7));
                                    v7 += 20;
                                }
                            }
                            if (v9_0 != 0) {
                                v9_0.close();
                            }
                            if (v4_2 == 0) {
                            }
                        }
                        String v13_5 = new String[1];
                        v13_5[0] = Long.toString(v10_0);
                        if (v4_2.delete("messages", "rowid <= ?", v13_5) < v3_2.size()) {
                            super.v().y().a("Fewer entries removed from local database than expected");
                        }
                        v4_2.setTransactionSuccessful();
                        v4_2.endTransaction();
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        if (v4_2 != 0) {
                            v4_2.close();
                        }
                        return v3_2;
                    } catch (int v0_24) {
                        v4_2 = 0;
                        v9_0 = 0;
                    } catch (int v0_26) {
                    }
                    if (v15_0 != 0) {
                        try {
                            v15_0.beginTransaction();
                            v4_2 = v15_0;
                            try {
                                v9_0 = v15_0.query("messages", new String[] {"rowid", "type", "entry"}), 0, 0, 0, 0, "rowid asc", Integer.toString(100));
                                v10_0 = -1;
                            } catch (int v0_26) {
                                v9_0 = 0;
                            } catch (int v0_25) {
                                v9_0 = 0;
                            } catch (int v0_24) {
                                v9_0 = 0;
                            }
                        } catch (int v0_26) {
                            v4_2 = 0;
                        } catch (int v0_25) {
                            v4_2 = 0;
                        } catch (int v0_24) {
                            v4_2 = 0;
                        }
                    } else {
                        try {
                            this.b = 1;
                        } catch (int v0_26) {
                            v9_0 = 0;
                            v4_2 = v15_0;
                        } catch (int v0_25) {
                            v9_0 = 0;
                            v4_2 = v15_0;
                        } catch (int v0_24) {
                            v9_0 = 0;
                            v4_2 = v15_0;
                        }
                        if (v15_0 != 0) {
                            v15_0.close();
                        }
                        return 0;
                    }
                }
                super.v().A().a("Failed to read events from database in reasonable time");
                return 0;
            } else {
                return v3_2;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ajt.g() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map g(String p13, String p14)
    {
        this.Q();
        this.e();
        com.google.android.gms.common.internal.ae.a(p13);
        com.google.android.gms.common.internal.ae.a(p14);
        java.util.Map v0_2 = new android.support.v4.util.ArrayMap();
        Integer v1_8 = this.B();
        try {
            String[] v5_1 = new String[2];
            v5_1[0] = p13;
            v5_1[1] = p14;
            int v14_1 = v1_8.query("property_filters", new String[] {"audience_id", "data"}), "app_id=? AND property_name=?", v5_1, 0, 0, 0);
            try {
                if (!v14_1.moveToFirst()) {
                    java.util.Map v0_3 = java.util.Collections.emptyMap();
                    if (v14_1 != 0) {
                        v14_1.close();
                    }
                    return v0_3;
                }
            } catch (java.util.Map v0_0) {
                this.v().y().a("Database error querying filters. appId", com.google.android.gms.internal.aks.a(p13), v0_0);
                if (v14_1 != 0) {
                    v14_1.close();
                }
                return 0;
            }
            do {
                Integer v1_1 = v14_1.getBlob(1);
                Integer v1_2 = com.google.android.gms.internal.f.a(v1_1, 0, v1_1.length);
                com.google.android.gms.internal.aku v2_2 = new com.google.android.gms.internal.apb();
                v2_2.a(v1_2);
                Integer v1_4 = v14_1.getInt(0);
                java.util.ArrayList v3_5 = ((java.util.List) v0_2.get(Integer.valueOf(v1_4)));
                if (v3_5 == null) {
                    v3_5 = new java.util.ArrayList();
                    v0_2.put(Integer.valueOf(v1_4), v3_5);
                }
                v3_5.add(v2_2);
            } while(v14_1.moveToNext());
            if (v14_1 != 0) {
                v14_1.close();
            }
            return v0_2;
        } catch (Throwable v13_1) {
            v14_1 = 0;
            if (v14_1 != 0) {
                v14_1.close();
            }
            throw v13_1;
        } catch (java.util.Map v0_0) {
            v14_1 = 0;
        } catch (Throwable v13_1) {
        }
    }

Method com.google.android.gms.internal.ajt.f() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map f(String p13, String p14)
    {
        this.Q();
        this.e();
        com.google.android.gms.common.internal.ae.a(p13);
        com.google.android.gms.common.internal.ae.a(p14);
        java.util.Map v0_2 = new android.support.v4.util.ArrayMap();
        Integer v1_8 = this.B();
        try {
            String[] v5_1 = new String[2];
            v5_1[0] = p13;
            v5_1[1] = p14;
            int v14_1 = v1_8.query("event_filters", new String[] {"audience_id", "data"}), "app_id=? AND event_name=?", v5_1, 0, 0, 0);
            try {
                if (!v14_1.moveToFirst()) {
                    java.util.Map v0_3 = java.util.Collections.emptyMap();
                    if (v14_1 != 0) {
                        v14_1.close();
                    }
                    return v0_3;
                }
            } catch (java.util.Map v0_0) {
                this.v().y().a("Database error querying filters. appId", com.google.android.gms.internal.aks.a(p13), v0_0);
                if (v14_1 != 0) {
                    v14_1.close();
                }
                return 0;
            }
            do {
                Integer v1_1 = v14_1.getBlob(1);
                Integer v1_2 = com.google.android.gms.internal.f.a(v1_1, 0, v1_1.length);
                com.google.android.gms.internal.aku v2_2 = new com.google.android.gms.internal.aoy();
                v2_2.a(v1_2);
                Integer v1_4 = v14_1.getInt(0);
                java.util.ArrayList v3_5 = ((java.util.List) v0_2.get(Integer.valueOf(v1_4)));
                if (v3_5 == null) {
                    v3_5 = new java.util.ArrayList();
                    v0_2.put(Integer.valueOf(v1_4), v3_5);
                }
                v3_5.add(v2_2);
            } while(v14_1.moveToNext());
            if (v14_1 != 0) {
                v14_1.close();
            }
            return v0_2;
        } catch (Throwable v13_1) {
            v14_1 = 0;
            if (v14_1 != 0) {
                v14_1.close();
            }
            throw v13_1;
        } catch (java.util.Map v0_0) {
            v14_1 = 0;
        } catch (Throwable v13_1) {
        }
    }

Method com.google.android.gms.internal.ajt.e() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map e(String p12)
    {
        this.Q();
        this.e();
        com.google.android.gms.common.internal.ae.a(p12);
        int v0_1 = this.B();
        try {
            com.google.android.gms.internal.aku v4_0 = new String[1];
            v4_0[0] = p12;
            int v0_0 = v0_1.query("audience_filter_values", new String[] {"audience_id", "current_results"}), "app_id=?", v4_0, 0, 0, 0);
            try {
                if (v0_0.moveToFirst()) {
                    android.support.v4.util.ArrayMap v1_3 = new android.support.v4.util.ArrayMap();
                    do {
                        boolean v2_1 = v0_0.getInt(0);
                        java.io.IOException v3_1 = v0_0.getBlob(1);
                        java.io.IOException v3_2 = com.google.android.gms.internal.f.a(v3_1, 0, v3_1.length);
                        com.google.android.gms.internal.aku v4_3 = new com.google.android.gms.internal.apl();
                        v4_3.a(v3_2);
                        v1_3.put(Integer.valueOf(v2_1), v4_3);
                    } while(v0_0.moveToNext());
                    if (v0_0 != 0) {
                        v0_0.close();
                    }
                    return v1_3;
                } else {
                    if (v0_0 != 0) {
                        v0_0.close();
                    }
                    return 0;
                }
            } catch (android.support.v4.util.ArrayMap v1_0) {
                this.v().y().a("Database error querying filter results. appId", com.google.android.gms.internal.aks.a(p12), v1_0);
                if (v0_0 != 0) {
                    v0_0.close();
                }
                return 0;
            }
        } catch (Throwable v12_1) {
            v0_0 = 0;
            if (v0_0 != 0) {
                v0_0.close();
            }
            throw v12_1;
        } catch (android.support.v4.util.ArrayMap v1_0) {
            v0_0 = 0;
        } catch (Throwable v12_1) {
        }
    }

Method com.google.android.gms.internal.ajt.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final byte[] d(String p11)
    {
        com.google.android.gms.common.internal.ae.a(p11);
        this.e();
        this.Q();
        try {
            int v1_1 = this.B();
            Object v5_1 = new String[1];
            v5_1[0] = p11;
            int v1_0 = v1_1.query("apps", new String[] {"remote_config"}), "app_id=?", v5_1, 0, 0, 0);
            try {
                if (v1_0.moveToFirst()) {
                    byte[] v2_2 = v1_0.getBlob(0);
                    if (v1_0.moveToNext()) {
                        this.v().y().a("Got multiple records for app config, expected one. appId", com.google.android.gms.internal.aks.a(p11));
                    }
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return v2_2;
                } else {
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return 0;
                }
            } catch (byte[] v2_0) {
                this.v().y().a("Error querying remote config. appId", com.google.android.gms.internal.aks.a(p11), v2_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                return 0;
            }
        } catch (Throwable v11_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v11_1;
        } catch (byte[] v2_0) {
            v1_0 = 0;
        } catch (Throwable v11_1) {
        }
    }

Method com.google.android.gms.internal.ajt.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.ajq d(String p30, String p31)
    {
        com.google.android.gms.common.internal.ae.a(p30);
        com.google.android.gms.common.internal.ae.a(p31);
        this.e();
        this.Q();
        try {
            int v9_1 = this.B();
            String[] v13 = "active";
            String v15 = "trigger_timeout";
            com.google.android.gms.internal.aot v17 = "creation_timestamp";
            String v19 = "triggered_timestamp";
            v13 = new String[2];
            v13[0] = p30;
            v13[1] = p31;
            int v9_0 = v9_1.query("conditional_properties", new String[] {"origin", "expired_event"}), "app_id=? and name=?", v13, 0, 0, 0);
            try {
                if (v9_0.moveToFirst()) {
                    String v16_1 = v9_0.getString(0);
                    try {
                        int v20;
                        Object v5 = this.a(v9_0, 1);
                    } catch (com.google.android.gms.internal.ajq v0_1) {
                        this.v().y().a("Error querying conditional property", com.google.android.gms.internal.aks.a(p30), this.q().c(p31), v0_1);
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        return 0;
                    }
                    if (v9_0.getInt(2) == 0) {
                        v20 = 0;
                    } else {
                        v20 = 1;
                    }
                    String v21_1 = v9_0.getString(3);
                    long v23 = v9_0.getLong(4);
                    com.google.android.gms.internal.akf v22_1 = ((com.google.android.gms.internal.akf) this.r().a(v9_0.getBlob(5), com.google.android.gms.internal.akf.CREATOR));
                    long v18 = v9_0.getLong(6);
                    com.google.android.gms.internal.akf v25_1 = ((com.google.android.gms.internal.akf) this.r().a(v9_0.getBlob(7), com.google.android.gms.internal.akf.CREATOR));
                    Object v3_3 = v9_0.getLong(8);
                    long v26 = v9_0.getLong(9);
                    com.google.android.gms.internal.akf v28_1 = ((com.google.android.gms.internal.akf) this.r().a(v9_0.getBlob(10), com.google.android.gms.internal.akf.CREATOR));
                    v17 = new com.google.android.gms.internal.aot;
                    v17(p31, v3_3, v5, v16_1);
                    com.google.android.gms.internal.ajq v0_0 = new com.google.android.gms.internal.ajq;
                    v0_0(p30, v16_1, v17, v18, v20, v21_1, v22_1, v23, v25_1, v26, v28_1);
                    if (v9_0.moveToNext()) {
                        this.v().y().a("Got multiple records for conditional property, expected one", com.google.android.gms.internal.aks.a(p30), this.q().c(p31));
                    }
                    if (v9_0 != 0) {
                        v9_0.close();
                    }
                    return v0_0;
                } else {
                    if (v9_0 != 0) {
                        v9_0.close();
                    }
                    return 0;
                }
            } catch (com.google.android.gms.internal.ajq v0_2) {
                if (v9_0 != 0) {
                    v9_0.close();
                }
                throw v0_2;
            } catch (com.google.android.gms.internal.ajq v0_1) {
            }
        } catch (com.google.android.gms.internal.ajq v0_2) {
            v9_0 = 0;
        } catch (com.google.android.gms.internal.ajq v0_1) {
            v9_0 = 0;
        } catch (com.google.android.gms.internal.ajq v0_2) {
        }
    }

Method com.google.android.gms.internal.ajt.c() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.aov c(String p19, String p20)
    {
        com.google.android.gms.common.internal.ae.a(p19);
        com.google.android.gms.common.internal.ae.a(p20);
        this.e();
        this.Q();
        try {
            int v10_1 = this.B();
            String[] v14 = new String[2];
            v14[0] = p19;
            v14[1] = p20;
            int v10_0 = v10_1.query("user_attributes", new String[] {"set_timestamp", "value", "origin"}), "app_id=? and name=?", v14, 0, 0, 0);
            try {
                if (v10_0.moveToFirst()) {
                    try {
                        android.database.sqlite.SQLiteException v0_3 = new com.google.android.gms.internal.aov;
                        v0_3(p19, v10_0.getString(2), p20, v10_0.getLong(0), this.a(v10_0, 1));
                    } catch (android.database.sqlite.SQLiteException v0_1) {
                        this.v().y().a("Error querying user property. appId", com.google.android.gms.internal.aks.a(p19), this.q().c(p20), v0_1);
                        if (v10_0 != 0) {
                            v10_0.close();
                        }
                        return 0;
                    }
                    if (v10_0.moveToNext()) {
                        this.v().y().a("Got multiple records for user property, expected one. appId", com.google.android.gms.internal.aks.a(p19));
                    }
                    if (v10_0 != 0) {
                        v10_0.close();
                    }
                    return v0_3;
                } else {
                    if (v10_0 != 0) {
                        v10_0.close();
                    }
                    return 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_2) {
                if (v10_0 != 0) {
                    v10_0.close();
                }
                throw v0_2;
            } catch (android.database.sqlite.SQLiteException v0_1) {
            }
        } catch (android.database.sqlite.SQLiteException v0_2) {
            v10_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_1) {
            v10_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_2) {
        }
    }

Method com.google.android.gms.internal.ajt.b() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.ajm b(String p29)
    {
        com.google.android.gms.common.internal.ae.a(p29);
        this.e();
        this.Q();
        try {
            int v3_1 = this.B();
            Object v7 = "resettable_device_id_hash";
            int v9 = "last_bundle_start_timestamp";
            int v11 = "app_version";
            String v13 = "gmp_version";
            String v15 = "measurement_enabled";
            String v17 = "daily_public_events_count";
            String v19 = "daily_conversions_count";
            String v21 = "failed_config_fetch_time";
            String v23 = "firebase_instance_id";
            String v25 = "daily_realtime_events_count";
            com.google.android.gms.internal.aku v0_0 = 1;
            Object v7_2 = new String[1];
            v7_2[0] = p29;
            int v3_0 = v3_1.query("apps", new String[] {"app_instance_id", "android_id"}), "app_id=?", v7_2, 0, 0, 0);
            try {
                if (v3_0.moveToFirst()) {
                    try {
                        String v6_0;
                        com.google.android.gms.internal.ajm v4_4 = new com.google.android.gms.internal.ajm(this.p, p29);
                        v4_4.a(v3_0.getString(0));
                        v4_4.b(v3_0.getString(1));
                        v4_4.c(v3_0.getString(2));
                        v4_4.f(v3_0.getLong(3));
                        v4_4.a(v3_0.getLong(4));
                        v4_4.b(v3_0.getLong(5));
                        v4_4.e(v3_0.getString(6));
                        v4_4.f(v3_0.getString(7));
                        v4_4.d(v3_0.getLong(8));
                        v4_4.e(v3_0.getLong(9));
                    } catch (com.google.android.gms.internal.aku v0_19) {
                        this.v().y().a("Error querying app. appId", com.google.android.gms.internal.aks.a(p29), v0_19);
                        if (v3_0 != 0) {
                            v3_0.close();
                        }
                        return 0;
                    }
                    if (!v3_0.isNull(10)) {
                        v6_0 = v3_0.getInt(10);
                    } else {
                        v6_0 = 1;
                    }
                    if (v6_0 == null) {
                        v0_0 = 0;
                    } else {
                    }
                    String v6_8;
                    v4_4.a(v0_0);
                    v4_4.i(v3_0.getLong(11));
                    v4_4.j(v3_0.getLong(12));
                    v4_4.k(v3_0.getLong(13));
                    v4_4.l(v3_0.getLong(14));
                    v4_4.g(v3_0.getLong(15));
                    v4_4.h(v3_0.getLong(16));
                    if (!v3_0.isNull(17)) {
                        v6_8 = ((long) v3_0.getInt(17));
                    } else {
                        v6_8 = -2147483648;
                    }
                    String v6_12;
                    v4_4.c(v6_8);
                    v4_4.d(v3_0.getString(18));
                    v4_4.n(v3_0.getLong(19));
                    v4_4.m(v3_0.getLong(20));
                    v4_4.g(v3_0.getString(21));
                    if (!v3_0.isNull(22)) {
                        v6_12 = v3_0.getLong(22);
                    } else {
                        v6_12 = 0;
                    }
                    v4_4.o(v6_12);
                    v4_4.a();
                    if (v3_0.moveToNext()) {
                        this.v().y().a("Got multiple records for app, expected one. appId", com.google.android.gms.internal.aks.a(p29));
                    }
                    if (v3_0 != 0) {
                        v3_0.close();
                    }
                    return v4_4;
                } else {
                    if (v3_0 != 0) {
                        v3_0.close();
                    }
                    return 0;
                }
            } catch (com.google.android.gms.internal.aku v0_20) {
                if (v3_0 != 0) {
                    v3_0.close();
                }
                throw v0_20;
            } catch (com.google.android.gms.internal.aku v0_19) {
            }
        } catch (com.google.android.gms.internal.aku v0_20) {
            v3_0 = 0;
        } catch (com.google.android.gms.internal.aku v0_19) {
            v3_0 = 0;
        } catch (com.google.android.gms.internal.aku v0_20) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p25, String[] p26)
    {
        this.e();
        this.Q();
        android.database.sqlite.SQLiteException v0_4 = new java.util.ArrayList();
        boolean v1_4 = 0;
        try {
            com.google.android.gms.internal.aku v2_3 = this.B();
            com.google.android.gms.internal.aot v6 = "name";
            int v8 = "active";
            String v10 = "trigger_timeout";
            long v12 = "creation_timestamp";
            com.google.android.gms.internal.akf v14 = "triggered_timestamp";
            com.google.android.gms.internal.ajs.N();
            com.google.android.gms.internal.aku v2_2 = v2_3.query("conditional_properties", new String[] {"app_id", "expired_event"}), p25, p26, 0, 0, "rowid", "1001");
            try {
                if (!v2_2.moveToFirst()) {
                    if (v2_2 != null) {
                        v2_2.close();
                    }
                    return v0_4;
                }
            } catch (android.database.sqlite.SQLiteException v0_2) {
                if (v2_2 != null) {
                    v2_2.close();
                }
                throw v0_2;
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v1_4 = v2_2;
                this.v().y().a("Error querying conditional user property value", v0_0);
                android.database.sqlite.SQLiteException v0_1 = java.util.Collections.emptyList();
                if (v1_4) {
                    v1_4.close();
                }
                return v0_1;
            }
            while (v0_4.size() < com.google.android.gms.internal.ajs.N()) {
                boolean v1_7 = 0;
                String v4_3 = v2_2.getString(0);
                com.google.android.gms.internal.akf v11_1 = v2_2.getString(1);
                com.google.android.gms.internal.aot v6_2 = v2_2.getString(2);
                int v9_2 = this.a(v2_2, 3);
                if (v2_2.getInt(4) != 0) {
                    v1_7 = 1;
                }
                long v12_1 = v2_2.getString(5);
                long v13 = v2_2.getLong(6);
                com.google.android.gms.internal.akf v16_2 = ((com.google.android.gms.internal.akf) this.r().a(v2_2.getBlob(7), com.google.android.gms.internal.akf.CREATOR));
                com.google.android.gms.internal.akf v17_1 = v2_2.getLong(8);
                com.google.android.gms.internal.akf v19_1 = ((com.google.android.gms.internal.akf) this.r().a(v2_2.getBlob(9), com.google.android.gms.internal.akf.CREATOR));
                long v7_4 = v2_2.getLong(10);
                long v20 = v2_2.getLong(11);
                com.google.android.gms.internal.akf v22_1 = ((com.google.android.gms.internal.akf) this.r().a(v2_2.getBlob(12), com.google.android.gms.internal.akf.CREATOR));
                com.google.android.gms.internal.aot v23 = new com.google.android.gms.internal.aot;
                v23(v6_2, v7_4, v9_2, v11_1);
                String v10_1 = new com.google.android.gms.internal.ajq;
                boolean v1_0 = v10_1;
                v10_1(v4_3, v11_1, v23, v17_1, v1_7, v12_1, v16_2, v13, v19_1, v20, v22_1);
                v0_4.add(v1_0);
                if (!v2_2.moveToNext()) {
                }
                if (v2_2 != null) {
                    v2_2.close();
                }
                return v0_4;
            }
            this.v().y().a("Read more than the max allowed conditional properties, ignoring extra", Integer.valueOf(com.google.android.gms.internal.ajs.N()));
        } catch (android.database.sqlite.SQLiteException v0_2) {
            v2_2 = v1_4;
        } catch (android.database.sqlite.SQLiteException v0_0) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p22, String p23, String p24)
    {
        com.google.android.gms.common.internal.ae.a(p22);
        this.e();
        this.Q();
        android.database.sqlite.SQLiteException v0_3 = new java.util.ArrayList();
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v2_4 = new java.util.ArrayList(3);
            try {
                String v5_1;
                v2_4.add(p22);
                boolean v4_5 = new StringBuilder("app_id=?");
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v5_1 = p23;
                android.database.Cursor v2_3 = 0;
                this.v().y().a("(2)Error querying user properties", com.google.android.gms.internal.aks.a(p22), v5_1, v0_0);
                if (v2_3 != null) {
                    v2_3.close();
                }
                return 0;
            }
            if (android.text.TextUtils.isEmpty(p23)) {
                v5_1 = p23;
            } else {
                v5_1 = p23;
                v2_4.add(p23);
                v4_5.append(" and origin=?");
            }
            if (!android.text.TextUtils.isEmpty(p24)) {
                v2_4.add(String.valueOf(p24).concat("*"));
                v4_5.append(" and name glob ?");
            }
            String v6_10 = new String[v2_4.size()];
            String[] v16_1 = ((String[]) v2_4.toArray(v6_10));
            ark>com.google.android.gms.internal.ajtark> v12_0 = this.B();
            com.google.android.gms.internal.aov v15_0 = v4_5.toString();
            com.google.android.gms.internal.ajs.L();
            v2_3 = v12_0.query("user_attributes", new String[] {"name", "set_timestamp", "value", "origin"}), v15_0, v16_1, 0, 0, "rowid", "1001");
            try {
                if (!v2_3.moveToFirst()) {
                    if (v2_3 != null) {
                        v2_3.close();
                    }
                    return v0_3;
                }
            } catch (android.database.sqlite.SQLiteException v0_1) {
                v1 = v2_3;
                if (v1 != null) {
                    v1.close();
                }
                throw v0_1;
            } catch (android.database.sqlite.SQLiteException v0_0) {
            }
            while (v0_3.size() < com.google.android.gms.internal.ajs.L()) {
                String v7_2 = v2_3.getString(0);
                long v8_1 = v2_3.getLong(1);
                try {
                    Object v10 = this.a(v2_3, 2);
                    String v13_1 = v2_3.getString(3);
                } catch (android.database.sqlite.SQLiteException v0_0) {
                }
                if (v10 != null) {
                    com.google.android.gms.internal.aov v15_1 = new com.google.android.gms.internal.aov;
                    v15_1(p22, v13_1, v7_2, v8_1, v10);
                    v0_3.add(v15_1);
                } else {
                    this.v().y().a("(2)Read invalid user property value, ignoring it", com.google.android.gms.internal.aks.a(p22), v13_1, p24);
                }
                if (v2_3.moveToNext()) {
                    v5_1 = v13_1;
                }
                if (v2_3 != null) {
                    v2_3.close();
                }
                return v0_3;
            }
            this.v().y().a("Read more than the max allowed user properties, ignoring excess", Integer.valueOf(com.google.android.gms.internal.ajs.L()));
        } catch (android.database.sqlite.SQLiteException v0_1) {
        } catch (android.database.sqlite.SQLiteException v0_0) {
            String v11 = p22;
        } catch (android.database.sqlite.SQLiteException v0_1) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p13, int p14, int p15)
    {
        java.util.ArrayList v2_5;
        this.e();
        this.Q();
        if (p14 <= null) {
            v2_5 = 0;
        } else {
            v2_5 = 1;
        }
        java.util.ArrayList v2_0;
        com.google.android.gms.common.internal.ae.b(v2_5);
        if (p15 <= null) {
            v2_0 = 0;
        } else {
            v2_0 = 1;
        }
        com.google.android.gms.common.internal.ae.b(v2_0);
        com.google.android.gms.common.internal.ae.a(p13);
        java.util.ArrayList v2_1 = 0;
        try {
            int v3_0 = this.B();
            Object v7_0 = new String[1];
            v7_0[0] = p13;
            com.google.android.gms.internal.aku v14_1 = v3_0.query("queue", new String[] {"rowid", "data"}), "app_id=?", v7_0, 0, 0, "rowid", String.valueOf(p14));
            try {
                if (v14_1.moveToFirst()) {
                    java.util.ArrayList v2_4 = new java.util.ArrayList();
                    int v3_1 = 0;
                    do {
                        android.util.Pair v4_2 = v14_1.getLong(0);
                        int v6_3 = this.r().b(v14_1.getBlob(1));
                        if ((!v2_4.isEmpty()) && ((v6_3.length + v3_1) > p15)) {
                            break;
                        }
                        Object v7_7 = com.google.android.gms.internal.f.a(v6_3, 0, v6_3.length);
                        com.google.android.gms.internal.apk v8_2 = new com.google.android.gms.internal.apk();
                        v8_2.a(v7_7);
                        v3_1 += v6_3.length;
                        v2_4.add(android.util.Pair.create(v8_2, Long.valueOf(v4_2)));
                    } while((v14_1.moveToNext()) && (v3_1 <= p15));
                    if (v14_1 != null) {
                        v14_1.close();
                    }
                    return v2_4;
                } else {
                    java.util.List v15_1 = java.util.Collections.emptyList();
                    if (v14_1 != null) {
                        v14_1.close();
                    }
                    return v15_1;
                }
            } catch (Throwable v13_3) {
                if (v14_1 != null) {
                    v14_1.close();
                }
                throw v13_3;
            } catch (java.util.List v15_2) {
                v2_1 = v14_1;
                this.v().y().a("Error querying bundles. appId", com.google.android.gms.internal.aks.a(p13), v15_2);
                Throwable v13_2 = java.util.Collections.emptyList();
                if (v2_1 != null) {
                    v2_1.close();
                }
                return v13_2;
            }
        } catch (Throwable v13_3) {
            v14_1 = v2_1;
        } catch (java.util.List v15_2) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p14)
    {
        com.google.android.gms.common.internal.ae.a(p14);
        this.e();
        this.Q();
        android.database.sqlite.SQLiteException v0_2 = new java.util.ArrayList();
        try {
            int v2_1 = this.B();
            String v6_1 = new String[1];
            v6_1[0] = p14;
            int v2_0 = v2_1.query("user_attributes", new String[] {"name", "origin", "set_timestamp", "value"}), "app_id=?", v6_1, 0, 0, "rowid", String.valueOf(com.google.android.gms.internal.ajs.L()));
            try {
                if (!v2_0.moveToFirst()) {
                    if (v2_0 != 0) {
                        v2_0.close();
                    }
                    return v0_2;
                }
            } catch (android.database.sqlite.SQLiteException v0_0) {
                this.v().y().a("Error querying user properties. appId", com.google.android.gms.internal.aks.a(p14), v0_0);
                if (v2_0 != 0) {
                    v2_0.close();
                }
                return 0;
            }
            do {
                String v7_2 = v2_0.getString(0);
                boolean v3_1 = v2_0.getString(1);
                if (!v3_1) {
                    v3_1 = "";
                }
                String v6_2 = v3_1;
                long v8_1 = v2_0.getLong(2);
                Object v10_2 = this.a(v2_0, 3);
                if (v10_2 != null) {
                    boolean v3_4 = new com.google.android.gms.internal.aov;
                    v3_4(p14, v6_2, v7_2, v8_1, v10_2);
                    v0_2.add(v3_4);
                } else {
                    this.v().y().a("Read invalid user property value, ignoring it. appId", com.google.android.gms.internal.aks.a(p14));
                }
            } while(v2_0.moveToNext());
            if (v2_0 != 0) {
                v2_0.close();
            }
            return v0_2;
        } catch (Throwable v14_1) {
            v2_0 = 0;
            if (v2_0 != 0) {
                v2_0.close();
            }
            throw v14_1;
        } catch (android.database.sqlite.SQLiteException v0_0) {
            v2_0 = 0;
        } catch (Throwable v14_1) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.akb a(String p15, String p16)
    {
        com.google.android.gms.common.internal.ae.a(p15);
        com.google.android.gms.common.internal.ae.a(p16);
        this.e();
        this.Q();
        try {
            com.google.android.gms.internal.aku v1_7 = this.B();
            String[] v5 = new String[2];
            v5[0] = p15;
            v5[1] = p16;
            int v13 = v1_7.query("events", new String[] {"lifetime_count", "current_bundle_count", "last_fire_timestamp"}), "app_id=? and name=?", v5, 0, 0, 0);
            try {
                if (v13.moveToFirst()) {
                    com.google.android.gms.internal.akb v0_3 = new com.google.android.gms.internal.akb;
                    v0_3(p15, p16, v13.getLong(0), v13.getLong(1), v13.getLong(2));
                    if (v13.moveToNext()) {
                        this.v().y().a("Got multiple records for event aggregates, expected one. appId", com.google.android.gms.internal.aks.a(p15));
                    }
                    if (v13 != 0) {
                        v13.close();
                    }
                    return v0_3;
                } else {
                    if (v13 != 0) {
                        v13.close();
                    }
                    return 0;
                }
            } catch (com.google.android.gms.internal.akb v0_1) {
                this.v().y().a("Error querying events. appId", com.google.android.gms.internal.aks.a(p15), this.q().a(p16), v0_1);
                if (v13 != 0) {
                    v13.close();
                }
                return 0;
            }
        } catch (com.google.android.gms.internal.akb v0_2) {
            v13 = 0;
            if (v13 != 0) {
                v13.close();
            }
            throw v0_2;
        } catch (com.google.android.gms.internal.akb v0_1) {
            v13 = 0;
        } catch (com.google.android.gms.internal.akb v0_2) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.aju a(long p16, String p18, boolean p19, boolean p20, boolean p21, boolean p22, boolean p23)
    {
        com.google.android.gms.common.internal.ae.a(p18);
        this.e();
        this.Q();
        String v2_1 = new String[1];
        v2_1[0] = p18;
        com.google.android.gms.internal.aju v4_1 = new com.google.android.gms.internal.aju();
        String v5_8 = 0;
        try {
            android.database.sqlite.SQLiteDatabase v14 = this.B();
            String[] v10 = "daily_public_events_count";
            int v12 = "daily_error_events_count";
            v10 = new String[1];
            v10[0] = p18;
            int v6_1 = v14.query("apps", new String[] {"day", "daily_realtime_events_count"}), "app_id=?", v10, 0, 0, 0);
            try {
                if (v6_1.moveToFirst()) {
                    if (v6_1.getLong(0) == p16) {
                        v4_1.b = v6_1.getLong(1);
                        v4_1.a = v6_1.getLong(2);
                        v4_1.c = v6_1.getLong(3);
                        v4_1.d = v6_1.getLong(4);
                        v4_1.e = v6_1.getLong(5);
                    }
                    if (p19) {
                        v4_1.b = (v4_1.b + 1);
                    }
                    if (p20) {
                        v4_1.a = (v4_1.a + 1);
                    }
                    if (p21) {
                        v4_1.c = (v4_1.c + 1);
                    }
                    if (p22) {
                        v4_1.d = (v4_1.d + 1);
                    }
                    if (p23) {
                        v4_1.e = (v4_1.e + 1);
                    }
                    android.content.ContentValues v0_1 = new android.content.ContentValues();
                    v0_1.put("day", Long.valueOf(p16));
                    v0_1.put("daily_public_events_count", Long.valueOf(v4_1.a));
                    v0_1.put("daily_events_count", Long.valueOf(v4_1.b));
                    v0_1.put("daily_conversions_count", Long.valueOf(v4_1.c));
                    v0_1.put("daily_error_events_count", Long.valueOf(v4_1.d));
                    v0_1.put("daily_realtime_events_count", Long.valueOf(v4_1.e));
                    v14.update("apps", v0_1, "app_id=?", v2_1);
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                } else {
                    this.v().A().a("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.aks.a(p18));
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                }
            } catch (android.content.ContentValues v0_10) {
                if (v6_1 != 0) {
                    v6_1.close();
                }
                throw v0_10;
            } catch (android.content.ContentValues v0_5) {
                v5_8 = v6_1;
                this.v().y().a("Error updating daily counts. appId", com.google.android.gms.internal.aks.a(p18), v0_5);
                if (v5_8 != null) {
                    v5_8.close();
                }
                return v4_1;
            }
        } catch (android.content.ContentValues v0_10) {
            v6_1 = v5_8;
        } catch (android.content.ContentValues v0_5) {
        }
    }

Method com.google.android.gms.internal.ajt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private static boolean a(com.google.android.gms.internal.aks p11, android.database.sqlite.SQLiteDatabase p12, String p13)
    {
        if (p11 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            android.database.sqlite.SQLiteException v0_2 = 0;
            try {
                String[] v6 = new String[1];
                v6[0] = p13;
                android.database.sqlite.SQLiteException v12_2 = p12.query("SQLITE_MASTER", new String[] {"name"}), "name=?", v6, 0, 0, 0);
                try {
                    android.database.sqlite.SQLiteException v0_0 = v12_2.moveToFirst();
                } catch (Throwable v11_4) {
                    v0_2 = v12_2;
                    if (v0_2 != null) {
                        v0_2.close();
                    }
                    throw v11_4;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v0_2 = v12_2;
                    android.database.sqlite.SQLiteException v12_3 = v0_1;
                    p11.A().a("Error querying for table", p13, v12_3);
                    if (v0_2 != null) {
                        v0_2.close();
                    }
                    return 0;
                }
                if (v12_2 != null) {
                    v12_2.close();
                }
                return v0_0;
            } catch (Throwable v11_4) {
            } catch (android.database.sqlite.SQLiteException v12_3) {
            }
        }
    }

Method com.google.android.gms.internal.ata.f() calling method android.database.sqlite.SQLiteDatabase.query()


    private final int f()
    {
        String v1_1 = this.b("Error opening database for getNumStoredHits.");
        android.database.sqlite.SQLiteException v0_1 = 0;
        if (v1_1 != null) {
            String v9 = 0;
            try {
                String v1_0 = v1_1.query("gtm_hits", new String[] {"hit_id", "hit_first_send_time"}), "hit_first_send_time=0", 0, 0, 0, 0);
                try {
                    String v2_1 = v1_0.getCount();
                } catch (android.database.sqlite.SQLiteException v0_2) {
                    v9 = v1_0;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v0_2;
                } catch (String v2_0) {
                    v9 = v1_0;
                    String v2_3 = String.valueOf(v2_0.getMessage());
                    if (v2_3.length() == 0) {
                        String v1_3 = new String("Error getting num untried hits: ");
                    } else {
                        v1_3 = "Error getting num untried hits: ".concat(v2_3);
                    }
                    com.google.android.gms.internal.asx.b(v1_3);
                    if (v9 == null) {
                        return v0_1;
                    } else {
                        v9.close();
                        return v0_1;
                    }
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_1 = v2_1;
                return v0_1;
            } catch (android.database.sqlite.SQLiteException v0_2) {
            } catch (String v2_0) {
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.internal.ata.b() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List b(int p25)
    {
        int v1_1 = new java.util.ArrayList();
        com.google.android.gms.internal.asi v0_33 = this.b("Error opening database for peekHits");
        if (v0_33 != null) {
            try {
                java.util.ArrayList v10_1 = new Object[1];
                int v14 = 0;
                v10_1[0] = "hit_id";
                String v11_3 = v0_33.query("gtm_hits", new String[] {"hit_id", "hit_time", "hit_first_send_time"}), 0, 0, 0, 0, String.format("%s ASC", v10_1), Integer.toString(40));
                try {
                    java.util.ArrayList v10_6 = new java.util.ArrayList();
                    try {
                        if (v11_3.moveToFirst()) {
                            try {
                                do {
                                    int v1_6 = new com.google.android.gms.internal.asi;
                                    v1_6(v11_3.getLong(0), v11_3.getLong(1), v11_3.getLong(2));
                                    v10_6.add(v1_6);
                                } while(v11_3.moveToNext());
                            } catch (com.google.android.gms.internal.asi v0_32) {
                                android.database.Cursor v23 = v11_3;
                                if (v23 != null) {
                                    v23.close();
                                }
                                throw v0_32;
                            } catch (com.google.android.gms.internal.asi v0_31) {
                                v1_1 = v10_6;
                                int v12_1 = v11_3;
                                try {
                                    com.google.android.gms.internal.asi v0_35 = String.valueOf(v0_31.getMessage());
                                } catch (com.google.android.gms.internal.asi v0_32) {
                                    v23 = v12_1;
                                }
                                if (v0_35.length() == 0) {
                                    com.google.android.gms.internal.asi v0_37 = new String("Error in peekHits fetching hitIds: ");
                                } else {
                                    v0_37 = "Error in peekHits fetching hitIds: ".concat(v0_35);
                                }
                                com.google.android.gms.internal.asx.b(v0_37);
                                if (v12_1 != 0) {
                                    v12_1.close();
                                }
                                return v1_1;
                            }
                            if (!v11_3.moveToNext()) {
                            }
                        }
                    } catch (com.google.android.gms.internal.asi v0_31) {
                        v1_1 = v10_6;
                        v12_1 = v11_3;
                    }
                    if (v11_3 != null) {
                        v11_3.close();
                    }
                    try {
                        int v9_0 = new Object[1];
                        v9_0[0] = "hit_id";
                        int v1_3 = v10_6;
                        java.util.ArrayList v10_0 = String.format("%s ASC", v9_0);
                        String v16_2 = v11_3;
                        String v11_0 = Integer.toString(40);
                        try {
                            v11_0 = v0_33.query("gtm_hits", new String[] {"hit_id", "hit_url", "hit_method", "hit_headers", "hit_body"}), 0, 0, 0, 0, v10_0, v11_0);
                            try {
                                if (v11_0.moveToFirst()) {
                                    int v3_2 = 0;
                                    do {
                                        if (((android.database.sqlite.SQLiteCursor) v11_0).getWindow().getNumRows() <= 0) {
                                            org.json.JSONObject v4_0 = new Object[1];
                                            v4_0[0] = Long.valueOf(((com.google.android.gms.internal.asi) v1_3.get(v3_2)).a());
                                            com.google.android.gms.internal.asx.b(String.format("HitString for hitId %d too large. Hit will be deleted.", v4_0));
                                            v3_2++;
                                        } else {
                                            ((com.google.android.gms.internal.asi) v1_3.get(v3_2)).a(v11_0.getString(1));
                                            ((com.google.android.gms.internal.asi) v1_3.get(v3_2)).b(v11_0.getString(2));
                                            ((com.google.android.gms.internal.asi) v1_3.get(v3_2)).c(v11_0.getString(4));
                                            int v5_5;
                                            com.google.android.gms.internal.asi v0_16 = v11_0.getString(3);
                                            if (v0_16 == null) {
                                                v5_5 = 0;
                                            } else {
                                                org.json.JSONObject v4_6 = new org.json.JSONObject(v0_16);
                                                com.google.android.gms.internal.asi v0_17 = v4_6.names();
                                                v5_5 = new java.util.HashMap();
                                                int v6_2 = 0;
                                                while (v6_2 < v0_17.length()) {
                                                    String v7_2 = v0_17.getString(v6_2);
                                                    v5_5.put(v7_2, ((String) v4_6.opt(v7_2)));
                                                    v6_2++;
                                                }
                                            }
                                            ((com.google.android.gms.internal.asi) v1_3.get(v3_2)).a(v5_5);
                                        }
                                    } while(v11_0.moveToNext());
                                }
                            } catch (com.google.android.gms.internal.asi v0_0) {
                                com.google.android.gms.internal.asi v0_25 = String.valueOf(v0_0.getMessage());
                                if (v0_25.length() == 0) {
                                    com.google.android.gms.internal.asi v0_27 = new String("Error in peekHits fetching hit url: ");
                                } else {
                                    v0_27 = "Error in peekHits fetching hit url: ".concat(v0_25);
                                }
                                com.google.android.gms.internal.asx.b(v0_27);
                                com.google.android.gms.internal.asi v0_29 = new java.util.ArrayList();
                                java.util.ArrayList v10_3 = ((java.util.ArrayList) v1_3);
                                int v1_4 = v10_3.size();
                                int v3_5 = 0;
                            }
                            if (v11_0 != null) {
                                v11_0.close();
                            }
                            return v1_3;
                        } catch (com.google.android.gms.internal.asi v0_1) {
                            v11_0 = v16_2;
                            if (v11_0 != null) {
                                v11_0.close();
                            }
                            throw v0_1;
                        } catch (com.google.android.gms.internal.asi v0_0) {
                            v11_0 = v16_2;
                        }
                    } catch (com.google.android.gms.internal.asi v0_1) {
                    } catch (com.google.android.gms.internal.asi v0_0) {
                        v1_3 = v10_0;
                    } catch (com.google.android.gms.internal.asi v0_1) {
                    }
                } catch (com.google.android.gms.internal.asi v0_32) {
                    v23 = v11_3;
                } catch (com.google.android.gms.internal.asi v0_31) {
                }
            } catch (com.google.android.gms.internal.asi v0_32) {
                v23 = 0;
            } catch (com.google.android.gms.internal.asi v0_31) {
                v12_1 = 0;
            }
        } else {
            return v1_1;
        }
    }

Method com.google.android.gms.internal.ata.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List a(int p15)
    {
        Throwable v0_1 = new java.util.ArrayList();
        if (p15 > null) {
            String v2_1 = this.b("Error opening database for peekHitIds.");
            if (v2_1 != null) {
                boolean v1_3 = 0;
                try {
                    String v10_1 = new Object[1];
                    v10_1[0] = "hit_id";
                    String v15_1 = v2_1.query("gtm_hits", new String[] {"hit_id"}), 0, 0, 0, 0, String.format("%s ASC", v10_1), Integer.toString(p15));
                    try {
                        if (v15_1.moveToFirst()) {
                            do {
                                v0_1.add(String.valueOf(v15_1.getLong(0)));
                            } while(v15_1.moveToNext());
                        }
                    } catch (Throwable v0_2) {
                        v1_3 = v15_1;
                        if (v1_3) {
                            v1_3.close();
                        }
                        throw v0_2;
                    } catch (boolean v1_2) {
                        v1_3 = v15_1;
                        String v15_2 = v1_2;
                        String v15_4 = String.valueOf(v15_2.getMessage());
                        if (v15_4.length() == 0) {
                            String v15_6 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v15_6 = "Error in peekHits fetching hitIds: ".concat(v15_4);
                        }
                        com.google.android.gms.internal.asx.b(v15_6);
                        if (!v1_3) {
                            return v0_1;
                        } else {
                            v1_3.close();
                            return v0_1;
                        }
                    }
                    if (v15_1 == null) {
                        return v0_1;
                    } else {
                        v15_1.close();
                        return v0_1;
                    }
                } catch (Throwable v0_2) {
                } catch (String v15_2) {
                }
            } else {
                return v0_1;
            }
        } else {
            com.google.android.gms.internal.asx.b("Invalid maxHits specified. Skipping");
            return v0_1;
        }
    }

Method com.google.android.gms.internal.wp.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean a(android.database.sqlite.SQLiteDatabase p12, String p13)
    {
        android.database.sqlite.SQLiteException v1_0 = 0;
        try {
            String[] v6 = new String[1];
            v6[0] = p13;
            android.database.sqlite.SQLiteException v12_1 = p12.query("SQLITE_MASTER", new String[] {"name"}), "name=?", v6, 0, 0, 0);
            try {
                android.database.sqlite.SQLiteException v1_1 = v12_1.moveToFirst();
            } catch (Throwable v13_1) {
                v1_0 = v12_1;
                if (v1_0 != null) {
                    v1_0.close();
                }
                throw v13_1;
            } catch (android.database.sqlite.SQLiteException v1_2) {
                v1_0 = v12_1;
                android.database.sqlite.SQLiteException v12_2 = v1_2;
                this.a.c("Error querying for table", p13, v12_2);
                if (v1_0 != null) {
                    v1_0.close();
                }
                return 0;
            }
            if (v12_1 != null) {
                v12_1.close();
            }
            return v1_1;
        } catch (Throwable v13_1) {
        } catch (android.database.sqlite.SQLiteException v12_2) {
        }
    }

Method com.google.android.gms.internal.atc.a() calling method android.database.sqlite.SQLiteDatabase.query()

Couldn't retrieve source code

Method com.google.android.gms.internal.alt.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean a(String p27, long p28)
    {
        this.q().y();
        try {
            String v3_0 = 0;
            com.google.android.gms.internal.ajt v2_14 = new ark>com.google.android.gms.internal.altark>$a(this, 0);
            Object v4_20 = this.q();
            android.database.sqlite.SQLiteException v5_11 = this.J;
            com.google.android.gms.common.internal.ae.a(v2_14);
            v4_20.e();
            v4_20.Q();
            int v11_0 = 0;
            try {
                int v22;
                String v21_1;
                int v15_2 = v4_20.B();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Long v12_21;
                        if (v5_11 == -1) {
                            v3_0 = 0;
                            v12_21 = new String[] {0});
                        } else {
                            String v3_3 = new String[2];
                            v3_3[0] = 0;
                            v3_3[1] = String.valueOf(v5_11);
                            v12_21 = v3_3;
                            v3_0 = 0;
                        }
                        int v13_9;
                        if (v5_11 == -1) {
                            v13_9 = "";
                        } else {
                            v13_9 = " and rowid <= ?";
                        }
                        String v3_10 = new StringBuilder((String.valueOf(v13_9).length() + 84));
                        v3_10.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v3_10.append(v13_9);
                        v3_10.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_10.toString(), v12_21);
                        if (v3_0.moveToFirst()) {
                            int v13_12 = v3_0.getString(0);
                            v3_0.close();
                            v22 = v3_0;
                            v21_1 = v13_12;
                            v3_0 = 0;
                            try {
                                Long v12_3 = new String[2];
                                v12_3[0] = v3_0;
                                v12_3[1] = v21_1;
                                android.database.sqlite.SQLiteDatabase v24 = v15_2;
                                int v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_3, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Long v12_6 = v15_1.getBlob(0);
                                        Long v12_7 = com.google.android.gms.internal.f.a(v12_6, 0, v12_6.length);
                                        int v13_4 = new com.google.android.gms.internal.apk();
                                        try {
                                            v13_4.a(v12_7);
                                        } catch (java.io.IOException v0_5) {
                                            boolean v6_0 = v15_1;
                                            v4_20.v().y().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.aks.a(v3_0), v0_5);
                                            if (!v6_0) {
                                                String v3_7;
                                                if (v2_14.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_14.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.q().z();
                                                    this.q().A();
                                                    return 0;
                                                } else {
                                                    String v3_8 = v2_14.a;
                                                    Object v4_4 = new com.google.android.gms.internal.aph[v2_14.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_5 = 0;
                                                    android.database.sqlite.SQLiteException v5_7 = 0;
                                                    boolean v6_12 = 0;
                                                    while (v4_5 < v2_14.c.size()) {
                                                        if (!this.j().b(v2_14.a.q, ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) {
                                                            com.google.android.gms.internal.aku v7_39 = this.j().c(v2_14.a.q, ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d);
                                                            if (v7_39 != null) {
                                                                if (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c == null) {
                                                                    Object v9_17 = new com.google.android.gms.internal.api[v11_0];
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v9_17;
                                                                }
                                                                String v8_34 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c;
                                                                Object v9_18 = v8_34.length;
                                                                Long v12_26 = 0;
                                                                int v13_13 = 0;
                                                                Object v14_8 = 0;
                                                                while (v12_26 < v9_18) {
                                                                    int v11_31 = v8_34[v12_26];
                                                                    if (!"_c".equals(v11_31.c)) {
                                                                        if ("_r".equals(v11_31.c)) {
                                                                            v11_31.e = Long.valueOf(1);
                                                                            v14_8 = 1;
                                                                        }
                                                                    } else {
                                                                        v11_31.e = Long.valueOf(1);
                                                                        v13_13 = 1;
                                                                    }
                                                                    v12_26++;
                                                                    int v11 = 0;
                                                                }
                                                                if ((v13_13 == 0) && (v7_39 != null)) {
                                                                    this.f().E().a("Marking event as conversion", this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                                    String v8_42 = ((com.google.android.gms.internal.api[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c, (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c.length + 1)));
                                                                    Object v9_27 = new com.google.android.gms.internal.api();
                                                                    v9_27.c = "_c";
                                                                    v9_27.e = Long.valueOf(1);
                                                                    v8_42[(v8_42.length - 1)] = v9_27;
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v8_42;
                                                                }
                                                                if (v14_8 == null) {
                                                                    this.f().E().a("Marking event as real-time", this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                                    String v8_50 = ((com.google.android.gms.internal.api[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c, (((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c.length + 1)));
                                                                    Object v9_39 = new com.google.android.gms.internal.api();
                                                                    v9_39.c = "_r";
                                                                    v9_39.e = Long.valueOf(1);
                                                                    v8_50[(v8_50.length - 1)] = v9_39;
                                                                    ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).c = v8_50;
                                                                }
                                                                if (this.q().a(this.K(), v2_14.a.q, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v2_14.a.q))) {
                                                                    v5_7 = 1;
                                                                } else {
                                                                    String v8_56 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                                    Object v9_43 = 0;
                                                                    while (v9_43 < v8_56.c.length) {
                                                                        if (!"_r".equals(v8_56.c[v9_43].c)) {
                                                                            v9_43++;
                                                                        } else {
                                                                            int v10_28 = new com.google.android.gms.internal.api[(v8_56.c.length - 1)];
                                                                            if (v9_43 > null) {
                                                                                System.arraycopy(v8_56.c, 0, v10_28, 0, v9_43);
                                                                            }
                                                                            if (v9_43 < v10_28.length) {
                                                                                System.arraycopy(v8_56.c, (v9_43 + 1), v10_28, v9_43, (v10_28.length - v9_43));
                                                                            }
                                                                            v8_56.c = v10_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                }
                                                                if ((com.google.android.gms.internal.aow.a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) && ((v7_39 != null) && (this.q().a(this.K(), v2_14.a.q, 0, 0, 1, 0, 0).c > ((long) this.c.b(v2_14.a.q, com.google.android.gms.internal.aki.o))))) {
                                                                    this.f().A().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                                    com.google.android.gms.internal.aku v7_47 = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                                    String v8_63 = v7_47.c;
                                                                    int v10_32 = 0;
                                                                    int v11_29 = 0;
                                                                    Long v12_34 = 0;
                                                                    while (v10_32 < v8_63.length) {
                                                                        int v13_24 = v8_63[v10_32];
                                                                        if (!"_c".equals(v13_24.c)) {
                                                                            if ("_err".equals(v13_24.c)) {
                                                                                v11_29 = 1;
                                                                            }
                                                                        } else {
                                                                            v12_34 = v13_24;
                                                                        }
                                                                        v10_32++;
                                                                    }
                                                                    if ((v11_29 == 0) || (v12_34 == null)) {
                                                                        if (v12_34 == null) {
                                                                            this.f().y().a("Did not find conversion parameter. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                                        } else {
                                                                            v12_34.c = "_err";
                                                                            v12_34.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        String v8_68 = new com.google.android.gms.internal.api[(v7_47.c.length - 1)];
                                                                        Object v9_56 = v7_47.c;
                                                                        int v10_33 = v9_56.length;
                                                                        int v11_30 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_30 < v10_33) {
                                                                            Object v14_11 = v9_56[v11_30];
                                                                            if (v14_11 != v12_34) {
                                                                                int v15_6 = (v13_23 + 1);
                                                                                v8_68[v13_23] = v14_11;
                                                                                v13_23 = v15_6;
                                                                            }
                                                                            v11_30++;
                                                                        }
                                                                        v7_47.c = v8_68;
                                                                    }
                                                                }
                                                            } else {
                                                                this.o();
                                                                if (com.google.android.gms.internal.aow.n(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d)) {
                                                                }
                                                            }
                                                            String v8_69 = (v6_12 + 1);
                                                            v3_8.d[v6_12] = ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5));
                                                            v6_12 = v8_69;
                                                        } else {
                                                            com.google.android.gms.internal.aku v7_60;
                                                            this.f().A().a("Dropping blacklisted raw event. appId", com.google.android.gms.internal.aks.a(v2_14.a.q), this.p().a(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d));
                                                            if (this.o().l(v2_14.a.q)) {
                                                                v7_60 = 1;
                                                            } else {
                                                                if (!this.o().m(v2_14.a.q)) {
                                                                    v7_60 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_60 == null) && (!"_err".equals(((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d))) {
                                                                this.o().a(v2_14.a.q, 11, "_ev", ((com.google.android.gms.internal.aph) v2_14.c.get(v4_5)).d, 0);
                                                            }
                                                        }
                                                        v4_5++;
                                                        v11_0 = 0;
                                                    }
                                                    if (v6_12 < v2_14.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.internal.aph[]) java.util.Arrays.copyOf(v3_8.d, v6_12));
                                                    }
                                                    v3_8.C = this.a(v2_14.a.q, v2_14.a.e, v3_8.d);
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_16 = 0;
                                                    while (v4_16 < v3_8.d.length) {
                                                        boolean v6_38 = v3_8.d[v4_16];
                                                        if (v6_38.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v6_38.e;
                                                        }
                                                        if (v6_38.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v6_38.e;
                                                        }
                                                        v4_16++;
                                                    }
                                                    Object v4_18 = v2_14.a.q;
                                                    boolean v6_20 = this.q().b(v4_18);
                                                    if (v6_20) {
                                                        if (v3_8.d.length > 0) {
                                                            int v11_2;
                                                            com.google.android.gms.internal.aku v7_13 = v6_20.h();
                                                            if (v7_13 == 0) {
                                                                v11_2 = 0;
                                                            } else {
                                                                v11_2 = Long.valueOf(v7_13);
                                                            }
                                                            v3_8.j = v11_2;
                                                            int v11_3 = v6_20.g();
                                                            if (v11_3 != 0) {
                                                                v7_13 = v11_3;
                                                            } else {
                                                            }
                                                            com.google.android.gms.internal.aku v7_14;
                                                            if (v7_13 == 0) {
                                                                v7_14 = 0;
                                                            } else {
                                                                v7_14 = Long.valueOf(v7_13);
                                                            }
                                                            v3_8.i = v7_14;
                                                            v6_20.r();
                                                            v3_8.y = Integer.valueOf(((int) v6_20.o()));
                                                            v6_20.a(v3_8.g.longValue());
                                                            v6_20.b(v3_8.h.longValue());
                                                            v3_8.z = v6_20.z();
                                                            this.q().a(v6_20);
                                                        }
                                                    } else {
                                                        this.f().y().a("Bundling raw events w/o app info. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        boolean v6_27;
                                                        com.google.android.gms.internal.ajs.X();
                                                        boolean v6_26 = this.j().a(v2_14.a.q);
                                                        if (!v6_26) {
                                                            if (!android.text.TextUtils.isEmpty(v2_14.a.A)) {
                                                                this.f().A().a("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.aks.a(v2_14.a.q));
                                                            } else {
                                                                v6_27 = Long.valueOf(-1);
                                                                v3_8.F = v6_27;
                                                            }
                                                        } else {
                                                            if (v6_26.c != null) {
                                                                v6_27 = v6_26.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.q().a(v3_8, v5_7);
                                                    }
                                                    this.q().a(v2_14.b);
                                                    com.google.android.gms.internal.ajt v2_7 = this.q();
                                                    android.database.sqlite.SQLiteException v5_9 = v2_7.B();
                                                    try {
                                                        com.google.android.gms.internal.aku v7_30 = new String[2];
                                                        v7_30[0] = v4_18;
                                                        try {
                                                            v7_30[1] = v4_18;
                                                            v5_9.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v7_30);
                                                        } catch (java.io.IOException v0_10) {
                                                            v2_7.v().y().a("Failed to remove unused event metadata. appId", com.google.android.gms.internal.aks.a(v4_18), v0_10);
                                                        }
                                                        int v25;
                                                        this.q().z();
                                                        if (v3_8.d.length <= 0) {
                                                            v25 = 0;
                                                        } else {
                                                            v25 = 1;
                                                        }
                                                        this.q().A();
                                                        return v25;
                                                    } catch (java.io.IOException v0_10) {
                                                    }
                                                }
                                            } else {
                                                v6_0.close();
                                            }
                                        } catch (java.io.IOException v0_2) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_20.v().A().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.aks.a(v3_0));
                                        }
                                        android.database.sqlite.SQLiteException v5_1;
                                        int v16_2;
                                        v15_1.close();
                                        v2_14.a(v13_4);
                                        if (v5_11 == -1) {
                                            v5_1 = "app_id = ? and metadata_fingerprint = ?";
                                            Long v12_12 = new String[2];
                                            v12_12[0] = v3_0;
                                            v12_12[1] = v21_1;
                                            v16_2 = v12_12;
                                        } else {
                                            int v13_5 = new String[3];
                                            v13_5[0] = v3_0;
                                            v13_5[1] = v21_1;
                                            v13_5[2] = String.valueOf(v5_11);
                                            v5_1 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v13_5;
                                        }
                                        v6_0 = v15_1;
                                        android.database.sqlite.SQLiteException v5_3 = v24.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_1, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_3.moveToFirst()) {
                                                do {
                                                    boolean v6_5 = v5_3.getLong(0);
                                                    String v8_1 = v5_3.getBlob(3);
                                                    String v8_2 = com.google.android.gms.internal.f.a(v8_1, 0, v8_1.length);
                                                    Long v12_19 = new com.google.android.gms.internal.aph();
                                                    v12_19.a(v8_2);
                                                    v12_19.d = v5_3.getString(1);
                                                    v12_19.e = Long.valueOf(v5_3.getLong(2));
                                                    if (v2_14.a(v6_5, v12_19)) {
                                                    } else {
                                                        if (v5_3 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_3.moveToNext());
                                                if (v5_3 == null) {
                                                }
                                            } else {
                                                v4_20.v().A().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.aks.a(v3_0));
                                                if (v5_3 == null) {
                                                }
                                            }
                                        } catch (java.io.IOException v0_8) {
                                            com.google.android.gms.internal.ajt v2_0 = v0_8;
                                            v6_0 = v5_3;
                                            if (v6_0) {
                                                v6_0.close();
                                            }
                                            throw v2_0;
                                        } catch (java.io.IOException v0_2) {
                                            String v21_0 = v3_0;
                                            v6_0 = v5_3;
                                            String v3_1 = v0_2;
                                            v4_20.v().y().a("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.aks.a(v21_0), v3_1);
                                            if (!v6_0) {
                                            }
                                        }
                                        v5_3.close();
                                    } else {
                                        v4_20.v().y().a("Raw event metadata record is missing. appId", com.google.android.gms.internal.aks.a(v3_0));
                                        if (v15_1 == 0) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (java.io.IOException v0_6) {
                                    v6_0 = v15_1;
                                    v2_0 = v0_6;
                                } catch (java.io.IOException v0_2) {
                                    v6_0 = v15_1;
                                } catch (java.io.IOException v0_9) {
                                    v2_0 = v0_9;
                                    v6_0 = v15_1;
                                } catch (java.io.IOException v0_2) {
                                    v21_0 = v3_0;
                                    v6_0 = v15_1;
                                }
                                v21_0 = v3_0;
                            } catch (java.io.IOException v0_4) {
                                v2_0 = v0_4;
                                v6_0 = v22;
                            } catch (java.io.IOException v0_2) {
                                v21_0 = v3_0;
                                v6_0 = v22;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Long v12_29;
                        if (v5_11 == -1) {
                            v12_29 = new String[1];
                            v12_29[0] = String.valueOf(p28);
                        } else {
                            v12_29 = new String[2];
                            v12_29[0] = String.valueOf(v5_11);
                            v12_29[1] = String.valueOf(p28);
                        }
                        int v13_22;
                        if (v5_11 == -1) {
                            v13_22 = "";
                        } else {
                            v13_22 = "rowid <= ? and ";
                        }
                        String v3_13 = new StringBuilder((String.valueOf(v13_22).length() + 148));
                        v3_13.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_13.append(v13_22);
                        v3_13.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_13.toString(), v12_29);
                        if (v3_0.moveToFirst()) {
                            Long v12_1 = v3_0.getString(0);
                            try {
                                int v13_0 = v3_0.getString(1);
                                v3_0.close();
                                v22 = v3_0;
                                v3_0 = v12_1;
                                v21_1 = v13_0;
                            } catch (java.io.IOException v0_2) {
                                v6_0 = v3_0;
                                v21_0 = v12_1;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (java.io.IOException v0_3) {
                    v2_0 = v0_3;
                    v6_0 = v3_0;
                } catch (java.io.IOException v0_2) {
                    v6_0 = v3_0;
                    v21_0 = v6_0;
                } catch (java.io.IOException v0_2) {
                    v6_0 = v3_0;
                    v21_0 = 0;
                }
                v3_0.close();
            } catch (java.io.IOException v0_1) {
                v2_0 = v0_1;
                v6_0 = 0;
            } catch (java.io.IOException v0_0) {
                v3_1 = v0_0;
                v6_0 = 0;
                v21_0 = 0;
            } catch (java.io.IOException v0_6) {
            }
        } catch (java.io.IOException v0_11) {
            com.google.android.gms.internal.ajt v2_15 = v0_11;
            this.q().A();
            throw v2_15;
        }
    }