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 android.arch.persistence.a.a.a$1.newCursor() calling method android.database.sqlite.SQLiteCursor.<init>()


    public android.database.Cursor newCursor(android.database.sqlite.SQLiteDatabase p2, android.database.sqlite.SQLiteCursorDriver p3, String p4, android.database.sqlite.SQLiteQuery p5)
    {
        this.a.a(new android.arch.persistence.a.a.d(p5));
        return new android.database.sqlite.SQLiteCursor(p3, p4, p5);
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.resetPreviouslyActiveTrackedQueries() calling method android.database.sqlite.SQLiteDatabase.updateWithOnConflict()


    public void resetPreviouslyActiveTrackedQueries(long p10)
    {
        this.verifyInsideTransaction();
        com.google.firebase.database.logging.LogWrapper v0_0 = System.currentTimeMillis();
        android.content.ContentValues v4_1 = new android.content.ContentValues();
        v4_1.put("active", Boolean.valueOf(0));
        v4_1.put("lastUse", Long.valueOf(p10));
        String[] v6 = new String[0];
        this.database.updateWithOnConflict("trackedQueries", v4_1, "active = 1", v6, 5);
        String v10_2 = System.currentTimeMillis();
        if (this.logger.logsDebug()) {
            com.google.firebase.database.logging.LogWrapper v0_3 = this.logger;
            Object[] v2_3 = new Object[1];
            v2_3[0] = Long.valueOf((v10_2 - v0_0));
            Object[] v11 = new Object[0];
            v0_3.debug(String.format("Reset active tracked queries in %dms", v2_3), v11);
        }
        return;
    }

Method com.sophos.smsec.core.datastore.b.v() calling method android.database.sqlite.SQLiteDatabase.update()


    public declared_synchronized boolean v()
    {
        int v0_0 = 1;
        try {
            int v1_1 = this.a(1);
            android.content.ContentValues v2_1 = new android.content.ContentValues();
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_IGNORE.toString(), Boolean.valueOf(0));
        } catch (int v0_1) {
            throw v0_1;
        }
        if (v1_1.update(com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString(), v2_1, 0, 0) <= 0) {
            v0_0 = 0;
        }
        return v0_0;
    }

Method com.sophos.smsec.core.datastore.b.b() calling method android.database.sqlite.SQLiteDatabase.update()


    public boolean b(int p5, int p6, String p7)
    {
        p7 = 1;
        android.database.sqlite.SQLiteDatabase v0 = this.a(1);
        android.content.ContentValues v1_1 = new android.content.ContentValues();
        v1_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_COUNT.toString(), Integer.valueOf(p6));
        String v6_2 = new StringBuilder();
        v6_2.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_ID.toString());
        v6_2.append("=?");
        String v6_3 = v6_2.toString();
        String[] v2_3 = new String[1];
        v2_3[0] = String.valueOf(p5);
        if (v0.update(com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString(), v1_1, v6_3, v2_3) <= 0) {
            p7 = 0;
        }
        return p7;
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public declared_synchronized boolean a(String p17, int p18)
    {
        int v2_0 = 1;
        try {
            android.database.sqlite.SQLiteDatabase v11 = this.a(1);
            android.content.ContentValues v12_1 = new android.content.ContentValues();
            v12_1.clear();
            v12_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString(), p17);
            v12_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.toString(), Integer.valueOf(p18));
            String v3_22 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
            String v4_19 = new byte[1];
            String v13 = 0;
            v4_19[0] = 0;
            v12_1.put(v3_22, v4_19);
            this.E();
            try {
                String v3_36;
                String v3_25 = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString();
                String v4_21 = new StringBuilder();
                v4_21.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString());
                v4_21.append(" =?");
                String v4_22 = v4_21.toString();
                long v5_14 = new String[1];
                v5_14[0] = p17;
            } catch (boolean v0_9) {
                String v3_21 = new StringBuilder();
                v3_21.append("inserting into DB table ");
                v3_21.append(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString());
                v3_21.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v3_21.toString(), v0_9);
                this.b(v13);
                return v13;
            }
            if (0 != ((long) v11.update(v3_25, v12_1, v4_22, v5_14))) {
                String v4_25;
                String v4_23 = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString();
                String v3_32 = new StringBuilder();
                v3_32.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString());
                v3_32.append(" = \'");
                v3_32.append(p17);
                v3_32.append("\'");
                String v3_34 = v11.query(v4_23, new String[] {"key"}), v3_32.toString(), 0, 0, 0, 0);
                if (!v3_34.moveToFirst()) {
                    v4_25 = -1;
                } else {
                    v4_25 = ((long) v3_34.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.getColumnIndex(v3_34)));
                }
                v3_34.close();
                v3_36 = v4_25;
            } else {
                v3_36 = v11.insert(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString(), 0, v12_1);
            }
            if (-1 != v3_36) {
                if (!com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.hasHash()) {
                    v13 = 1;
                    this.b(v13);
                    return v13;
                } else {
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", "updated entry in ignored URL table.");
                    ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v3_36).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(p17.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(p18).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    v12_1.clear();
                    v12_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                    String v3_9 = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString();
                    String v4_8 = new StringBuilder();
                    v4_8.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString());
                    v4_8.append("=?");
                    String v4_9 = v4_8.toString();
                    long v5_9 = new String[1];
                    v5_9[0] = p17;
                    if (1 != ((long) v11.update(v3_9, v12_1, v4_9, v5_9))) {
                        String v3_13 = new StringBuilder();
                        v3_13.append("inserting hash value into DB table ");
                        v3_13.append(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString());
                        v3_13.append(" failed.");
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v3_13.toString());
                    }
                    if ((com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.hasVerticalHash()) && (!ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE))) {
                        v2_0 = 0;
                    }
                    v13 = v2_0;
                    this.b(v13);
                    return v13;
                }
            } else {
                int v2_2 = new StringBuilder();
                v2_2.append("inserting into DB table ");
                v2_2.append(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString());
                v2_2.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v2_2.toString());
                this.b(v13);
                return v13;
            }
        } catch (boolean v0_10) {
            throw v0_10;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public declared_synchronized boolean a(android.content.ContentValues p20)
    {
        try {
            String v3_0;
            int v14_0;
            android.database.sqlite.SQLiteDatabase v13 = this.a(1);
            this.E();
            String v4_46 = this.b(v13);
            int v12_0 = 0;
            int v16 = 0;
        } catch (boolean v0_22) {
            throw v0_22;
        }
        if (v4_46 <= 0) {
            v14_0 = 0;
            v3_0 = 0;
        } else {
            boolean v0_3 = new android.content.ContentValues();
            v0_3.put("type", Integer.valueOf(1));
            String v7_11 = com.sophos.smsec.core.datastore.DataStore.c().getString(com.sophos.smsec.core.datastore.e$c.log_log_pruned);
            String[] v8_2 = new Object[1];
            v8_2[0] = Long.valueOf(v4_46);
            v0_3.put("description", String.format(v7_11, v8_2));
            v0_3.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), Byte.valueOf(0));
            try {
                String v4_45 = v13.insert(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), 0, v0_3);
            } catch (boolean v0_0) {
                v14_0 = 0;
                String v4_14 = new StringBuilder();
                v4_14.append("inserting into DB table ");
                v4_14.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
                v4_14.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v4_14.toString(), v0_0);
                v3_0 = v12_0;
            }
            if (-1 != v4_45) {
                String v7_13 = new StringBuilder();
                v7_13.append("new entry to table ");
                v7_13.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
                v7_13.append(" added. ID=");
                v7_13.append(v4_45);
                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v7_13.toString());
            } else {
                String v7_16 = new StringBuilder();
                v7_16.append("inserting into DB table ");
                v7_16.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
                v7_16.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v7_16.toString());
            }
            int v11_1 = new String[1];
            v11_1[0] = String.valueOf(v4_45);
            String v3_6 = v11_1;
            v14_0 = 0;
            try {
                v12_0 = v13.query(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), 0, "key=?", v11_1, 0, 0, 0, 0);
                try {
                    if ((v12_0.moveToFirst()) && ((v12_0.getColumnCount() > 0) && (com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasHash()))) {
                        ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v12_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.getColumnIndex(v12_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(v12_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.getColumnIndex(v12_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v12_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.getColumnIndex(v12_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(v12_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.DESCRIPTION.getColumnIndex(v12_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        v12_0.close();
                        v0_3.clear();
                        v0_3.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                        String v3_1 = ((long) v13.update(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), v0_3, "key=?", v3_6));
                        StringBuilder v5_25 = new StringBuilder();
                        v5_25.append("updated ");
                        v5_25.append(v3_1);
                        v5_25.append(" rows in hash table.");
                        com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v5_25.toString());
                    }
                } catch (boolean v0_0) {
                }
                v3_0 = v12_0;
            } catch (boolean v0_0) {
                v12_0 = 0;
            }
        }
        p20.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), Byte.valueOf(0));
        try {
            int v14_1;
            String v4_17 = v13.insert(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), v14_0, p20);
        } catch (boolean v0_18) {
            String v4_40 = new StringBuilder();
            v4_40.append("inserting into DB table ");
            v4_40.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
            v4_40.append(" failed.");
            com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v4_40.toString(), v0_18);
            boolean v0_19 = 0;
        }
        if (-1 != v4_17) {
            String v6_9 = new StringBuilder();
            v6_9.append("new entry to table ");
            v6_9.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
            v6_9.append(" added. ID=");
            v6_9.append(v4_17);
            com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v6_9.toString());
            v14_1 = 1;
        } else {
            String v6_12 = new StringBuilder();
            v6_12.append("inserting into DB table ");
            v6_12.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
            v6_12.append(" failed.");
            com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v6_12.toString());
            v14_1 = 1;
        }
        boolean v0_13 = new String[v14_1];
        v0_13[0] = String.valueOf(v4_17);
        v3_0 = v13.query(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), 0, "key=?", v0_13, 0, 0, 0, 0);
        if ((v3_0.moveToFirst()) && (v3_0.getColumnCount() > 0)) {
            if (!com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasHash()) {
                v16 = 1;
            } else {
                ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v3_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.getColumnIndex(v3_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(v3_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.getColumnIndex(v3_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v3_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.getColumnIndex(v3_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(v3_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.DESCRIPTION.getColumnIndex(v3_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                v3_0.close();
                p20.clear();
                p20.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                String v4_36 = ((long) v13.update(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), p20, "key=?", v0_13));
                String v2_2 = new StringBuilder();
                v2_2.append("updated ");
                v2_2.append(v4_36);
                v2_2.append(" rows in hash table.");
                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v2_2.toString());
                if ((com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasVerticalHash()) && (!ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG))) {
                    v14_1 = 0;
                }
                v16 = v14_1;
            }
        }
        v0_19 = v16;
        if ((v3_0 != null) && (!v3_0.isClosed())) {
            v3_0.close();
        }
        this.b(v0_19);
        return v0_19;
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public declared_synchronized boolean a(int p6, boolean p7)
    {
        int v0 = 1;
        try {
            android.database.sqlite.SQLiteDatabase v1 = this.a(1);
            android.content.ContentValues v2_1 = new android.content.ContentValues();
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_IGNORE.toString(), Boolean.valueOf(p7));
            String v7_2 = new StringBuilder();
            v7_2.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_ID.toString());
            v7_2.append("=?");
            String v7_3 = v7_2.toString();
            String[] v3_3 = new String[1];
            v3_3[0] = String.valueOf(p6);
        } catch (Throwable v6_5) {
            throw v6_5;
        }
        if (v1.update(com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString(), v2_1, v7_3, v3_3) <= 0) {
            v0 = 0;
        }
        return v0;
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public declared_synchronized long a(String p22, String p23, String p24, int p25)
    {
        try {
            android.database.sqlite.SQLiteDatabase v14 = this.a(1);
            android.content.ContentValues v15_1 = new android.content.ContentValues();
            v15_1.clear();
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_IDENTIFIER.toString(), p22);
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.FINGERPRINT.toString(), p23);
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_NAME.toString(), p24);
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_TYPE.toString(), Integer.valueOf(p25));
            java.nio.charset.Charset v5_10 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
            String v6_1 = new byte[1];
            v6_1[0] = 0;
            v15_1.put(v5_10, v6_1);
            try {
                v14.beginTransaction();
                long v19 = v14.insert(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString(), 0, v15_1);
            } catch (com.sophos.smsec.core.datastore.DataStore$Table v0_10) {
                v14.endTransaction();
                throw v0_10;
            } catch (RuntimeException) {
                v14.endTransaction();
                return -1;
            }
            if ((v19 >= 0) && (com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.hasHash())) {
                ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v19).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(p22.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(p23.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(p24.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(p25).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                String v6_6 = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString();
                String[] v9 = new String[1];
                v9[0] = String.valueOf(v19);
                com.sophos.smsec.core.datastore.DataStore$Table v0_18 = v14.query(v6_6, 0, "key=?", v9, 0, 0, 0, 0);
                if (!v0_18.moveToFirst()) {
                    String v2_1 = new StringBuilder();
                    v2_1.append("inserting hash value into DB table ");
                    v2_1.append(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString());
                    v2_1.append(" failed.");
                    com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v2_1.toString());
                    v14.endTransaction();
                    return -1;
                } else {
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(v0_18.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.getColumnIndex(v0_18)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    v0_18.close();
                    v15_1.clear();
                    v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                    com.sophos.smsec.core.datastore.DataStore$Table v0_5 = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString();
                    String v3_11 = new String[1];
                    v3_11[0] = String.valueOf(v19);
                    if (1 != ((long) v14.update(v0_5, v15_1, "key=?", v3_11))) {
                        String v2_9 = new StringBuilder();
                        v2_9.append("inserting hash value into DB table ");
                        v2_9.append(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString());
                        v2_9.append(" failed.");
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v2_9.toString());
                    }
                    ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE);
                }
            }
            v14.setTransactionSuccessful();
            v14.endTransaction();
            return v19;
        } catch (com.sophos.smsec.core.datastore.DataStore$Table v0_11) {
            throw v0_11;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.update()


    static boolean a(com.sophos.smsec.core.datastore.DataStore$Table p26, boolean p27, android.database.sqlite.SQLiteDatabase p28)
    {
        if (p26.hasVerticalHash()) {
            int v3 = (p27 & p26.hasHash());
            ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore.c());
            try {
                android.database.sqlite.SQLiteDatabase v15;
                long v0_1 = com.sophos.smsec.core.datastore.DataStore$TableColumn.ROWID.toString();
                android.content.ContentValues v14_1 = new android.content.ContentValues();
            } catch (long v0_24) {
                throw v0_24;
            }
            if (p28 != 0) {
                v15 = p28;
            } else {
                v15 = com.sophos.smsec.core.datastore.DataStore.a(com.sophos.smsec.core.datastore.DataStore.c()).a(1);
            }
            String v12_1;
            if (v3 == 0) {
                v12_1 = 0;
            } else {
                v12_1 = ark>com.sophos.smsec.core.datastore.bark>.b();
            }
            StringBuilder v11_5 = ark>com.sophos.smsec.core.datastore.bark>.b();
            int v16 = 0;
            if (v11_5 != null) {
                if ((p26 != com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS) && (p26 != com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS)) {
                    int v17 = 1;
                } else {
                    v17 = 0;
                }
                String v18;
                String vtmp11 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
                if (v3 == 0) {
                    v18 = vtmp11;
                } else {
                    v15.beginTransaction();
                    v18 = "*";
                }
                v11_5.reset();
                v11_5.update(p26.toString().getBytes(java.nio.charset.StandardCharsets.UTF_8));
                long v19 = 0;
                long v21 = 0;
                while(true) {
                    int v13_0;
                    long v6_1;
                    String v8_9;
                    long v6_4 = p26.toString();
                    int v7_12 = new String[2];
                    v7_12[0] = v18;
                    v7_12[1] = ark>com.sophos.smsec.core.datastore.bark>.a;
                    String v10_5 = new Object[1];
                    v10_5[0] = Long.valueOf(v21);
                    boolean v25 = v11_5;
                    int v28_1 = v12_1;
                    String v5_30 = v15.query(v6_4, v7_12, 0, 0, 0, 0, v0_1, String.format(java.util.Locale.US, "%d, 1000", v10_5));
                    if (!v5_30.moveToFirst()) {
                        v13_0 = v28_1;
                        v8_9 = v25;
                        v6_1 = 0;
                    } else {
                        long v6_7 = com.sophos.smsec.core.datastore.DataStore$TableColumn.VALUE_BOOLEAN.getColumnIndex(v5_30);
                        while(true) {
                            if (v3 == 0) {
                                v13_0 = v28_1;
                                v8_9 = v25;
                                if (v17 == 0) {
                                    v8_9.update(v5_30.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.getColumnIndex(v5_30)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                                } else {
                                    v8_9.update(v5_30.getBlob(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.getColumnIndex(v5_30)));
                                }
                            } else {
                                v28_1.reset();
                                int v7_5 = 0;
                                while (v7_5 < v5_30.getColumnCount()) {
                                    int v13_1;
                                    if (com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString().equals(v5_30.getColumnName(v7_5))) {
                                        v13_1 = v28_1;
                                    } else {
                                        if (com.sophos.smsec.core.datastore.DataStore$TableColumn.ROWID.toString().equals(v5_30.getColumnName(v7_5))) {
                                            v13_1 = v28_1;
                                        } else {
                                            String v8_17 = v5_30.getString(v7_5);
                                            if (v8_17 == null) {
                                                v13_1 = v28_1;
                                            } else {
                                                if ((p26 == com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES) && (v6_7 == v7_5)) {
                                                    String v8_19;
                                                    if (v5_30.getInt(v7_5) == 0) {
                                                        v8_19 = 0;
                                                    } else {
                                                        v8_19 = 1;
                                                    }
                                                    v8_17 = String.valueOf(v8_19);
                                                }
                                                v13_1 = v28_1;
                                                v13_1.update(v8_17.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                                            }
                                        }
                                    }
                                    v7_5++;
                                    v28_1 = v13_1;
                                }
                                int v7_7;
                                v13_0 = v28_1;
                                v14_1.clear();
                                if (v17 == 0) {
                                    v7_7 = v13_0.digest(ark>com.sophos.smsec.core.datastore.bark>.H());
                                } else {
                                    v7_7 = v13_0.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a());
                                }
                                v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v7_7);
                                String v8_3 = p26.toString();
                                java.nio.charset.Charset v9_2 = new StringBuilder();
                                v9_2.append(v0_1);
                                v9_2.append("=?");
                                java.nio.charset.Charset v9_3 = v9_2.toString();
                                String v10_1 = new String[1];
                                v10_1[0] = String.valueOf(v5_30.getInt(v5_30.getColumnIndex(v0_1)));
                                String v8_5 = ((long) v15.update(v8_3, v14_1, v9_3, v10_1));
                                StringBuilder v11_4 = new StringBuilder();
                                v11_4.append("updated ");
                                v11_4.append(v8_5);
                                v11_4.append(" hash rows in table ");
                                v11_4.append(p26.toString());
                                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v11_4.toString());
                                v8_9 = v25;
                                v8_9.update(v7_7);
                            }
                            if (v5_30.moveToNext()) {
                                break;
                            }
                            v6_1 = ((long) v5_30.getCount());
                        }
                        v25 = v8_9;
                        v28_1 = v13_0;
                    }
                    v21 += 1000;
                    v5_30.close();
                    if (v6_1 != 1000) {
                        break;
                    }
                    v11_5 = v8_9;
                    v12_1 = v13_0;
                }
                v14_1.clear();
                v14_1.put("tablename", p26.toString());
                if (v17 == 0) {
                    v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v8_9.digest(ark>com.sophos.smsec.core.datastore.bark>.H()));
                } else {
                    v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v8_9.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                }
                try {
                    long v0_9 = com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString();
                    String v10_3 = new String[1];
                    v10_3[0] = p26.toString();
                    long v6_2 = ((long) v15.update(v0_9, v14_1, "tablename=?", v10_3));
                } catch (long v0_18) {
                    if (v3 != 0) {
                        v15.endTransaction();
                    }
                    throw v0_18;
                } catch (long v0_17) {
                    com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "inserting into or updating of hash table failed.", v0_17);
                    if (v3 == 0) {
                        if ((1 == v6_2) || (-1 != v19)) {
                            v16 = 1;
                        }
                        return v16;
                    } else {
                        v15.endTransaction();
                    }
                    if (v3 == 0) {
                    } else {
                    }
                }
                if (0 != v6_2) {
                    String v5_12 = new StringBuilder();
                    v5_12.append("updated entry in hash table. Name=");
                    v5_12.append(p26.toString());
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v5_12.toString());
                } else {
                    v19 = v15.insert(com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString(), 0, v14_1);
                    if (-1 == v19) {
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", "inserting into hash table failed.");
                    }
                }
                if (v3 != 0) {
                    v15.setTransactionSuccessful();
                }
            } else {
                return 0;
            }
        } else {
            return 1;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.update()


    static boolean a(com.sophos.smsec.core.datastore.DataStore$Table p26, boolean p27, android.database.sqlite.SQLiteDatabase p28)
    {
        if (p26.hasVerticalHash()) {
            int v3 = (p27 & p26.hasHash());
            ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore.c());
            try {
                android.database.sqlite.SQLiteDatabase v15;
                long v0_1 = com.sophos.smsec.core.datastore.DataStore$TableColumn.ROWID.toString();
                android.content.ContentValues v14_1 = new android.content.ContentValues();
            } catch (long v0_24) {
                throw v0_24;
            }
            if (p28 != 0) {
                v15 = p28;
            } else {
                v15 = com.sophos.smsec.core.datastore.DataStore.a(com.sophos.smsec.core.datastore.DataStore.c()).a(1);
            }
            String v12_1;
            if (v3 == 0) {
                v12_1 = 0;
            } else {
                v12_1 = ark>com.sophos.smsec.core.datastore.bark>.b();
            }
            StringBuilder v11_5 = ark>com.sophos.smsec.core.datastore.bark>.b();
            int v16 = 0;
            if (v11_5 != null) {
                if ((p26 != com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS) && (p26 != com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS)) {
                    int v17 = 1;
                } else {
                    v17 = 0;
                }
                String v18;
                String vtmp11 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
                if (v3 == 0) {
                    v18 = vtmp11;
                } else {
                    v15.beginTransaction();
                    v18 = "*";
                }
                v11_5.reset();
                v11_5.update(p26.toString().getBytes(java.nio.charset.StandardCharsets.UTF_8));
                long v19 = 0;
                long v21 = 0;
                while(true) {
                    String v8_9;
                    long v6_1;
                    int v13_0;
                    long v6_4 = p26.toString();
                    int v7_12 = new String[2];
                    v7_12[0] = v18;
                    v7_12[1] = ark>com.sophos.smsec.core.datastore.bark>.a;
                    String v10_5 = new Object[1];
                    v10_5[0] = Long.valueOf(v21);
                    boolean v25 = v11_5;
                    int v28_1 = v12_1;
                    String v5_30 = v15.query(v6_4, v7_12, 0, 0, 0, 0, v0_1, String.format(java.util.Locale.US, "%d, 1000", v10_5));
                    if (!v5_30.moveToFirst()) {
                        v13_0 = v28_1;
                        v8_9 = v25;
                        v6_1 = 0;
                    } else {
                        long v6_7 = com.sophos.smsec.core.datastore.DataStore$TableColumn.VALUE_BOOLEAN.getColumnIndex(v5_30);
                        while(true) {
                            if (v3 == 0) {
                                v13_0 = v28_1;
                                v8_9 = v25;
                                if (v17 == 0) {
                                    v8_9.update(v5_30.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.getColumnIndex(v5_30)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                                } else {
                                    v8_9.update(v5_30.getBlob(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.getColumnIndex(v5_30)));
                                }
                            } else {
                                v28_1.reset();
                                int v7_5 = 0;
                                while (v7_5 < v5_30.getColumnCount()) {
                                    int v13_1;
                                    if (com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString().equals(v5_30.getColumnName(v7_5))) {
                                        v13_1 = v28_1;
                                    } else {
                                        if (com.sophos.smsec.core.datastore.DataStore$TableColumn.ROWID.toString().equals(v5_30.getColumnName(v7_5))) {
                                            v13_1 = v28_1;
                                        } else {
                                            String v8_17 = v5_30.getString(v7_5);
                                            if (v8_17 == null) {
                                                v13_1 = v28_1;
                                            } else {
                                                if ((p26 == com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES) && (v6_7 == v7_5)) {
                                                    String v8_19;
                                                    if (v5_30.getInt(v7_5) == 0) {
                                                        v8_19 = 0;
                                                    } else {
                                                        v8_19 = 1;
                                                    }
                                                    v8_17 = String.valueOf(v8_19);
                                                }
                                                v13_1 = v28_1;
                                                v13_1.update(v8_17.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                                            }
                                        }
                                    }
                                    v7_5++;
                                    v28_1 = v13_1;
                                }
                                int v7_7;
                                v13_0 = v28_1;
                                v14_1.clear();
                                if (v17 == 0) {
                                    v7_7 = v13_0.digest(ark>com.sophos.smsec.core.datastore.bark>.H());
                                } else {
                                    v7_7 = v13_0.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a());
                                }
                                v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v7_7);
                                String v8_3 = p26.toString();
                                java.nio.charset.Charset v9_2 = new StringBuilder();
                                v9_2.append(v0_1);
                                v9_2.append("=?");
                                java.nio.charset.Charset v9_3 = v9_2.toString();
                                String v10_1 = new String[1];
                                v10_1[0] = String.valueOf(v5_30.getInt(v5_30.getColumnIndex(v0_1)));
                                String v8_5 = ((long) v15.update(v8_3, v14_1, v9_3, v10_1));
                                StringBuilder v11_4 = new StringBuilder();
                                v11_4.append("updated ");
                                v11_4.append(v8_5);
                                v11_4.append(" hash rows in table ");
                                v11_4.append(p26.toString());
                                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v11_4.toString());
                                v8_9 = v25;
                                v8_9.update(v7_7);
                            }
                            if (!v5_30.moveToNext()) {
                                break;
                            }
                            v25 = v8_9;
                            v28_1 = v13_0;
                        }
                        v6_1 = ((long) v5_30.getCount());
                    }
                    v21 += 1000;
                    v5_30.close();
                    if (v6_1 != 1000) {
                        break;
                    }
                    v11_5 = v8_9;
                    v12_1 = v13_0;
                }
                v14_1.clear();
                v14_1.put("tablename", p26.toString());
                if (v17 == 0) {
                    v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v8_9.digest(ark>com.sophos.smsec.core.datastore.bark>.H()));
                } else {
                    v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v8_9.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                }
                try {
                    long v0_9 = com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString();
                    String v10_3 = new String[1];
                    v10_3[0] = p26.toString();
                    long v6_2 = ((long) v15.update(v0_9, v14_1, "tablename=?", v10_3));
                } catch (long v0_18) {
                    if (v3 != 0) {
                        v15.endTransaction();
                    }
                    throw v0_18;
                } catch (long v0_17) {
                    com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "inserting into or updating of hash table failed.", v0_17);
                    if (v3 == 0) {
                        if ((1 == v6_2) || (-1 != v19)) {
                            v16 = 1;
                        }
                        return v16;
                    } else {
                        v15.endTransaction();
                    }
                    if (v3 == 0) {
                    } else {
                    }
                }
                if (0 != v6_2) {
                    String v5_12 = new StringBuilder();
                    v5_12.append("updated entry in hash table. Name=");
                    v5_12.append(p26.toString());
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v5_12.toString());
                } else {
                    v19 = v15.insert(com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString(), 0, v14_1);
                    if (-1 == v19) {
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", "inserting into hash table failed.");
                    }
                }
                if (v3 != 0) {
                    v15.setTransactionSuccessful();
                }
            } else {
                return 0;
            }
        } else {
            return 1;
        }
    }

Method com.sophos.smsec.core.datastore.DbHelper.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.update()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p17, int p18, int p19)
    {
        void v0 = this;
        com.sophos.smsec.core.datastore.SmSecPreferences v5_4 = new StringBuilder();
        v5_4.append("Upgrade Database from ");
        v5_4.append(p18);
        v5_4.append(" to ");
        v5_4.append(p19);
        com.sophos.smsec.core.smsectrace.d.b("SMSec: DataBaseInit", v5_4.toString());
        if ((p18 != 0) && ((p18 < 12) && (!com.sophos.smsec.core.datastore.SmSecPreferences.c(this.c).c()))) {
            this = this.a();
        }
        if (p18 < p19) {
            int v8;
            com.sophos.smsec.core.datastore.SmSecPreferences$Preferences v4_29 = new java.util.ArrayList();
            com.sophos.smsec.core.datastore.SmSecPreferences v5_2 = com.sophos.smsec.core.datastore.SmSecPreferences.c(this.c);
            this.e = com.sophos.smsec.core.datastore.DbHelper$UPDATE_STATE.UPDATE_PENDIG;
            if (p18 != 0) {
                v8 = 0;
            } else {
                v8 = 1;
            }
            v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.DB_UPDATEPENDING_PREF, 1);
            v5_2.f(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_SCANNER_SELFTEST);
            v5_2.f(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_SCANNER_INITIAL);
            String v9_11 = (p18 + 1);
            while (v9_11 <= p19) {
                v4_29.add(com.sophos.smsec.core.datastore.c.a(v9_11));
                v9_11++;
            }
            String v9_15 = new String[0];
            v0 = this.a(p17, ((String[]) v4_29.toArray(v9_15)));
            if ((p18 < 4) && (p19 >= 4)) {
                if (p18 > 0) {
                    if (p18 > 1) {
                        com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES, 1, 1, p17);
                    }
                    String v9_18 = com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES.toString();
                    com.sophos.smsec.core.datastore.DataStore$Table[] v11_18 = new String[1];
                    v11_18[0] = com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_SCANNER_SELFTEST.getKey();
                    p17.delete(v9_18, "name=?", v11_18);
                    String v9_19 = com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.UNSECURED_PREFERENCES;
                    String v10_12 = v9_19.length;
                    com.sophos.smsec.core.datastore.DataStore$Table[] v11_17 = 0;
                    while (v11_17 < v10_12) {
                        String v12_2 = v9_19[v11_17];
                        int v13_11 = com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES.toString();
                        String[] v15_2 = new String[1];
                        v15_2[0] = v12_2.getKey();
                        p17.delete(v13_11, "name=?", v15_2);
                        v11_17++;
                    }
                    com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES, 1, p17);
                    if (p18 > 1) {
                        com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG, 1, 1, p17);
                    }
                }
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE, 1, p17);
                com.sophos.smsec.core.datastore.DbHelper.a(p17);
            }
            if (((p18 > 5) || (p19 < 5)) && (((p18 > 6) || (p19 < 6)) && (((p18 > 7) || (p19 < 7)) && (((p18 > 9) || (p19 < 9)) && ((p18 >= 11) || (p19 < 11)))))) {
                int v13_0 = 0;
            } else {
                v13_0 = 1;
            }
            if ((p18 < 6) && (p19 >= 6)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.CALL_QUARANTINE, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.VIP_NUMBERS, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.BLOCKED_NUMBERS, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE, 1, p17);
            }
            if ((p18 < 9) && (p19 >= 9)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE, 0, p17);
                com.sophos.smsec.core.datastore.b.a(p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE, 1, p17);
            }
            if ((p18 < 13) && (p19 >= 13)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE, 1, p17);
                v13_0 = 1;
            }
            if ((p18 < 14) && (p19 >= 14)) {
                v13_0 = 1;
            }
            if ((p18 < 15) && (p19 >= 15)) {
                if ((v8 == 0) && (!v5_2.e(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED))) {
                    v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED, 0);
                }
                v13_0 = 1;
            }
            if ((p18 < 16) && (p19 >= 16)) {
                v13_0 = 1;
            }
            if ((p18 < 17) && (p19 >= 17)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PDU_QUARANTINE, p17);
                com.sophos.smsec.core.datastore.DataStore$Table[] v11_12 = com.sophos.smsec.core.datastore.DataStore$Table.getAllTablesWithVerticalHashes();
                int v13_1 = v11_12.length;
                String v14_5 = 0;
                while (v14_5 < v13_1) {
                    String[] v15_1 = v11_12[v14_5];
                    if ((v15_1 != com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS) && (v15_1 != com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS)) {
                        com.sophos.smsec.core.datastore.b.a(v15_1, 0, p17);
                    }
                    v14_5++;
                }
                v13_0 = 1;
            }
            if ((p18 < 18) && (p19 >= 18)) {
                v13_0 = 1;
            }
            if ((p18 < 19) && (p19 >= 19)) {
                v13_0 = 1;
            }
            if ((p18 < 20) && (p19 >= 20)) {
                String v9_5 = new android.content.ContentValues();
                com.sophos.smsec.core.datastore.DataStore$Table[] v11_14 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
                int v13_2 = new byte[1];
                v13_2[0] = 0;
                v9_5.put(v11_14, v13_2);
                com.sophos.smsec.core.datastore.DataStore$Table[] v11_16 = new com.sophos.smsec.core.datastore.DataStore$Table[8];
                v11_16[0] = com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS;
                v11_16[1] = com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS;
                v11_16[2] = com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE;
                v11_16[3] = com.sophos.smsec.core.datastore.DataStore$Table.CALL_QUARANTINE;
                v11_16[4] = com.sophos.smsec.core.datastore.DataStore$Table.VIP_NUMBERS;
                v11_16[5] = com.sophos.smsec.core.datastore.DataStore$Table.BLOCKED_NUMBERS;
                v11_16[6] = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE;
                v11_16[7] = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE;
                com.sophos.smsec.core.datastore.SmSecPreferences$Preferences v4_5 = v11_16.length;
                String v10_1 = 0;
                while (v10_1 < v4_5) {
                    String v12_0 = v11_16[v10_1];
                    com.sophos.smsec.core.datastore.b.a(v12_0, p17);
                    int v13_9 = com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString();
                    String[] v15_0 = new String[1];
                    v15_0[0] = v12_0.toString();
                    p17.update(v13_9, v9_5, "tablename=?", v15_0);
                    v10_1++;
                }
                v13_0 = 1;
            }
            if ((p18 < 21) && (p19 >= 21)) {
                v13_0 = 1;
            }
            if ((p18 < 22) && (p19 >= 22)) {
                String v9_7 = new StringBuilder();
                v9_7.append(android.os.Environment.getDataDirectory().getAbsolutePath());
                v9_7.append(java.io.File.separator);
                v9_7.append("data");
                v9_7.append(java.io.File.separator);
                v9_7.append("com.sophos.smsec");
                v9_7.append(java.io.File.separator);
                v9_7.append("app_savi");
                new java.io.File(v9_7.toString()).mkdir();
                this.b(p17).c(p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG, 1, p17);
                v13_0 = 1;
            }
            if ((p18 < 23) && (p19 >= 23)) {
                if ((v8 == 0) && (!v5_2.e(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED))) {
                    v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED, 1);
                }
                v13_0 = 1;
            }
            if ((p18 < 24) && (p19 >= 24)) {
                v13_0 = 1;
            }
            if ((p18 < 25) && (p19 >= 25)) {
                if ((v8 == 0) && (!v5_2.e(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.LT_ENABLE_LOCATE))) {
                    v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.LT_ENABLE_LOCATE, 0);
                }
                v13_0 = 1;
            }
            if ((p18 < 26) && (p19 >= 26)) {
                v13_0 = 1;
            }
            if (v13_0 != 0) {
                v5_2.l();
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES, 1, p17);
            }
            v5_2.f(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.DB_UPDATEPENDING_PREF);
        }
        v0.e = com.sophos.smsec.core.datastore.DbHelper$UPDATE_STATE.UPDATE_DONE;
        com.sophos.smsec.core.datastore.a.a(v0.c);
        com.sophos.smsec.core.smsectrace.d.b("SMSec: DataBaseInit", "Upgrade Database done.");
        return;
    }

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


    protected final long h(String p14, String p15)
    {
        com.google.android.gms.common.internal.r.a(p14);
        com.google.android.gms.common.internal.r.a(p15);
        this.d();
        this.k();
        android.database.sqlite.SQLiteDatabase v0 = this.y();
        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_5 = v4_2.toString();
            Object v5_1 = new String[1];
            v5_1[0] = p14;
            com.google.android.gms.measurement.internal.t v9_0 = this.a(v3_5, v5_1, -1);
        } catch (Object v14_2) {
            v0.endTransaction();
            throw v14_2;
        } catch (Object v3_10) {
            v9_0 = 0;
            this.r().c_().a("Error inserting column. appId", com.google.android.gms.measurement.internal.r.a(p14), p15, v3_10);
            v0.endTransaction();
            return v9_0;
        }
        if (v9_0 == -1) {
            Object v3_8 = new android.content.ContentValues();
            v3_8.put("app_id", p14);
            v3_8.put("first_open_count", Integer.valueOf(0));
            v3_8.put("previous_install_count", Integer.valueOf(0));
            if (v0.insertWithOnConflict("app2", 0, v3_8, 5) != -1) {
                v9_0 = 0;
            } else {
                this.r().c_().a("Failed to insert column (got -1). appId", com.google.android.gms.measurement.internal.r.a(p14), p15);
                v0.endTransaction();
                return -1;
            }
        }
        try {
            Object v3_12 = new android.content.ContentValues();
            v3_12.put("app_id", p14);
            v3_12.put(p15, Long.valueOf((1 + v9_0)));
            String v4_4 = new String[1];
            v4_4[0] = p14;
        } catch (Object v3_10) {
        }
        if (((long) v0.update("app2", v3_12, "app_id = ?", v4_4)) != 0) {
            v0.setTransactionSuccessful();
            v0.endTransaction();
            return v9_0;
        } else {
            this.r().c_().a("Failed to update column (got 0). appId", com.google.android.gms.measurement.internal.r.a(p14), p15);
            v0.endTransaction();
            return -1;
        }
    }

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


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

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


    public final com.google.android.gms.measurement.internal.fe a(long p15, String p17, boolean p18, boolean p19, boolean p20, boolean p21, boolean p22)
    {
        com.google.android.gms.common.internal.r.a(p17);
        this.d();
        this.k();
        com.google.android.gms.measurement.internal.t v1_1 = new String[1];
        v1_1[0] = p17;
        com.google.android.gms.measurement.internal.fe v3_1 = new com.google.android.gms.measurement.internal.fe();
        try {
            android.database.sqlite.SQLiteDatabase v13 = this.y();
            String[] v9 = "daily_public_events_count";
            int v11 = "daily_error_events_count";
            v9 = new String[1];
            v9[0] = p17;
            android.database.Cursor v4 = v13.query("apps", new String[] {"day", "daily_realtime_events_count"}), "app_id=?", v9, 0, 0, 0);
        } catch (android.content.ContentValues v0_8) {
            if (v4 != null) {
                v4.close();
            }
            throw v0_8;
        } catch (android.content.ContentValues v0_7) {
            this.r().c_().a("Error updating daily counts. appId", com.google.android.gms.measurement.internal.r.a(p17), v0_7);
            if (v4 != null) {
                v4.close();
            }
            return v3_1;
        }
        if (v4.moveToFirst()) {
            if (v4.getLong(0) == p15) {
                v3_1.b = v4.getLong(1);
                v3_1.a = v4.getLong(2);
                v3_1.c = v4.getLong(3);
                v3_1.d = v4.getLong(4);
                v3_1.e = v4.getLong(5);
            }
            if (p18) {
                v3_1.b = (v3_1.b + 1);
            }
            if (p19) {
                v3_1.a = (v3_1.a + 1);
            }
            if (p20) {
                v3_1.c = (v3_1.c + 1);
            }
            if (p21) {
                v3_1.d = (v3_1.d + 1);
            }
            if (p22) {
                v3_1.e = (v3_1.e + 1);
            }
            android.content.ContentValues v0_10 = new android.content.ContentValues();
            v0_10.put("day", Long.valueOf(p15));
            v0_10.put("daily_public_events_count", Long.valueOf(v3_1.a));
            v0_10.put("daily_events_count", Long.valueOf(v3_1.b));
            v0_10.put("daily_conversions_count", Long.valueOf(v3_1.c));
            v0_10.put("daily_error_events_count", Long.valueOf(v3_1.d));
            v0_10.put("daily_realtime_events_count", Long.valueOf(v3_1.e));
            v13.update("apps", v0_10, "app_id=?", v1_1);
            if (v4 != null) {
                v4.close();
            }
            return v3_1;
        } else {
            this.r().i().a("Not updating daily counts, app is not known. appId", com.google.android.gms.measurement.internal.r.a(p17));
            if (v4 != null) {
                v4.close();
            }
            return v3_1;
        }
    }

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


    protected final boolean a(String p17, byte[] p18, String p19)
    {
        this.k();
        this.d();
        com.google.android.gms.common.internal.r.a(p17);
        com.google.android.gms.measurement.internal.t v0_3 = this.a(p17, p18);
        if (v0_3 != null) {
            void v1_1 = this.a(p17, v0_3);
            v1_1.g.put(p17, v0_3);
            v1_1.i.put(p17, p19);
            v1_1.d.put(p17, ark>com.google.android.gms.measurement.internal.aqark>.a(v0_3));
            com.google.android.gms.measurement.internal.t v4_3 = this.h();
            String v5_2 = v0_3.e;
            com.google.android.gms.common.internal.r.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.c;
                int v10_1 = v9_2.length;
                int v11_2 = 0;
                while (v11_2 < v10_1) {
                    com.google.android.gms.internal.measurement.cr[] v12_0 = v9_2[v11_2];
                    int v13_1 = com.google.android.gms.measurement.internal.bu.b(v12_0.b);
                    if (v13_1 != 0) {
                        v12_0.b = v13_1;
                    }
                    com.google.android.gms.internal.measurement.cr[] v12_1 = v12_0.c;
                    int v13_2 = v12_1.length;
                    int v14 = 0;
                    while (v14 < v13_2) {
                        com.google.android.gms.internal.measurement.cr v15 = v12_1[v14];
                        int v3_1 = com.google.android.gms.measurement.internal.bv.a(v15.d);
                        if (v3_1 != 0) {
                            v15.d = v3_1;
                        }
                        v14++;
                    }
                    v11_2++;
                }
                int v3_10 = v8_1.b;
                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.internal.bw.a(v10_0.b);
                    if (v11_1 != 0) {
                        v10_0.b = v11_1;
                    }
                    v9_0++;
                }
                v7_0++;
            }
            v4_3.i().a(p17, v5_2);
            try {
                v0_3.e = 0;
                int v3_5 = new byte[v0_3.e()];
                v0_3.a(com.google.android.gms.internal.measurement.ix.a(v3_5, 0, v3_5.length));
            } catch (com.google.android.gms.measurement.internal.t v0_0) {
                this.r().i().a("Unable to serialize reduced-size config. Storing full config instead. appId", com.google.android.gms.measurement.internal.r.a(p17), v0_0);
                v3_5 = p18;
            }
            com.google.android.gms.measurement.internal.t v4_7 = this.i();
            com.google.android.gms.common.internal.r.a(p17);
            v4_7.d();
            v4_7.k();
            com.google.android.gms.measurement.internal.t v0_2 = new android.content.ContentValues();
            v0_2.put("remote_config", v3_5);
            try {
                String v5_6 = v4_7.y();
                String[] v8_0 = new String[1];
                v8_0[0] = p17;
            } catch (com.google.android.gms.measurement.internal.t v0_6) {
                v4_7.r().c_().a("Error storing remote config. appId", com.google.android.gms.measurement.internal.r.a(p17), v0_6);
                return 1;
            }
            if (((long) v5_6.update("apps", v0_2, "app_id = ?", v8_0)) != 0) {
                return 1;
            } else {
                v4_7.r().c_().a("Failed to update remote config (got 0). appId", com.google.android.gms.measurement.internal.r.a(p17));
                return 1;
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.c.d() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void d(android.content.Context p12, String p13)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.c.a(p12);
        if ((v10 != null) && (p13)) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = 0;
                v3_2.b = 0;
                v3_2.c = 0;
                v3_2.d = 0;
                v3_2.e = 0;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = 0;
                v3_2.i = 0;
                v3_2.j = p13;
                com.baidu.android.pushservice.c.c.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(com.baidu.android.pushservice.c.c$e.k.name(), p13);
                String v3_6 = new StringBuilder();
                v3_6.append(com.baidu.android.pushservice.c.c$e.a.name());
                v3_6.append("=1");
                v10.update("PushShareInfo", v12_3, v3_6.toString(), 0);
            }
            if ((v2_1 == 0) || (v2_1.isClosed())) {
                v10.close();
                return;
            } else {
                v2_1.close();
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.c() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void c(android.content.Context p12, String p13)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.c.a(p12);
        if ((v10 != null) && (p13)) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = 0;
                v3_2.b = 0;
                v3_2.c = 0;
                v3_2.d = 0;
                v3_2.e = 0;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = 0;
                v3_2.i = p13;
                v3_2.j = 0;
                com.baidu.android.pushservice.c.c.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(com.baidu.android.pushservice.c.c$e.j.name(), p13);
                String v3_6 = new StringBuilder();
                v3_6.append(com.baidu.android.pushservice.c.c$e.a.name());
                v3_6.append("=1");
                v10.update("PushShareInfo", v12_3, v3_6.toString(), 0);
            }
            if ((v2_1 == 0) || (v2_1.isClosed())) {
                v10.close();
                return;
            } else {
                v2_1.close();
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.b() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void b(android.content.Context p12, String p13)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.c.a(p12);
        if ((v10 != null) && (p13)) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = 0;
                v3_2.b = 0;
                v3_2.c = 0;
                v3_2.d = 0;
                v3_2.e = 0;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = p13;
                v3_2.i = 0;
                v3_2.j = 0;
                com.baidu.android.pushservice.c.c.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(com.baidu.android.pushservice.c.c$e.i.name(), p13);
                String v3_6 = new StringBuilder();
                v3_6.append(com.baidu.android.pushservice.c.c$e.a.name());
                v3_6.append("=1");
                v10.update("PushShareInfo", v12_3, v3_6.toString(), 0);
            }
            if ((v2_1 != 0) && (!v2_1.isClosed())) {
                v2_1.close();
            }
            if (v10 == null) {
                return;
            } else {
                v10.close();
                return;
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.b() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void b(android.content.Context p12, long p13)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.c.a(p12);
        if (v10 != null) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = 0;
                v3_2.b = p13;
                v3_2.c = 0;
                v3_2.d = 0;
                v3_2.e = 0;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = 0;
                v3_2.i = 0;
                v3_2.j = 0;
                com.baidu.android.pushservice.c.c.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(com.baidu.android.pushservice.c.c$e.c.name(), Long.valueOf(p13));
                String v14_1 = new StringBuilder();
                v14_1.append(com.baidu.android.pushservice.c.c$e.a.name());
                v14_1.append("=1");
                v10.update("PushShareInfo", v12_3, v14_1.toString(), 0);
            }
            if ((v2_1 == 0) || (v2_1.isClosed())) {
                v10.close();
                return;
            } else {
                v2_1.close();
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void a(android.content.Context p12, String p13, String p14)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = ark>com.baidu.android.pushservice.c.cark>.a(p12);
        if (v10 != null) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = 0;
                v3_2.b = 0;
                v3_2.c = p13;
                v3_2.d = p14;
                v3_2.e = 0;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = 0;
                v3_2.i = 0;
                v3_2.j = 0;
                ark>com.baidu.android.pushservice.c.cark>.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(ark>com.baidu.android.pushservice.c.cark>$e.d.name(), p13);
                if (!android.text.TextUtils.isEmpty(p14)) {
                    v12_3.put(ark>com.baidu.android.pushservice.c.cark>$e.e.name(), p14);
                }
                String v14_2 = new StringBuilder();
                v14_2.append(ark>com.baidu.android.pushservice.c.cark>$e.a.name());
                v14_2.append("=1");
                v10.update("PushShareInfo", v12_3, v14_2.toString(), 0);
            }
            if ((v2_1 == 0) || (v2_1.isClosed())) {
                v10.close();
                return;
            } else {
                v2_1.close();
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void a(android.content.Context p12, String p13)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = ark>com.baidu.android.pushservice.c.cark>.a(p12);
        if (v10 != null) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = 0;
                v3_2.b = 0;
                v3_2.c = 0;
                v3_2.d = 0;
                v3_2.e = p13;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = 0;
                v3_2.i = 0;
                v3_2.j = 0;
                ark>com.baidu.android.pushservice.c.cark>.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(ark>com.baidu.android.pushservice.c.cark>$e.f.name(), p13);
                String v3_6 = new StringBuilder();
                v3_6.append(ark>com.baidu.android.pushservice.c.cark>$e.a.name());
                v3_6.append("=1");
                v10.update("PushShareInfo", v12_3, v3_6.toString(), 0);
            }
            if ((v2_1 != 0) && (!v2_1.isClosed())) {
                v2_1.close();
            }
            if (v10 == null) {
                return;
            } else {
                v10.close();
                return;
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized void a(android.content.Context p12, long p13)
    {
        try {
        } catch (boolean v12_7) {
            throw v12_7;
        }
        android.database.sqlite.SQLiteDatabase v10 = ark>com.baidu.android.pushservice.c.cark>.a(p12);
        if (v10 != null) {
            int v2_1 = v10.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v2_1 == 0) || (v2_1.getCount() == 0)) {
                String v3_2 = new com.baidu.android.pushservice.c.b();
                v3_2.a = p13;
                v3_2.b = 0;
                v3_2.c = 0;
                v3_2.d = 0;
                v3_2.e = 0;
                v3_2.g = 0;
                v3_2.f = 0;
                v3_2.h = 0;
                v3_2.i = 0;
                v3_2.j = 0;
                ark>com.baidu.android.pushservice.c.cark>.a(p12, v3_2);
            } else {
                boolean v12_3 = new android.content.ContentValues();
                v12_3.put(ark>com.baidu.android.pushservice.c.cark>$e.b.name(), Long.valueOf(p13));
                String v14_1 = new StringBuilder();
                v14_1.append(ark>com.baidu.android.pushservice.c.cark>$e.a.name());
                v14_1.append("=1");
                v10.update("PushShareInfo", v12_3, v14_1.toString(), 0);
            }
            if ((v2_1 == 0) || (v2_1.isClosed())) {
                v10.close();
                return;
            } else {
                v2_1.close();
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public static declared_synchronized long a(android.content.Context p17, com.baidu.android.pushservice.c.b p18)
    {
        try {
        } catch (boolean v0_5) {
            throw v0_5;
        }
        android.database.sqlite.SQLiteDatabase v12 = ark>com.baidu.android.pushservice.c.cark>.a(p17);
        if (v12 != null) {
            android.content.ContentValues v15_1 = new android.content.ContentValues();
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.b.name(), Long.valueOf(p18.a));
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.c.name(), Long.valueOf(p18.b));
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.d.name(), p18.c);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.e.name(), p18.d);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.f.name(), p18.e);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.h.name(), p18.g);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.g.name(), p18.f);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.i.name(), p18.h);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.j.name(), p18.i);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.k.name(), p18.j);
            long v13_0;
            long v11_1 = 0;
            StringBuilder v4_2;
            v11_1 = v12.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v11_1 == 0) || (v11_1.getCount() == 0)) {
                v13_0 = v12.insert("PushShareInfo", 0, v15_1);
                v4_2 = "pushadvertiseinfo:  insert into database";
            } else {
                String v5_16 = new StringBuilder();
                v5_16.append(ark>com.baidu.android.pushservice.c.cark>$e.a.name());
                v5_16.append("=1");
                v13_0 = ((long) v12.update("PushShareInfo", v15_1, v5_16.toString(), 0));
                v4_2 = "pushadvertiseinfo:  update into database";
            }
            com.baidu.android.pushservice.i.l.b(v4_2, p17);
            StringBuilder v4_5 = new StringBuilder();
            v4_5.append("updatePushInfo pushinfo:  insert into database,  clientinfo = ");
            v4_5.append(p18.a().toString());
            com.baidu.android.pushservice.i.l.b(v4_5.toString(), p17);
            if ((v11_1 == 0) || (v11_1.isClosed())) {
                v12.close();
                return v13_0;
            } else {
                v11_1.close();
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.e() calling method android.database.sqlite.SQLiteDatabase.update()


    public static boolean e(android.content.Context p16, String p17)
    {
        try {
            android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.a.e(p16);
        } catch (boolean v0_2) {
            throw v0_2;
        }
        if (v10 != null) {
            android.database.Cursor v12 = 0;
            try {
                android.content.ContentValues v14_1 = new android.content.ContentValues();
                v14_1.clear();
                v14_1.put(com.baidu.android.pushservice.c.a$h.b.name(), p17);
                v14_1.put(com.baidu.android.pushservice.c.a$h.c.name(), Long.valueOf(System.currentTimeMillis()));
                boolean v2_5 = new StringBuilder();
                v2_5.append(com.baidu.android.pushservice.c.a$h.b.name());
                v2_5.append(" =? ");
                String v15 = v2_5.toString();
                String[] v4_1 = new String[1];
                v4_1[0] = com.baidu.android.pushservice.c.a$h.b.name();
                String[] v6 = new String[1];
                v6[0] = p17;
                boolean v2_9 = v10.query("MsgArriveApp", v4_1, v15, v6, 0, 0, 0);
                try {
                    if ((!v2_9) || (v2_9.getCount() <= 0)) {
                        v2_9 = v10.rawQuery("SELECT COUNT(*) FROM MsgArriveApp;", 0);
                        v2_9.moveToFirst();
                        if (v2_9.getInt(0) > com.baidu.android.pushservice.c.a.c) {
                            v10.delete("MsgArriveApp", 0, 0);
                        }
                        v10.insert("MsgArriveApp", 0, v14_1);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 1;
                    } else {
                        String[] v4_0 = new String[1];
                        v4_0[0] = p17;
                        v10.update("MsgArriveApp", v14_1, v15, v4_0);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 0;
                    }
                } catch (boolean v0_7) {
                    v12 = v2_9;
                    if (v12 != null) {
                        if (!v12.isClosed()) {
                            v12.close();
                        }
                    }
                    v10.close();
                    throw v0_7;
                } catch (Exception) {
                    v12 = v2_9;
                    if (!com.baidu.android.pushservice.a.d(p16)) {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 1;
                    } else {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 0;
                    }
                }
            } catch (boolean v0_7) {
            }
        } else {
            return 1;
        }
    }

Method com.baidu.android.pushservice.c.a.b() calling method android.database.sqlite.SQLiteDatabase.update()


    private static int b(android.database.sqlite.SQLiteDatabase p5, com.baidu.android.pushservice.g.h p6)
    {
        if (p5 != 0) {
            android.content.ContentValues v0_1 = new android.content.ContentValues();
            v0_1.put(com.baidu.android.pushservice.c.a$c.b.name(), p6.d);
            v0_1.put(com.baidu.android.pushservice.c.a$c.c.name(), Long.valueOf(p6.e));
            v0_1.put(com.baidu.android.pushservice.c.a$c.d.name(), p6.f);
            v0_1.put(com.baidu.android.pushservice.c.a$c.j.name(), Integer.valueOf((p6.a + 1)));
            v0_1.put(com.baidu.android.pushservice.c.a$c.k.name(), Integer.valueOf(p6.g));
            v0_1.put(com.baidu.android.pushservice.c.a$c.l.name(), p6.h);
            try {
                int v3_1 = new StringBuilder();
                v3_1.append(com.baidu.android.pushservice.c.a$c.b.name());
                v3_1.append(" = ");
                v3_1.append("\'");
                v3_1.append(p6.d);
                v3_1.append("\' AND ");
                v3_1.append(com.baidu.android.pushservice.c.a$c.k.name());
                v3_1.append(" = ");
                v3_1.append(p6.g);
                v3_1.append(";");
                p5.update("PushBehavior", v0_1, v3_1.toString(), 0);
            } catch (Exception) {
            }
            return -1;
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public static long a(android.content.Context p16, String p17, int p18, int p19, int p20, int p21)
    {
        long v2 = -1;
        try {
            android.database.sqlite.SQLiteDatabase v12 = ark>com.baidu.android.pushservice.c.aark>.e(p16);
        } catch (int v0_3) {
            throw v0_3;
        }
        if (v12 != null) {
            String v6_13 = new String[1];
            v6_13[0] = ark>com.baidu.android.pushservice.c.aark>$i.a.name();
            int v4_3 = new StringBuilder();
            v4_3.append(ark>com.baidu.android.pushservice.c.aark>$i.a.name());
            v4_3.append("= ?");
            String[] v7_4 = v4_3.toString();
            String[] v8_0 = new String[1];
            v8_0[0] = p17;
            int v4_5 = v12.query("NoDisturb", v6_13, v7_4, v8_0, 0, 0, 0);
            String v5_1 = new android.content.ContentValues();
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.a.name(), p17);
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.b.name(), Integer.valueOf(p18));
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.c.name(), Integer.valueOf(p19));
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.d.name(), Integer.valueOf(p20));
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.e.name(), Integer.valueOf(p21));
            if ((v4_5 == 0) || (!v4_5.moveToNext())) {
                v2 = v12.insert("NoDisturb", 0, v5_1);
            } else {
                if ((p18 != 0) || ((p19 != 0) || ((p20 != 0) || (p21 != 0)))) {
                    String[] v7_10 = new StringBuilder();
                    v7_10.append(ark>com.baidu.android.pushservice.c.aark>$i.a.name());
                    v7_10.append("= ?");
                    String[] v7_11 = v7_10.toString();
                    String[] v8_4 = new String[1];
                    v8_4[0] = p17;
                    int v0_1 = v12.update("NoDisturb", v5_1, v7_11, v8_4);
                } else {
                    String v6_15 = new StringBuilder();
                    v6_15.append(ark>com.baidu.android.pushservice.c.aark>$i.a.name());
                    v6_15.append("= ?");
                    String v6_0 = v6_15.toString();
                    String[] v7_0 = new String[1];
                    v7_0[0] = p17;
                    v0_1 = v12.delete("NoDisturb", v6_0, v7_0);
                }
                v2 = ((long) v0_1);
            }
            if (v4_5 != 0) {
                v4_5.close();
            }
            if (v4_5 == 0) {
                v12.close();
                return v2;
            } else {
                v4_5.close();
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.update()


    private static int a(android.database.sqlite.SQLiteDatabase p5, com.baidu.android.pushservice.g.i p6)
    {
        if (p5 != null) {
            String[] v1_1 = new String[1];
            v1_1[0] = p6.b();
            android.content.ContentValues v0_2 = new android.content.ContentValues();
            v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.d.name(), p6.b());
            if (!android.text.TextUtils.isEmpty(p6.a())) {
                v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.b.name(), p6.a());
            }
            v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.c.name(), Integer.valueOf(p6.h()));
            v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.e.name(), p6.c());
            if (!android.text.TextUtils.isEmpty(p6.d())) {
                v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.f.name(), p6.d());
            }
            v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.g.name(), Integer.valueOf(p6.e()));
            v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.h.name(), p6.f());
            v0_2.put(ark>com.baidu.android.pushservice.c.aark>$b.i.name(), Integer.valueOf(p6.g()));
            try {
                String v3_10 = new StringBuilder();
                v3_10.append(ark>com.baidu.android.pushservice.c.aark>$b.d.name());
                v3_10.append(" =?");
            } catch (Exception) {
            }
            return p5.update("AppInfo", v0_2, v3_10.toString(), v1_1);
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public static int a(android.content.Context p5, String p6, ark>com.baidu.android.pushservice.c.aark>$g p7)
    {
        try {
            Throwable v5_1 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (Throwable v5_2) {
            throw v5_2;
        }
        if (v5_1 != null) {
            String[] v2_1 = new String[1];
            v2_1[0] = p6;
            android.content.ContentValues v6_2 = new android.content.ContentValues();
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.a.name(), p7.a);
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.b.name(), p7.b);
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.c.name(), p7.c);
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.d.name(), p7.d);
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.e.name(), p7.e);
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.f.name(), p7.f);
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.g.name(), Integer.valueOf(p7.g));
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.h.name(), Integer.valueOf(p7.h));
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.i.name(), Integer.valueOf(p7.i));
            v6_2.put(ark>com.baidu.android.pushservice.c.aark>$f.j.name(), Long.valueOf(System.currentTimeMillis()));
            String v3_12 = new StringBuilder();
            v3_12.append(ark>com.baidu.android.pushservice.c.aark>$f.b.name());
            v3_12.append("=?");
            int v7_5 = v5_1.update("FileDownloadingInfo", v6_2, v3_12.toString(), v2_1);
            v5_1.close();
            return v7_5;
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.PushInfoProvider.update() calling method android.database.sqlite.SQLiteDatabase.update()


    public int update(android.net.Uri p12, android.content.ContentValues p13, String p14, String[] p15)
    {
        com.baidu.android.pushservice.c.c.a();
        android.database.Cursor v0 = 0;
        long v1 = -1;
        try {
            int v12_1;
            if (this.b.match(p12) == 1) {
                v12_1 = com.baidu.android.pushservice.c.c.a(this.a);
                if (v12_1 == 0) {
                    if (v0 != null) {
                        v0.close();
                    }
                    if (v12_1 != 0) {
                        v12_1.close();
                    }
                } else {
                    try {
                        long v13_2;
                        android.database.Cursor v3_1 = v12_1.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
                        try {
                            if ((v3_1 == null) || (v3_1.getCount() == 0)) {
                                v13_2 = v12_1.insert("PushShareInfo", 0, p13);
                            } else {
                                v13_2 = ((long) v12_1.update("PushShareInfo", p13, p14, 0));
                            }
                        } catch (long v13_4) {
                            v0 = v3_1;
                            if (v0 != null) {
                                v0.close();
                            }
                            if (v12_1 != 0) {
                                v12_1.close();
                            }
                            throw v13_4;
                        } catch (long v13_1) {
                            v0 = v3_1;
                            com.baidu.android.pushservice.g.o.a(this.a, v13_1);
                            if (v0 != null) {
                                v0.close();
                            }
                            if (v12_1 != 0) {
                            }
                        }
                        v1 = v13_2;
                        v0 = v3_1;
                    } catch (long v13_1) {
                    }
                }
            } else {
                v12_1 = 0;
            }
        } catch (long v13_4) {
            v12_1 = 0;
        } catch (long v13_1) {
            v12_1 = 0;
        }
        return ((int) v1);
    }

Method android.arch.persistence.a.a.a.a() calling method android.database.sqlite.SQLiteDatabase.rawQueryWithFactory()


    public android.database.Cursor a(android.arch.persistence.a.e p5)
    {
        return this.c.rawQueryWithFactory(new ark>android.arch.persistence.a.a.aark>$1(this, p5), p5.a(), ark>android.arch.persistence.a.a.aark>.b, 0);
    }

Method com.sophos.smsec.core.datastore.b.z() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public declared_synchronized android.database.Cursor z()
    {
        try {
            return this.a(0).rawQuery("select * from allow_list_view ", 0);
        } catch (Throwable v0_3) {
            throw v0_3;
        }
    }

Method com.sophos.smsec.core.datastore.b.y() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public declared_synchronized int y()
    {
        int v1 = 0;
        try {
            Throwable v3 = 0;
            Throwable v0_4 = this.a(1).rawQuery("select count() from quarantine_allowlist", 0);
            try {
                if (v0_4.moveToFirst()) {
                    v1 = v0_4.getInt(0);
                }
            } catch (Throwable v2_1) {
                if (v0_4 != null) {
                    if (v3 == null) {
                        v0_4.close();
                    } else {
                        try {
                            v0_4.close();
                        } catch (Throwable v0_1) {
                            v3.addSuppressed(v0_1);
                        }
                    }
                }
                throw v2_1;
            } catch (Throwable v2_0) {
                v3 = v2_0;
                throw v3;
            }
            if (v0_4 != null) {
                v0_4.close();
            }
            return v1;
        } catch (Throwable v0_2) {
            throw v0_2;
        } catch (Exception) {
            return v1;
        }
    }

Method com.sophos.smsec.core.datastore.b.d() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public declared_synchronized boolean d(String p5)
    {
        try {
            Throwable v1_1 = this.a(0);
            String[] v3_1 = new String[1];
            v3_1[0] = p5;
            Throwable v5_4 = v1_1.rawQuery("SELECT 1 FROM quarantine_allowlist WHERE packagename= ? LIMIT 1", v3_1);
            try {
                Throwable v1_0 = v5_4.moveToFirst();
            } catch (Throwable v2_0) {
                if (v5_4 != null) {
                    if (v1_0 == null) {
                        v5_4.close();
                    } else {
                        try {
                            v5_4.close();
                        } catch (Throwable v5_1) {
                            v1_0.addSuppressed(v5_1);
                        }
                    }
                }
                throw v2_0;
            } catch (Throwable v1_0) {
                throw v1_0;
            }
            if (v5_4 != null) {
                v5_4.close();
            }
            return v1_0;
        } catch (Throwable v5_3) {
            throw v5_3;
        } catch (Throwable v5_2) {
            com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "lookup in DB table quarantine_allowlist failed.", v5_2);
            return 0;
        }
    }

Method com.sophos.smsec.core.datastore.b.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public declared_synchronized android.database.Cursor b(String p5, String[] p6)
    {
        try {
            String v0_1 = this.a(0);
            try {
                android.database.Cursor v5_1;
                String v1_5 = new StringBuilder();
                v1_5.append("SELECT key as _id, identifier, fingerprint, threat_name, threatId, threatType, timestamp from ");
                v1_5.append(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString());
            } catch (android.database.Cursor v5_2) {
                String v0_3 = new StringBuilder();
                v0_3.append("lookup in DB table ");
                v0_3.append(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString());
                v0_3.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v0_3.toString(), v5_2);
                return 0;
            }
            if (p5 != null) {
                StringBuilder v2_1 = new StringBuilder();
                v2_1.append(" WHERE ");
                v2_1.append(p5);
                v5_1 = v2_1.toString();
            } else {
                v5_1 = "";
            }
            v1_5.append(v5_1);
            return v0_1.rawQuery(v1_5.toString(), p6);
        } catch (android.database.Cursor v5_4) {
            throw v5_4;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public declared_synchronized java.util.Map a(String[] p10)
    {
        try {
            if (p10 != null) {
                if (p10.length != 0) {
                    java.util.Hashtable v1_3 = this.a(0);
                    Integer v2_15 = new StringBuilder(240);
                    v2_15.append("SELECT SUM(score) AS score, cost_permission, privacy_permission, internet_permission FROM pa_permission_score AS ps JOIN pa_permission p ON ps.permission_key = p.key WHERE (");
                    int v3_0 = p10.length;
                    int v4 = 0;
                    while (v4 < v3_0) {
                        Object[] v8_1 = new Object[1];
                        v8_1[0] = p10[v4];
                        v2_15.append(String.format(java.util.Locale.US, " p.name = \'%s\' OR ", v8_1));
                        v4++;
                    }
                    v2_15.delete((v2_15.length() - 3), v2_15.length());
                    v2_15.append(") GROUP BY cost_permission, privacy_permission, internet_permission");
                    android.database.Cursor v10_5 = v1_3.rawQuery(v2_15.toString(), 0);
                    java.util.Hashtable v1_2 = new java.util.Hashtable(3);
                    if (v10_5.moveToFirst()) {
                        do {
                            boolean v0_4 = new StringBuilder();
                            v0_4.append(v10_5.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.COST_PERMISSION.getColumnIndex(v10_5)));
                            v0_4.append(v10_5.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.PRIVACY_PERMISSION.getColumnIndex(v10_5)));
                            v0_4.append(v10_5.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.INTERNET_PERMISSION.getColumnIndex(v10_5)));
                            v1_2.put(v0_4.toString(), Integer.valueOf(v10_5.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.SCORE.getColumnIndex(v10_5))));
                        } while(v10_5.moveToNext());
                    }
                    v10_5.close();
                    return v1_2;
                } else {
                }
            }
        } catch (android.database.Cursor v10_8) {
            throw v10_8;
        }
        return new java.util.Hashtable(0);
    }

Method com.sophos.smsec.core.datastore.b.B() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public boolean B()
    {
        int v0_0 = 0;
        Throwable v3 = 0;
        Throwable v1_2 = this.a(0).rawQuery("select exists (select 1 from rescan_list)", 0);
        try {
            if (!v1_2.moveToFirst()) {
                if (v1_2 != null) {
                    v1_2.close();
                }
                return 1;
            } else {
                if (v1_2.getInt(0) == 0) {
                    v0_0 = 1;
                }
                if (v1_2 != null) {
                    v1_2.close();
                }
                return v0_0;
            }
        } catch (int v0_2) {
            if (v1_2 != null) {
                if (v3 == null) {
                    v1_2.close();
                } else {
                    try {
                        v1_2.close();
                    } catch (Throwable v1_0) {
                        v3.addSuppressed(v1_0);
                    }
                }
            }
            throw v0_2;
        } catch (int v0_1) {
            v3 = v0_1;
            throw v3;
        }
    }

Method com.sophos.smsec.core.datastore.b.A() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public java.util.List A()
    {
        try {
            Throwable v3 = 0;
            Throwable v1_2 = this.a(0).rawQuery("select * from rescan_list", 0);
            try {
                java.util.ArrayList v2_0 = new java.util.ArrayList(v1_2.getCount());
            } catch (Throwable v0_2) {
                if (v1_2 != null) {
                    if (v3 == null) {
                        v1_2.close();
                    } else {
                        try {
                            v1_2.close();
                        } catch (Throwable v1_1) {
                            v3.addSuppressed(v1_1);
                        }
                    }
                }
                throw v0_2;
            } catch (Throwable v0_1) {
                v3 = v0_1;
                throw v3;
            }
            while (v1_2.moveToNext()) {
                v2_0.add(v1_2.getString(0));
            }
            if (v1_2 == null) {
                return v2_0;
            } else {
                v1_2.close();
                return v2_0;
            }
        } catch (Exception) {
            v2_0 = new java.util.ArrayList();
            return v2_0;
        }
    }

Method com.sophos.smsec.core.statistics.a.j.<init>() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public j(android.database.sqlite.SQLiteDatabase p5, java.util.Date p6, java.util.Date p7)
    {
        this.a = new java.util.ArrayList();
        Throwable v7_2 = 0;
        Throwable v5_1 = p5.rawQuery("SELECT type, count (*) AS sum FROM webfiltering WHERE type != 0 AND date(timestamp) between date(\'?start\') and date(\'?end\') GROUP BY type".replace("?start", new java.text.SimpleDateFormat("yyyy-MM-dd").format(p6)).replace("?end", new java.text.SimpleDateFormat("yyyy-MM-dd").format(p7)), 0);
        try {
            while (v5_1.moveToNext()) {
                try {
                    this.a.add(new com.sophos.smsec.core.statistics.a.i(v5_1.getInt(v5_1.getColumnIndex("type")), v5_1.getInt(v5_1.getColumnIndex("sum"))));
                } catch (Exception v6_6) {
                    com.sophos.smsec.core.smsectrace.d.c("Error when loading WebPageTypeDistribution data.", v6_6);
                }
            }
        } catch (Exception v6_8) {
            if (v5_1 != null) {
                if (v7_2 == null) {
                    v5_1.close();
                } else {
                    try {
                        v5_1.close();
                    } catch (Throwable v5_2) {
                        v7_2.addSuppressed(v5_2);
                    }
                }
            }
            throw v6_8;
        } catch (Exception v6_7) {
            v7_2 = v6_7;
            throw v7_2;
        }
        if (v5_1 != null) {
            v5_1.close();
        }
        return;
    }

Method com.sophos.smsec.core.statistics.a.g.<init>() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public g(android.database.sqlite.SQLiteDatabase p5, java.util.Date p6, java.util.Date p7, boolean p8)
    {
        this.c = new java.util.ArrayList();
        this.a = p6;
        this.b = p7;
        Throwable v7_2 = 0;
        Throwable v5_1 = p5.rawQuery("select ds.date as date, IFNULL (a.block,0) as block, IFNULL (b.warn,0) as warn, IFNULL (c.malicious,0) as malicious, IFNULL (d.blacklisted,0) as blacklisted FROM (select date(timestamp) as date from webfiltering where date(timestamp) between date(\'?start\') and date(\'?end\') GROUP BY timestamp) ds LEFT OUTER JOIN (select date(timestamp) as date, COUNT(*) as block from webfiltering where (alert = 1 AND malicious = 0 AND blacklisted = 0 ) GROUP BY timestamp ) a ON ds.date = a.date LEFT OUTER JOIN (select date(timestamp) as date, COUNT(*) as warn from webfiltering where (alert = 0 AND malicious = 0 AND blacklisted = 0 ) GROUP BY timestamp ) b ON ds.date = b.date LEFT OUTER JOIN (select date(timestamp) as date, COUNT(*) as malicious from webfiltering where (malicious = 1) GROUP BY timestamp ) c ON ds.date = C.date LEFT OUTER JOIN (select date(timestamp) as date, COUNT(*) as blacklisted from webfiltering where (blacklisted = 1) GROUP BY timestamp ) d ON ds.date = d.date ORDER BY ds.date asc".replace("?start", new java.text.SimpleDateFormat("yyyy-MM-dd").format(p6)).replace("?end", new java.text.SimpleDateFormat("yyyy-MM-dd").format(p7)), 0);
        try {
            while (v5_1.moveToNext()) {
                try {
                    java.text.ParseException v6_5 = com.sophos.smsec.core.statistics.a.h.a(v5_1);
                } catch (java.text.ParseException v6_6) {
                    com.sophos.smsec.core.smsectrace.d.c("Error when loading WebFilteringDayEntry data.", v6_6);
                }
                if (v6_5 != null) {
                    this.c.add(v6_5);
                }
            }
        } catch (java.text.ParseException v6_8) {
            if (v5_1 != null) {
                if (v7_2 == null) {
                    v5_1.close();
                } else {
                    try {
                        v5_1.close();
                    } catch (Throwable v5_2) {
                        v7_2.addSuppressed(v5_2);
                    }
                }
            }
            throw v6_8;
        } catch (java.text.ParseException v6_7) {
            v7_2 = v6_7;
            throw v7_2;
        }
        if (p8) {
            this.d();
        }
        this.c();
        if (v5_1 != null) {
            v5_1.close();
        }
        return;
    }

Method com.sophos.smsec.core.statistics.a.f.<init>() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public f(android.database.sqlite.SQLiteDatabase p11, int p12)
    {
        this.a = new android.util.ArrayMap();
        Throwable v0_3 = 0;
        while (v0_3 < p12) {
            android.util.ArrayMap v7 = this.a;
            Integer v8 = Integer.valueOf(v0_3);
            com.sophos.smsec.core.statistics.a.e v9 = new com.sophos.smsec.core.statistics.a.e;
            v9(v0_3, 0, 0, 0, 0);
            v7.put(v8, v9);
            v0_3++;
        }
        Throwable v0_1 = 0;
        Throwable v11_1 = p11.rawQuery("SELECT ROUND((strftime(\'%s\',\'now\') - strftime(\'%s\', timestamp)) / (60 * 60 * 24 * 7.0) - 0.5) AS weeksAgo, SUM (clean) AS clean, SUM (lowRep) AS lowRep, SUM (pua) AS pua, SUM (malicious) AS malicious FROM scanResult WHERE weeksAgo < ? AND weeksAgo >= 0 GROUP BY weeksAgo ORDER BY weeksAgo".replace("?", String.valueOf(p12)), 0);
        try {
            while (v11_1.moveToNext()) {
                com.sophos.smsec.core.statistics.a.e v12_6 = new com.sophos.smsec.core.statistics.a.e(v11_1);
                this.a.put(Integer.valueOf(v12_6.a()), v12_6);
            }
        } catch (com.sophos.smsec.core.statistics.a.e v12_4) {
            if (v11_1 != null) {
                if (v0_1 == null) {
                    v11_1.close();
                } else {
                    try {
                        v11_1.close();
                    } catch (Throwable v11_2) {
                        v0_1.addSuppressed(v11_2);
                    }
                }
            }
            throw v12_4;
        } catch (com.sophos.smsec.core.statistics.a.e v12_3) {
            v0_1 = v12_3;
            throw v0_1;
        }
        if (v11_1 != null) {
            v11_1.close();
        }
        return;
    }

Method com.sophos.smsec.core.statistics.a.d.<init>() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public d(android.database.sqlite.SQLiteDatabase p6, int p7)
    {
        this.a = new android.util.ArrayMap();
        android.util.ArrayMap v1_1 = 0;
        while (v1_1 < p7) {
            this.a.put(Integer.valueOf(v1_1), new com.sophos.smsec.core.statistics.a.c(v1_1, 0, 0));
            v1_1++;
        }
        Throwable v0_1 = 0;
        Throwable v6_1 = p6.rawQuery("SELECT ROUND((strftime(\'%s\',\'now\') - strftime(\'%s\', timestamp)) / (60 * 60 * 24 * 7.0) - 0.5) AS weeksAgo, SUM (CASE WHEN scanType==1 THEN 1 ELSE 0 END) AS fullDevice, SUM (CASE WHEN scanType==2 THEN 1 ELSE 0 END) AS onInstall FROM scanCounter WHERE weeksAgo < ? AND weeksAgo >= 0 GROUP BY weeksAgo ORDER BY weeksAgo".replace("?", String.valueOf(p7)), 0);
        try {
            while (v6_1.moveToNext()) {
                com.sophos.smsec.core.statistics.a.c v7_7 = new com.sophos.smsec.core.statistics.a.c(v6_1);
                this.a.put(Integer.valueOf(v7_7.a()), v7_7);
            }
        } catch (com.sophos.smsec.core.statistics.a.c v7_5) {
            if (v6_1 != null) {
                if (v0_1 == null) {
                    v6_1.close();
                } else {
                    try {
                        v6_1.close();
                    } catch (Throwable v6_2) {
                        v0_1.addSuppressed(v6_2);
                    }
                }
            }
            throw v7_5;
        } catch (com.sophos.smsec.core.statistics.a.c v7_4) {
            v0_1 = v7_4;
            throw v0_1;
        }
        if (v6_1 != null) {
            v6_1.close();
        }
        return;
    }

Method com.sophos.smsec.core.statistics.a.b.<init>() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public b(android.database.sqlite.SQLiteDatabase p6, int p7)
    {
        this.a = new android.util.ArrayMap();
        android.util.ArrayMap v1_1 = 0;
        while (v1_1 < p7) {
            this.a.put(Integer.valueOf(v1_1), new com.sophos.smsec.core.statistics.a.a(v1_1, 0, 0));
            v1_1++;
        }
        Throwable v0_1 = 0;
        Throwable v6_1 = p6.rawQuery("SELECT ROUND((strftime(\'%s\',\'now\') - strftime(\'%s\', timestamp)) / (60 * 60 * 24 * 7.0) - 0.5) AS weeksAgo, SUM (granted) AS granted, SUM (revoked) AS revoked FROM permissionHistory WHERE weeksAgo < ? AND weeksAgo >= 0 GROUP BY weeksAgo ORDER BY weeksAgo".replace("?", String.valueOf(p7)), 0);
        try {
            while (v6_1.moveToNext()) {
                com.sophos.smsec.core.statistics.a.a v7_7 = new com.sophos.smsec.core.statistics.a.a(v6_1);
                this.a.put(Integer.valueOf(v7_7.a()), v7_7);
            }
        } catch (com.sophos.smsec.core.statistics.a.a v7_5) {
            if (v6_1 != null) {
                if (v0_1 == null) {
                    v6_1.close();
                } else {
                    try {
                        v6_1.close();
                    } catch (Throwable v6_2) {
                        v0_1.addSuppressed(v6_2);
                    }
                }
            }
            throw v7_5;
        } catch (com.sophos.smsec.core.statistics.a.a v7_4) {
            v0_1 = v7_4;
            throw v0_1;
        }
        if (v6_1 != null) {
            v6_1.close();
        }
        return;
    }

Method com.sophos.smsec.core.datastore.DataStore.x() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public android.database.Cursor x()
    {
        return this.a(0).rawQuery("SELECT identifier,app_name,granted_permission,requested_permission,installed,oldVersion,timestamp FROM pa_permission_history;", 0);
    }

Method com.sophos.nge.db.NgDataBase.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public declared_synchronized android.database.Cursor a(String p5, String[] p6)
    {
        try {
            String v0_1 = this.a(0);
            try {
                android.database.Cursor v5_1;
                String v1_5 = new StringBuilder();
                v1_5.append("SELECT key as _id, identifier, result_vector, result_score, timestamp from ");
                v1_5.append(ark>com.sophos.nge.db.NgDataBaseark>$Table.NGE_RESULTS.toString());
            } catch (android.database.Cursor v5_2) {
                String v0_3 = new StringBuilder();
                v0_3.append("lookup in DB table ");
                v0_3.append(ark>com.sophos.nge.db.NgDataBaseark>$Table.NGE_RESULTS.toString());
                v0_3.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: NgDataBase", v0_3.toString(), v5_2);
                return 0;
            }
            if (p5 != null) {
                StringBuilder v2_1 = new StringBuilder();
                v2_1.append(" WHERE ");
                v2_1.append(p5);
                v5_1 = v2_1.toString();
            } else {
                v5_1 = "";
            }
            v1_5.append(v5_1);
            return v0_1.rawQuery(v1_5.toString(), p6);
        } catch (android.database.Cursor v5_4) {
            throw v5_4;
        }
    }

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


    private final boolean a(int p17, byte[] p18)
    {
        this.b();
        this.d();
        Long v2_5 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p17));
            v3_1.put("entry", p18);
            Long v4_4 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_4) {
                int v7 = 0;
                try {
                    int v9 = this.y();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_1 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            try {
                                if ((v12 != 0) && (v12.moveToFirst())) {
                                    v10_1 = v12.getLong(v2_5);
                                }
                                if (v10_1 >= 100000) {
                                    this.r().c_().a("Data loss, local db full");
                                    long v13_2 = ((100000 - v10_1) + 1);
                                    String[] v11 = new String[1];
                                    v11[v2_5] = Long.toString(v13_2);
                                    Long v10_4 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                    if (v10_4 != v13_2) {
                                        this.r().c_().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_4), Long.valueOf((v13_2 - v10_4)));
                                    }
                                }
                                v9.insertOrThrow("messages", 0, v3_1);
                                v9.setTransactionSuccessful();
                                v9.endTransaction();
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                return 1;
                            } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                v7 = v12;
                                android.os.SystemClock.sleep(((long) v6));
                                v6 += 20;
                                if (v7 != 0) {
                                    v7.close();
                                }
                                if (v9 == 0) {
                                    v5++;
                                    v2_5 = 0;
                                    v4_4 = 5;
                                } else {
                                    v9.close();
                                }
                            }
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_5;
                        }
                        v7 = v9;
                        if (v7 != 0) {
                            try {
                                if (v7.inTransaction()) {
                                    v7.endTransaction();
                                }
                            } catch (com.google.android.gms.measurement.internal.t v0_1) {
                                v9 = v7;
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                throw v0_1;
                            }
                        }
                        this.r().c_().a("Error writing entry to local database", com.google.android.gms.measurement.internal.t v0_0);
                        this.b = 1;
                        if (v12 != 0) {
                            v12.close();
                        }
                        if (v7 == 0) {
                        } else {
                            v7.close();
                        }
                    } catch (com.google.android.gms.measurement.internal.t v0_3) {
                        this.r().c_().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.measurement.internal.t v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.measurement.internal.t v0_1) {
                    v9 = 0;
                    v12 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_3) {
                    v9 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v9 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_1) {
                    v12 = v7;
                }
            }
            this.r().i().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.measurement.internal.fd.z() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String z()
    {
        try {
            Throwable v0_1 = this.y().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 v1_2 = v0_1.getString(0);
                    if (v0_1 != null) {
                        v0_1.close();
                    }
                    return v1_2;
                }
            } catch (int v2_1) {
                this.r().c_().a("Database error getting next bundle app id", v2_1);
                if (v0_1 != null) {
                    v0_1.close();
                }
                return 0;
            }
        } catch (Throwable v0_2) {
            String v1_0 = v0_2;
            v0_1 = 0;
            if (v0_1 != null) {
                v0_1.close();
            }
            throw v1_0;
        } catch (int v2_1) {
            v0_1 = 0;
        } catch (String v1_0) {
        }
    }

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


    public final String a(long p5)
    {
        this.d();
        this.k();
        try {
            String v1_3 = this.y();
            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.r().x().a("No expired configs for apps with pending events");
                    if (v5_1 != 0) {
                        v5_1.close();
                    }
                    return 0;
                }
            } catch (String v6_1) {
                this.r().c_().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.measurement.internal.fd.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final android.util.Pair a(String p8, Long p9)
    {
        this.d();
        this.k();
        try {
            int v1_1 = this.y();
            com.google.android.gms.measurement.internal.t v3_4 = new String[2];
            v3_4[0] = p8;
            v3_4[1] = String.valueOf(p9);
            int v1_0 = v1_1.rawQuery("select main_event, children_to_process from main_event_params where app_id=? and event_id=?", v3_4);
            try {
                if (v1_0.moveToFirst()) {
                    java.io.IOException v2_1 = v1_0.getBlob(0);
                    com.google.android.gms.measurement.internal.t v3_0 = Long.valueOf(v1_0.getLong(1));
                    java.io.IOException v2_2 = com.google.android.gms.internal.measurement.iv.a(v2_1, 0, v2_1.length);
                    String v4_1 = new com.google.android.gms.internal.measurement.da();
                    try {
                        v4_1.a(v2_2);
                    } catch (java.io.IOException v2_3) {
                        this.r().c_().a("Failed to merge main event. appId, eventId", com.google.android.gms.measurement.internal.r.a(p8), p9, v2_3);
                        if (v1_0 != 0) {
                            v1_0.close();
                        }
                        return 0;
                    }
                    Object v8_4 = android.util.Pair.create(v4_1, v3_0);
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return v8_4;
                } else {
                    this.r().x().a("Main event not found");
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return 0;
                }
            } catch (Object v8_1) {
                this.r().c_().a("Error selecting main event", v8_1);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                return 0;
            }
        } catch (Object v8_2) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v8_2;
        } catch (Object v8_1) {
            v1_0 = 0;
        } catch (Object v8_2) {
        }
    }

Method com.google.android.gms.measurement.internal.fd.G() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long G()
    {
        long v0_0 = -1;
        try {
            android.database.Cursor v2_1 = this.y().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
        } catch (long v0_1) {
            if (v2_1 != null) {
                v2_1.close();
            }
            throw v0_1;
        } catch (int v3_1) {
            this.r().c_().a("Error querying raw events", v3_1);
            if (v2_1 != null) {
                v2_1.close();
            }
            return v0_0;
        }
        if (v2_1.moveToFirst()) {
            v0_0 = v2_1.getLong(0);
            if (v2_1 != null) {
                v2_1.close();
            }
            return v0_0;
        } else {
            if (v2_1 != null) {
                v2_1.close();
            }
            return -1;
        }
    }

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


    private final long b(String p4, String[] p5)
    {
        try {
            android.database.Cursor v1 = this.y().rawQuery(p4, p5);
        } catch (long v4_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v4_1;
        } catch (android.database.sqlite.SQLiteException v5_2) {
            this.r().c_().a("Database error", p4, v5_2);
            throw v5_2;
        }
        if (!v1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            long v4_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v4_2;
        }
    }

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


    private final long a(String p3, String[] p4, long p5)
    {
        try {
            android.database.Cursor v1 = this.y().rawQuery(p3, p4);
        } catch (long v3_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v3_1;
        } catch (int v4_3) {
            this.r().c_().a("Database error", p3, v4_3);
            throw v4_3;
        }
        if (!v1.moveToFirst()) {
            if (v1 != null) {
                v1.close();
            }
            return p5;
        } else {
            long v3_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v3_2;
        }
    }

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


    private final long a(String p1, String[] p2, long p3)
    {
        try {
            android.database.Cursor v4 = this.h().rawQuery(p1, p2);
        } catch (long v1_1) {
            if (v4 != null) {
                v4.close();
            }
            throw v1_1;
        } catch (int v2_3) {
            this.d("Database error", p1, v2_3);
            throw v2_3;
        }
        if (!v4.moveToFirst()) {
            if (v4 != null) {
                v4.close();
            }
            return 0;
        } else {
            long v1_3 = v4.getLong(0);
            if (v4 != null) {
                v4.close();
            }
            return v1_3;
        }
    }

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


    private final long a(String p3, String[] p4)
    {
        try {
            android.database.Cursor v0_1 = this.h().rawQuery(p3, 0);
        } catch (long v3_1) {
            if (v0_1 != null) {
                v0_1.close();
            }
            throw v3_1;
        } catch (android.database.sqlite.SQLiteException v4_2) {
            this.d("Database error", p3, v4_2);
            throw v4_2;
        }
        if (!v0_1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            long v3_2 = v0_1.getLong(0);
            if (v0_1 != null) {
                v0_1.close();
            }
            return v3_2;
        }
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.serverCacheEstimatedSizeInBytes() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public long serverCacheEstimatedSizeInBytes()
    {
        IllegalStateException v1_3 = new Object[3];
        v1_3[0] = "value";
        v1_3[1] = "path";
        v1_3[2] = "serverCache";
        android.database.Cursor v0_2 = this.database.rawQuery(String.format("SELECT sum(length(%s) + length(%s)) FROM %s", v1_3), 0);
        try {
            if (!v0_2.moveToFirst()) {
                throw new IllegalStateException("Couldn\'t read database result!");
            } else {
                IllegalStateException v1_7 = v0_2.getLong(0);
                v0_2.close();
                return v1_7;
            }
        } catch (IllegalStateException v1_6) {
            v0_2.close();
            throw v1_6;
        }
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.openDatabase() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private android.database.sqlite.SQLiteDatabase openDatabase(android.content.Context p2, String p3)
    {
        try {
            android.database.sqlite.SQLiteException v2_2 = new com.google.firebase.database.android.SqlPersistenceStorageEngine$PersistentCacheOpenHelper(p2, p3).getWritableDatabase();
            v2_2.rawQuery("PRAGMA locking_mode = EXCLUSIVE", 0).close();
            v2_2.beginTransaction();
            v2_2.endTransaction();
            return v2_2;
        } catch (android.database.sqlite.SQLiteException v2_1) {
            if (!(v2_1 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                throw v2_1;
            } else {
                throw new com.google.firebase.database.DatabaseException("Failed to gain exclusive lock to Firebase Database\'s offline persistence. This generally means you are using Firebase Database from multiple processes in your app. Keep in mind that multi-process Android apps execute the code in your Application class in all processes, so you may need to avoid initializing FirebaseDatabase in your Application class. If you are intentionally using Firebase Database from multiple processes, you can only enable offline persistence (i.e. call setPersistenceEnabled(true)) in one of them.", v2_1);
            }
        }
    }

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


    private final boolean a(String p46, long p47)
    {
        String v1_0 = this;
        this.d().f();
        try {
            com.google.android.gms.measurement.internal.d v3_10 = 0;
            int v2_1 = new ark>com.google.android.gms.measurement.internal.ejark>$a(this, 0);
            Object v4_30 = this.d();
            String v5_62 = this.y;
            com.google.android.gms.common.internal.r.a(v2_1);
            v4_30.d();
            v4_30.k();
            try {
                String v23_1;
                int v7_2;
                Long v15_3 = v4_30.y();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        int v13_46;
                        com.google.android.gms.measurement.internal.d v3_79 = v5_62 cmp -1;
                        if (v3_79 == null) {
                            v13_46 = new String[] {0});
                        } else {
                            int v7_73 = new String[2];
                            v7_73[0] = 0;
                            v7_73[1] = String.valueOf(v5_62);
                            v13_46 = v7_73;
                        }
                        com.google.android.gms.measurement.internal.d v3_84;
                        if (v3_79 == null) {
                            v3_84 = "";
                        } else {
                            v3_84 = " and rowid <= ?";
                        }
                        boolean v14_16 = new StringBuilder((String.valueOf(v3_84).length() + 84));
                        v14_16.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_16.append(v3_84);
                        v14_16.append(" order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v14_16.toString(), v13_46);
                        if (v3_10.moveToFirst()) {
                            int v13_51 = v3_10.getString(0);
                            v3_10.close();
                            v23_1 = v3_10;
                            v7_2 = v13_51;
                            v3_10 = 0;
                            try {
                                int v13_14 = new String[2];
                                v13_14[0] = v3_10;
                                v13_14[1] = v7_2;
                                String v25_2 = v15_3;
                                Long v15_2 = v15_3.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v13_14, 0, 0, "rowid", "2");
                                try {
                                    if (v15_2.moveToFirst()) {
                                        int v13_28 = v15_2.getBlob(0);
                                        int v13_29 = com.google.android.gms.internal.measurement.iv.a(v13_28, 0, v13_28.length);
                                        boolean v14_10 = new com.google.android.gms.internal.measurement.dd();
                                        try {
                                            v14_10.a(v13_29);
                                        } catch (android.database.sqlite.SQLiteException v0_3) {
                                            long v6_3 = v15_2;
                                            v4_30.r().c_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.measurement.internal.r.a(v3_10), v0_3);
                                            if (v6_3 == 0) {
                                                com.google.android.gms.measurement.internal.d v3_83;
                                                if (v2_1.c == null) {
                                                    v3_83 = 1;
                                                } else {
                                                    if (!v2_1.c.isEmpty()) {
                                                        v3_83 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_83 != null) {
                                                    this.d().w();
                                                    this.d().x();
                                                    return 0;
                                                } else {
                                                    com.google.android.gms.measurement.internal.d v3_9 = v2_1.a;
                                                    Object v4_4 = new com.google.android.gms.internal.measurement.da[v2_1.c.size()];
                                                    v3_9.b = v4_4;
                                                    Object v4_7 = this.j.b().e(v3_9.o);
                                                    String v5_13 = this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.ao);
                                                    Boolean v8_14 = 0;
                                                    Object v9_7 = 0;
                                                    boolean v10_56 = 0;
                                                    Long v12_66 = 0;
                                                    int v13_34 = 0;
                                                    boolean v14_12 = 0;
                                                    while (v10_56 < v2_1.c.size()) {
                                                        int v18_0;
                                                        String v23_2;
                                                        long v6_17 = ((com.google.android.gms.internal.measurement.da) v2_1.c.get(v10_56));
                                                        boolean v21_0 = v12_66;
                                                        if (!this.s().b(v2_1.a.o, v6_17.b)) {
                                                            int v26_1;
                                                            long v29_0;
                                                            v23_2 = v10_56;
                                                            String v25_1 = v13_34;
                                                            int v7_22 = this.s().c(v2_1.a.o, v6_17.b);
                                                            if (v7_22 != 0) {
                                                                if (v6_17.a == null) {
                                                                    Long v12_20 = new com.google.android.gms.internal.measurement.db[0];
                                                                    v6_17.a = v12_20;
                                                                }
                                                                int v11_11 = v6_17.a;
                                                                Long v12_21 = v11_11.length;
                                                                int v13_9 = 0;
                                                                int v26_2 = 0;
                                                                long v27_1 = 0;
                                                                while (v13_9 < v12_21) {
                                                                    boolean v10_47 = v11_11[v13_9];
                                                                    long v29_4 = v11_11;
                                                                    com.google.android.gms.measurement.internal.d v30_2 = v12_21;
                                                                    if (!"_c".equals(v10_47.a)) {
                                                                        if ("_r".equals(v10_47.a)) {
                                                                            v10_47.c = Long.valueOf(1);
                                                                            v27_1 = 1;
                                                                        }
                                                                    } else {
                                                                        v10_47.c = Long.valueOf(1);
                                                                        v26_2 = 1;
                                                                    }
                                                                    v13_9++;
                                                                    v11_11 = v29_4;
                                                                    v12_21 = v30_2;
                                                                }
                                                                if ((v26_2 == 0) && (v7_22 != 0)) {
                                                                    this.j.r().x().a("Marking event as conversion", this.j.k().a(v6_17.b));
                                                                    boolean v10_9 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_17 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_17.a = "_c";
                                                                    v11_17.c = Long.valueOf(1);
                                                                    v10_9[(v10_9.length - 1)] = v11_17;
                                                                    v6_17.a = v10_9;
                                                                }
                                                                if (v27_1 == 0) {
                                                                    this.j.r().x().a("Marking event as real-time", this.j.k().a(v6_17.b));
                                                                    boolean v10_15 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_23 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_23.a = "_r";
                                                                    v11_23.c = Long.valueOf(1);
                                                                    v10_15[(v10_15.length - 1)] = v11_23;
                                                                    v6_17.a = v10_15;
                                                                }
                                                                Long v12_42;
                                                                if (this.d().a(this.x(), v2_1.a.o, 0, 0, 0, 0, 1).e <= ((long) this.j.b().a(v2_1.a.o))) {
                                                                    v26_1 = v3_9;
                                                                    v12_42 = 1;
                                                                } else {
                                                                    boolean v10_21 = 0;
                                                                    while (v10_21 < v6_17.a.length) {
                                                                        if (!"_r".equals(v6_17.a[v10_21].a)) {
                                                                            v10_21++;
                                                                        } else {
                                                                            int v11_31 = new com.google.android.gms.internal.measurement.db[(v6_17.a.length - 1)];
                                                                            if (v10_21) {
                                                                                System.arraycopy(v6_17.a, 0, v11_31, 0, v10_21);
                                                                            }
                                                                            if (v10_21 >= v11_31.length) {
                                                                                v26_1 = v3_9;
                                                                            } else {
                                                                                v26_1 = v3_9;
                                                                                System.arraycopy(v6_17.a, (v10_21 + 1), v11_31, v10_21, (v11_31.length - v10_21));
                                                                            }
                                                                            v6_17.a = v11_31;
                                                                        }
                                                                        v12_42 = v21_0;
                                                                    }
                                                                    v26_1 = v3_9;
                                                                }
                                                                if ((!com.google.android.gms.measurement.internal.es.a(v6_17.b)) || (v7_22 == 0)) {
                                                                    v18_0 = v12_42;
                                                                    v29_0 = v14_12;
                                                                } else {
                                                                    v18_0 = v12_42;
                                                                    if (this.d().a(this.x(), v2_1.a.o, 0, 0, 1, 0, 0).c <= ((long) this.j.b().b(v2_1.a.o, com.google.android.gms.measurement.internal.h.v))) {
                                                                        v29_0 = v14_12;
                                                                    } else {
                                                                        this.j.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                        com.google.android.gms.measurement.internal.d v3_25 = v6_17.a;
                                                                        boolean v10_25 = v3_25.length;
                                                                        int v11_35 = 0;
                                                                        Long v12_52 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_35 < v10_25) {
                                                                            boolean v10_44 = v3_25[v11_35];
                                                                            if (!"_c".equals(v10_44.a)) {
                                                                                if ("_err".equals(v10_44.a)) {
                                                                                    v12_52 = 1;
                                                                                }
                                                                            } else {
                                                                                v13_23 = v10_44;
                                                                            }
                                                                            v11_35++;
                                                                        }
                                                                        v29_0 = v14_12;
                                                                        if ((v12_52 == null) || (v13_23 == 0)) {
                                                                            if (v13_23 == 0) {
                                                                                this.j.r().c_().a("Did not find conversion parameter. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                            } else {
                                                                                v13_23.a = "_err";
                                                                                v13_23.c = Long.valueOf(10);
                                                                            }
                                                                        } else {
                                                                            com.google.android.gms.measurement.internal.d v3_31 = v6_17.a;
                                                                            int v11_39 = new com.google.android.gms.internal.measurement.db[1];
                                                                            v11_39[0] = v13_23;
                                                                            v6_17.a = ((com.google.android.gms.internal.measurement.db[]) com.google.android.gms.common.util.b.a(v3_31, v11_39));
                                                                        }
                                                                    }
                                                                }
                                                            } else {
                                                                int v11_5;
                                                                this.g();
                                                                int v11_3 = v6_17.b;
                                                                com.google.android.gms.common.internal.r.a(v11_3);
                                                                Long v12_16 = v11_3.hashCode();
                                                                if (v12_16 == 94660) {
                                                                    if (!v11_3.equals("_in")) {
                                                                        v11_5 = -1;
                                                                    } else {
                                                                        v11_5 = 0;
                                                                    }
                                                                } else {
                                                                    if (v12_16 == 95025) {
                                                                        if (!v11_3.equals("_ug")) {
                                                                        } else {
                                                                            v11_5 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v12_16 == 95027) {
                                                                            if (!v11_3.equals("_ui")) {
                                                                            } else {
                                                                                v11_5 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                int v11_8;
                                                                switch (v11_5) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v11_8 = 1;
                                                                    default:
                                                                        v11_8 = 0;
                                                                }
                                                                if (v11_8 == 0) {
                                                                    v26_1 = v3_9;
                                                                    v29_0 = v14_12;
                                                                    v18_0 = v21_0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((!this.j.b().m(v2_1.a.o)) || (v7_22 == 0)) {
                                                            } else {
                                                                com.google.android.gms.measurement.internal.d v3_37 = v6_17.a;
                                                                int v7_23 = 0;
                                                                boolean v10_32 = -1;
                                                                int v11_40 = -1;
                                                                while (v7_23 < v3_37.length) {
                                                                    if (!"value".equals(v3_37[v7_23].a)) {
                                                                        if ("currency".equals(v3_37[v7_23].a)) {
                                                                            v11_40 = v7_23;
                                                                        }
                                                                    } else {
                                                                        v10_32 = v7_23;
                                                                    }
                                                                    v7_23++;
                                                                }
                                                                if (v10_32 == -1) {
                                                                } else {
                                                                    if ((v3_37[v10_32].c != null) || (v3_37[v10_32].d != null)) {
                                                                        int v7_32;
                                                                        if (v11_40 != -1) {
                                                                            int v7_31 = v3_37[v11_40].b;
                                                                            if (v7_31 == 0) {
                                                                            } else {
                                                                                if (v7_31.length() == 3) {
                                                                                    int v11_43 = 0;
                                                                                    while (v11_43 < v7_31.length()) {
                                                                                        int v13_25 = v7_31.codePointAt(v11_43);
                                                                                        if (Character.isLetter(v13_25)) {
                                                                                            v11_43 += Character.charCount(v13_25);
                                                                                        } else {
                                                                                            v7_32 = 1;
                                                                                            if (v7_32 != 0) {
                                                                                                this.j.r().k().a("Value parameter discarded. You must also supply a 3-letter ISO_4217 currency code in the currency parameter.");
                                                                                                v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 19, "currency");
                                                                                            }
                                                                                            v6_17.a = v3_37;
                                                                                            if (this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.an)) {
                                                                                                if (!"_e".equals(v6_17.b)) {
                                                                                                    if ("_vs".equals(v6_17.b)) {
                                                                                                        this.g();
                                                                                                        if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_et") == null) {
                                                                                                            if ((v8_14 == null) || ((Math.abs((v8_14.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v8_14, v6_17)))) {
                                                                                                                v9_7 = v6_17;
                                                                                                            } else {
                                                                                                                v8_14 = 0;
                                                                                                                v9_7 = 0;
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                } else {
                                                                                                    this.g();
                                                                                                    if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_fr") == null) {
                                                                                                        if ((v9_7 == null) || ((Math.abs((v9_7.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v6_17, v9_7)))) {
                                                                                                            v8_14 = v6_17;
                                                                                                        } else {
                                                                                                            v8_14 = 0;
                                                                                                            v9_7 = 0;
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                            if ((v4_7 == null) || ((v5_13 != null) || (!"_e".equals(v6_17.b)))) {
                                                                                                v3_9 = v26_1;
                                                                                            } else {
                                                                                                if (v6_17.a != null) {
                                                                                                    if (v6_17.a.length != 0) {
                                                                                                        this.g();
                                                                                                        com.google.android.gms.measurement.internal.d v3_68 = ((Long) com.google.android.gms.measurement.internal.ep.b(v6_17, "_et"));
                                                                                                        if (v3_68 != null) {
                                                                                                            v29_0 += v3_68.longValue();
                                                                                                            v3_9 = v26_1;
                                                                                                            v13_34 = (v25_1 + 1);
                                                                                                            v3_9.b[v25_1] = v6_17;
                                                                                                            v14_12 = v29_0;
                                                                                                            v10_56 = (v23_2 + 1);
                                                                                                            v12_66 = v18_0;
                                                                                                        } else {
                                                                                                            this.j.r().i().a("Engagement event does not include duration. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                                        }
                                                                                                    } else {
                                                                                                    }
                                                                                                }
                                                                                                this.j.r().i().a("Engagement event does not contain any parameters. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    v7_32 = 0;
                                                                                } else {
                                                                                }
                                                                            }
                                                                            v7_32 = 1;
                                                                        } else {
                                                                            v7_32 = 1;
                                                                        }
                                                                    } else {
                                                                        this.j.r().k().a("Value must be specified with a numeric type.");
                                                                        v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 18, "value");
                                                                    }
                                                                }
                                                            }
                                                        } else {
                                                            int v7_63;
                                                            v23_2 = v10_56;
                                                            String v25_3 = v13_34;
                                                            this.j.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o), this.j.k().a(v6_17.b));
                                                            if (this.s().f(v2_1.a.o)) {
                                                                v7_63 = 1;
                                                            } else {
                                                                if (!this.s().g(v2_1.a.o)) {
                                                                    v7_63 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_63 == 0) && (!"_err".equals(v6_17.b))) {
                                                                this.j.j().a(v2_1.a.o, 11, "_ev", v6_17.b, 0);
                                                            }
                                                            v18_0 = v21_0;
                                                            v13_34 = v25_3;
                                                        }
                                                    }
                                                    int v13_5;
                                                    boolean v21_4 = v12_66;
                                                    String v25_4 = v13_34;
                                                    long v29_6 = v14_12;
                                                    if (v5_13 == null) {
                                                        v13_5 = v25_4;
                                                    } else {
                                                        v13_5 = v25_4;
                                                        boolean v14_5 = v29_6;
                                                        String v5_0 = 0;
                                                        while (v5_0 < v13_5) {
                                                            long v6_12;
                                                            long v6_9 = v3_9.b[v5_0];
                                                            if (!"_e".equals(v6_9.b)) {
                                                                if (v4_7 != null) {
                                                                    this.g();
                                                                    long v6_10 = com.google.android.gms.measurement.internal.ep.a(v6_9, "_et");
                                                                    if (v6_10 != 0) {
                                                                        long v6_11 = v6_10.c;
                                                                        if ((v6_11 != 0) && (v6_11.longValue() > 0)) {
                                                                            v14_5 += v6_11.longValue();
                                                                            v6_12 = 1;
                                                                            v5_0 += v6_12;
                                                                        }
                                                                    }
                                                                }
                                                                v6_12 = 1;
                                                            } else {
                                                                this.g();
                                                                if (com.google.android.gms.measurement.internal.ep.a(v6_9, "_fr") == null) {
                                                                } else {
                                                                    System.arraycopy(v3_9.b, (v5_0 + 1), v3_9.b, v5_0, ((v13_5 - v5_0) - 1));
                                                                    v13_5--;
                                                                    v5_0--;
                                                                    v6_12 = 1;
                                                                }
                                                            }
                                                        }
                                                        v29_6 = v14_5;
                                                    }
                                                    if (v13_5 < v2_1.c.size()) {
                                                        v3_9.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v3_9.b, v13_5));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_9.o, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.measurement.internal.er;
                                                            v4_12(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf(v29_6));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                String v5_21 = new com.google.android.gms.measurement.internal.er;
                                                                v5_21(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v29_6)));
                                                                v4_12 = v5_21;
                                                            } else {
                                                            }
                                                        }
                                                        String v5_24 = new com.google.android.gms.internal.measurement.dg();
                                                        v5_24.b = "_lte";
                                                        v5_24.a = Long.valueOf(this.j.m().a());
                                                        v5_24.d = ((Long) v4_12.e);
                                                        long v6_48 = 0;
                                                        while (v6_48 < v3_9.c.length) {
                                                            if (!"_lte".equals(v3_9.c[v6_48].b)) {
                                                                v6_48++;
                                                            } else {
                                                                v3_9.c[v6_48] = v5_24;
                                                                long v6_49 = 1;
                                                            }
                                                            String v5_25;
                                                            if (v6_49 != 0) {
                                                                v5_25 = 0;
                                                            } else {
                                                                v3_9.c = ((com.google.android.gms.internal.measurement.dg[]) java.util.Arrays.copyOf(v3_9.c, (v3_9.c.length + 1)));
                                                                v3_9.c[(v2_1.a.c.length - 1)] = v5_24;
                                                                v5_25 = 0;
                                                            }
                                                            if (v29_6 > v5_25) {
                                                                this.d().a(v4_12);
                                                                this.j.r().w().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_49 = 0;
                                                    }
                                                    String v1_7;
                                                    Object v9_9;
                                                    Object v4_14 = v3_9.o;
                                                    String v5_30 = v3_9.c;
                                                    long v6_55 = v3_9.b;
                                                    com.google.android.gms.common.internal.r.a(v4_14);
                                                    v3_9.A = this.e().a(v4_14, v6_55, v5_30);
                                                    try {
                                                        if (!this.j.b().d(v2_1.a.o)) {
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                        } else {
                                                            Object v4_20 = new java.util.HashMap();
                                                            String v5_35 = new com.google.android.gms.internal.measurement.da[v3_9.b.length];
                                                            long v6_7 = this.j.j().h();
                                                            int v7_10 = v3_9.b;
                                                            Boolean v8_10 = v7_10.length;
                                                            Object v9_3 = 0;
                                                            boolean v10_0 = 0;
                                                            while (v9_3 < v8_10) {
                                                                String v23_0;
                                                                int v26_0;
                                                                Object v9_1;
                                                                long v27_0;
                                                                String v25_0;
                                                                int v11_54 = v7_10[v9_3];
                                                                if (!v11_54.b.equals("_ep")) {
                                                                    long v28_1;
                                                                    com.google.android.gms.measurement.internal.d v3_122;
                                                                    Long v12_81 = this.s().e(v2_1.a.o);
                                                                    v1_0.j.j();
                                                                    boolean v14_21 = com.google.android.gms.measurement.internal.es.a(v11_54.c.longValue(), v12_81);
                                                                    v23_0 = v7_10;
                                                                    v25_0 = v8_10;
                                                                    Boolean v8_22 = Long.valueOf(1);
                                                                    if ((!android.text.TextUtils.isEmpty("_dbg")) && (v8_22 != null)) {
                                                                        v26_0 = v3_9;
                                                                        com.google.android.gms.measurement.internal.d v3_121 = v11_54.a;
                                                                        v27_0 = v9_3;
                                                                        Object v9_10 = v3_121.length;
                                                                        v28_1 = v12_81;
                                                                        Long v12_82 = 0;
                                                                        while (v12_82 < v9_10) {
                                                                            int v13_57 = v3_121[v12_82];
                                                                            if (!"_dbg".equals(v13_57.a)) {
                                                                                v12_82++;
                                                                            } else {
                                                                                if (((!(v8_22 instanceof Long)) || (!v8_22.equals(v13_57.c))) && (((!(v8_22 instanceof String)) || (!v8_22.equals(v13_57.b))) && ((!(v8_22 instanceof Double)) || (!v8_22.equals(v13_57.d))))) {
                                                                                    v3_122 = 0;
                                                                                } else {
                                                                                    v3_122 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                        v3_122 = 0;
                                                                    } else {
                                                                        v26_0 = v3_9;
                                                                        v27_0 = v9_3;
                                                                        v28_1 = v12_81;
                                                                        v3_122 = 0;
                                                                    }
                                                                    Long v12_83;
                                                                    if (v3_122 != null) {
                                                                        v12_83 = 1;
                                                                    } else {
                                                                        v12_83 = this.s().d(v2_1.a.o, v11_54.b);
                                                                    }
                                                                    if (v12_83 > null) {
                                                                        com.google.android.gms.measurement.internal.d v3_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v11_54.b));
                                                                        if (v3_1 == null) {
                                                                            v3_1 = this.d().a(v2_1.a.o, v11_54.b);
                                                                            if (v3_1 == null) {
                                                                                v1_0.j.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_1.a.o, v11_54.b);
                                                                                v3_1 = new com.google.android.gms.measurement.internal.d;
                                                                                v3_1(v2_1.a.o, v11_54.b, 1, 1, v11_54.c.longValue(), 0, 0, 0, 0, 0);
                                                                            }
                                                                        }
                                                                        Boolean v8_28;
                                                                        this.g();
                                                                        int v7_123 = ((Long) com.google.android.gms.measurement.internal.ep.b(v11_54, "_eid"));
                                                                        if (v7_123 == 0) {
                                                                            v8_28 = 0;
                                                                        } else {
                                                                            v8_28 = 1;
                                                                        }
                                                                        Boolean v8_29 = Boolean.valueOf(v8_28);
                                                                        if (v12_83 != 1) {
                                                                            if (v6_7.nextInt(v12_83) != 0) {
                                                                                p46 = v6_7;
                                                                                int v13_58;
                                                                                String v1_20;
                                                                                if (!v1_0.j.b().o(v2_1.a.o)) {
                                                                                    v9_1 = v2_1;
                                                                                    v13_58 = v7_123;
                                                                                    if (Math.abs((v11_54.c.longValue() - v3_1.f)) < 86400000) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                } else {
                                                                                    long v28_2;
                                                                                    if (v3_1.g == null) {
                                                                                        v1_0.j.j();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                        v28_2 = com.google.android.gms.measurement.internal.es.a(v11_54.d.longValue(), v28_1);
                                                                                    } else {
                                                                                        v28_2 = v3_1.g.longValue();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                    }
                                                                                    if (v28_2 == v14_21) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                }
                                                                                if (v1_20 == null) {
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v4_20.put(v11_54.b, v3_1.a(v13_58, 0, 0));
                                                                                    }
                                                                                } else {
                                                                                    this.g();
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                                    this.g();
                                                                                    long v6_89 = ((long) v12_83);
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v6_89));
                                                                                    String v1_29 = (v10_0 + 1);
                                                                                    v5_35[v10_0] = v11_54;
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v3_1 = v3_1.a(0, Long.valueOf(v6_89), Boolean.valueOf(1));
                                                                                    }
                                                                                    v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                    v10_0 = v1_29;
                                                                                }
                                                                            } else {
                                                                                this.g();
                                                                                Long v12_0 = ((long) v12_83);
                                                                                p46 = v6_7;
                                                                                v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v12_0));
                                                                                long v6_6 = (v10_0 + 1);
                                                                                v5_35[v10_0] = v11_54;
                                                                                if (v8_29.booleanValue()) {
                                                                                    v3_1 = v3_1.a(0, Long.valueOf(v12_0), 0);
                                                                                }
                                                                                v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                v9_1 = v2_1;
                                                                                v10_0 = v6_6;
                                                                            }
                                                                        } else {
                                                                            int v7_6 = (v10_0 + 1);
                                                                            v5_35[v10_0] = v11_54;
                                                                            if ((v8_29.booleanValue()) && ((v3_1.h != null) || ((v3_1.i != null) || (v3_1.j != null)))) {
                                                                                v4_20.put(v11_54.b, v3_1.a(0, 0, 0));
                                                                            }
                                                                            v9_1 = v2_1;
                                                                            p46 = v6_7;
                                                                            v10_0 = v7_6;
                                                                        }
                                                                    } else {
                                                                        v1_0.j.r().i().a("Sample rate must be positive. event, rate", v11_54.b, Integer.valueOf(v12_83));
                                                                        com.google.android.gms.measurement.internal.d v3_8 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v9_1 = v2_1;
                                                                        v10_0 = v3_8;
                                                                        p46 = v6_7;
                                                                    }
                                                                } else {
                                                                    this.g();
                                                                    Long v12_3 = ((String) com.google.android.gms.measurement.internal.ep.b(v11_54, "_en"));
                                                                    int v13_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v12_3));
                                                                    if (v13_1 == 0) {
                                                                        v13_1 = this.d().a(v2_1.a.o, v12_3);
                                                                        v4_20.put(v12_3, v13_1);
                                                                    }
                                                                    if (v13_1.h != null) {
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v9_1 = v2_1;
                                                                    } else {
                                                                        if (v13_1.i.longValue() > 1) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", v13_1.i);
                                                                        }
                                                                        if ((v13_1.j != null) && (v13_1.j.booleanValue())) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                        }
                                                                        Long v12_14 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v10_0 = v12_14;
                                                                        v9_1 = v2_1;
                                                                    }
                                                                }
                                                                v6_7 = p46;
                                                                v2_1 = v9_1;
                                                                v7_10 = v23_0;
                                                                v8_10 = v25_0;
                                                                v3_9 = v26_0;
                                                                v9_3 = (v27_0 + 1);
                                                                v1_0 = this;
                                                            }
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                            if (v10_0 < v1_7.b.length) {
                                                                v1_7.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v5_35, v10_0));
                                                            }
                                                            int v2_10 = v4_20.entrySet().iterator();
                                                            while (v2_10.hasNext()) {
                                                                this.d().a(((com.google.android.gms.measurement.internal.d) ((java.util.Map$Entry) v2_10.next()).getValue()));
                                                            }
                                                        }
                                                        try {
                                                            v1_7.e = Long.valueOf(nan);
                                                            v1_7.f = Long.valueOf(-0.0);
                                                            int v2_15 = 0;
                                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                                            String v1_2 = v0_4;
                                                            this.d().x();
                                                            throw v1_2;
                                                        }
                                                        while (v2_15 < v1_7.b.length) {
                                                            com.google.android.gms.measurement.internal.d v3_115 = v1_7.b[v2_15];
                                                            if (v3_115.c.longValue() < v1_7.e.longValue()) {
                                                                v1_7.e = v3_115.c;
                                                            }
                                                            if (v3_115.c.longValue() > v1_7.f.longValue()) {
                                                                v1_7.f = v3_115.c;
                                                            }
                                                            v2_15++;
                                                        }
                                                        Object v4_21;
                                                        int v2_17 = v9_9.a.o;
                                                        com.google.android.gms.measurement.internal.d v3_91 = this.d().b(v2_17);
                                                        if (v3_91 != null) {
                                                            v4_21 = this;
                                                            if (v1_7.b.length > 0) {
                                                                int v7_99;
                                                                String v5_38 = v3_91.i();
                                                                if (v5_38 == 0) {
                                                                    v7_99 = 0;
                                                                } else {
                                                                    v7_99 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.h = v7_99;
                                                                int v7_100 = v3_91.h();
                                                                if (v7_100 != 0) {
                                                                    v5_38 = v7_100;
                                                                } else {
                                                                }
                                                                String v5_39;
                                                                if (v5_38 == 0) {
                                                                    v5_39 = 0;
                                                                } else {
                                                                    v5_39 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.g = v5_39;
                                                                v3_91.s();
                                                                v1_7.w = Integer.valueOf(((int) v3_91.p()));
                                                                v3_91.a(v1_7.e.longValue());
                                                                v3_91.b(v1_7.f.longValue());
                                                                v1_7.x = v3_91.A();
                                                                this.d().a(v3_91);
                                                            }
                                                        } else {
                                                            v4_21 = this;
                                                            this.j.r().c_().a("Bundling raw events w/o app info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                        }
                                                        if (v1_7.b.length > 0) {
                                                            v4_21.j.u();
                                                            com.google.android.gms.measurement.internal.d v3_99 = this.s().a(v9_9.a.o);
                                                            if (v3_99 == null) {
                                                                if (!android.text.TextUtils.isEmpty(v9_9.a.y)) {
                                                                    v4_21.j.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                                } else {
                                                                    v1_7.E = Long.valueOf(-1);
                                                                }
                                                            } else {
                                                                if (v3_99.a != null) {
                                                                    v1_7.E = v3_99.a;
                                                                } else {
                                                                }
                                                            }
                                                            this.d().a(v1_7, v21_4);
                                                        }
                                                        String v1_8 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_109 = v9_9.b;
                                                        com.google.android.gms.common.internal.r.a(v3_109);
                                                        v1_8.d();
                                                        v1_8.k();
                                                        String v5_56 = new StringBuilder("rowid in (");
                                                        long v6_65 = 0;
                                                        while (v6_65 < v3_109.size()) {
                                                            if (v6_65 != 0) {
                                                                v5_56.append(",");
                                                            }
                                                            v5_56.append(((Long) v3_109.get(v6_65)).longValue());
                                                            v6_65++;
                                                        }
                                                        v5_56.append(")");
                                                        String v5_58 = v1_8.y().delete("raw_events", v5_56.toString(), 0);
                                                        if (v5_58 != v3_109.size()) {
                                                            v1_8.r().c_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_58), Integer.valueOf(v3_109.size()));
                                                        }
                                                        String v1_11 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_112 = v1_11.y();
                                                        try {
                                                            long v6_71 = new String[2];
                                                            v6_71[0] = v2_17;
                                                            v6_71[1] = v2_17;
                                                            v3_112.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_71);
                                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                                            v1_11.r().c_().a("Failed to remove unused event metadata. appId", com.google.android.gms.measurement.internal.r.a(v2_17), v0_7);
                                                        }
                                                        this.d().w();
                                                        this.d().x();
                                                        return 1;
                                                    } catch (android.database.sqlite.SQLiteException v0_2) {
                                                        v1_2 = v0_2;
                                                    }
                                                }
                                            } else {
                                                v6_3.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            com.google.android.gms.measurement.internal.d v3_0 = v0_1;
                                            try {
                                                v4_30.r().c_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.measurement.internal.r.a(v7_2), v3_0);
                                            } catch (android.database.sqlite.SQLiteException v0_6) {
                                                String v1_3 = v0_6;
                                                int v22 = v6_3;
                                                if (v22 != 0) {
                                                    v22.close();
                                                }
                                                throw v1_3;
                                            }
                                            if (v6_3 == 0) {
                                            } else {
                                                v6_3.close();
                                            }
                                        }
                                        if (v15_2.moveToNext()) {
                                            v4_30.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        }
                                        String[] v17_2;
                                        String v16_2;
                                        v15_2.close();
                                        v2_1.a(v14_10);
                                        if (v5_62 == -1) {
                                            boolean v10_59 = new String[2];
                                            v10_59[0] = v3_10;
                                            v10_59[1] = v7_2;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_2 = v10_59;
                                        } else {
                                            int v13_44 = new String[3];
                                            v13_44[0] = v3_10;
                                            v13_44[1] = v7_2;
                                            v13_44[2] = String.valueOf(v5_62);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_2 = v13_44;
                                        }
                                        v6_3 = v15_2;
                                        String v5_6 = v25_2.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v16_2, v17_2, 0, 0, "rowid", 0);
                                        try {
                                            if (!v5_6.moveToFirst()) {
                                                v4_30.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                            v22 = v5_6;
                                            v1_3 = v0_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            v6_3 = v5_6;
                                        }
                                        do {
                                            long v6_24 = v5_6.getLong(0);
                                            Long v12_70 = v5_6.getBlob(3);
                                            boolean v10_64 = com.google.android.gms.internal.measurement.iv.a(v12_70, 0, v12_70.length);
                                            Long v12_72 = new com.google.android.gms.internal.measurement.da();
                                            v12_72.a(v10_64);
                                            v12_72.b = v5_6.getString(1);
                                            v12_72.c = Long.valueOf(v5_6.getLong(2));
                                            if (v2_1.a(v6_24, v12_72)) {
                                            } else {
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } while(v5_6.moveToNext());
                                        if (v5_6 == null) {
                                        } else {
                                            v5_6.close();
                                        }
                                    } else {
                                        v4_30.r().c_().a("Raw event metadata record is missing. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        if (v15_2 == null) {
                                        } else {
                                            v15_2.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v22 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v7_2 = v3_10;
                                    v6_3 = v15_2;
                                }
                                v22 = v6_3;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v22 = v23_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v7_2 = v3_10;
                                v6_3 = v23_1;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    } else {
                        boolean v14_17;
                        int v13_52 = v5_62 cmp -1;
                        try {
                            if (v13_52 == 0) {
                                v14_17 = new String[1];
                                v14_17[0] = String.valueOf(p47);
                            } else {
                                v14_17 = new String[2];
                                v14_17[0] = String.valueOf(v5_62);
                                v14_17[1] = String.valueOf(p47);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v6_3 = 0;
                            v7_2 = 0;
                        }
                        int v13_53;
                        if (v13_52 == 0) {
                            v13_53 = "";
                        } else {
                            v13_53 = "rowid <= ? and ";
                        }
                        com.google.android.gms.measurement.internal.d v3_142 = new StringBuilder((String.valueOf(v13_53).length() + 148));
                        v3_142.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_142.append(v13_53);
                        v3_142.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v3_142.toString(), v14_17);
                        if (v3_10.moveToFirst()) {
                            int v7_9 = v3_10.getString(0);
                            try {
                                int v13_4 = v3_10.getString(1);
                                v3_10.close();
                                v23_1 = v3_10;
                                v3_10 = v7_9;
                                v7_2 = v13_4;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v6_3 = v3_10;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_0) {
                    v22 = v3_10;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v6_3 = v3_10;
                    v7_2 = 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v22 = 0;
            } catch (android.database.sqlite.SQLiteException v0_8) {
                v3_0 = v0_8;
                v6_3 = 0;
                v7_2 = 0;
            } catch (android.database.sqlite.SQLiteException v0_4) {
            }
        } catch (android.database.sqlite.SQLiteException v0_4) {
        }
    }

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


    private final boolean a(String p46, long p47)
    {
        String v1_0 = this;
        this.d().f();
        try {
            com.google.android.gms.measurement.internal.d v3_10 = 0;
            int v2_1 = new ark>com.google.android.gms.measurement.internal.ejark>$a(this, 0);
            Object v4_30 = this.d();
            String v5_62 = this.y;
            com.google.android.gms.common.internal.r.a(v2_1);
            v4_30.d();
            v4_30.k();
            try {
                String v23_1;
                int v7_2;
                Long v15_3 = v4_30.y();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        int v13_46;
                        com.google.android.gms.measurement.internal.d v3_79 = v5_62 cmp -1;
                        if (v3_79 == null) {
                            v13_46 = new String[] {0});
                        } else {
                            int v7_73 = new String[2];
                            v7_73[0] = 0;
                            v7_73[1] = String.valueOf(v5_62);
                            v13_46 = v7_73;
                        }
                        com.google.android.gms.measurement.internal.d v3_84;
                        if (v3_79 == null) {
                            v3_84 = "";
                        } else {
                            v3_84 = " and rowid <= ?";
                        }
                        boolean v14_16 = new StringBuilder((String.valueOf(v3_84).length() + 84));
                        v14_16.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_16.append(v3_84);
                        v14_16.append(" order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v14_16.toString(), v13_46);
                        if (v3_10.moveToFirst()) {
                            int v13_51 = v3_10.getString(0);
                            v3_10.close();
                            v23_1 = v3_10;
                            v7_2 = v13_51;
                            v3_10 = 0;
                            try {
                                int v13_14 = new String[2];
                                v13_14[0] = v3_10;
                                v13_14[1] = v7_2;
                                String v25_2 = v15_3;
                                Long v15_2 = v15_3.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v13_14, 0, 0, "rowid", "2");
                                try {
                                    if (v15_2.moveToFirst()) {
                                        int v13_28 = v15_2.getBlob(0);
                                        int v13_29 = com.google.android.gms.internal.measurement.iv.a(v13_28, 0, v13_28.length);
                                        boolean v14_10 = new com.google.android.gms.internal.measurement.dd();
                                        try {
                                            v14_10.a(v13_29);
                                        } catch (android.database.sqlite.SQLiteException v0_3) {
                                            long v6_3 = v15_2;
                                            v4_30.r().c_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.measurement.internal.r.a(v3_10), v0_3);
                                            if (v6_3 == 0) {
                                                com.google.android.gms.measurement.internal.d v3_83;
                                                if (v2_1.c == null) {
                                                    v3_83 = 1;
                                                } else {
                                                    if (!v2_1.c.isEmpty()) {
                                                        v3_83 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_83 != null) {
                                                    this.d().w();
                                                    this.d().x();
                                                    return 0;
                                                } else {
                                                    com.google.android.gms.measurement.internal.d v3_9 = v2_1.a;
                                                    Object v4_4 = new com.google.android.gms.internal.measurement.da[v2_1.c.size()];
                                                    v3_9.b = v4_4;
                                                    Object v4_7 = this.j.b().e(v3_9.o);
                                                    String v5_13 = this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.ao);
                                                    Boolean v8_14 = 0;
                                                    Object v9_7 = 0;
                                                    boolean v10_56 = 0;
                                                    Long v12_66 = 0;
                                                    int v13_34 = 0;
                                                    boolean v14_12 = 0;
                                                    while (v10_56 < v2_1.c.size()) {
                                                        int v18_0;
                                                        String v23_2;
                                                        long v6_17 = ((com.google.android.gms.internal.measurement.da) v2_1.c.get(v10_56));
                                                        boolean v21_0 = v12_66;
                                                        if (!this.s().b(v2_1.a.o, v6_17.b)) {
                                                            long v29_0;
                                                            int v26_1;
                                                            v23_2 = v10_56;
                                                            String v25_1 = v13_34;
                                                            int v7_22 = this.s().c(v2_1.a.o, v6_17.b);
                                                            if (v7_22 != 0) {
                                                                if (v6_17.a == null) {
                                                                    Long v12_20 = new com.google.android.gms.internal.measurement.db[0];
                                                                    v6_17.a = v12_20;
                                                                }
                                                                int v11_11 = v6_17.a;
                                                                Long v12_21 = v11_11.length;
                                                                int v13_9 = 0;
                                                                int v26_2 = 0;
                                                                long v27_1 = 0;
                                                                while (v13_9 < v12_21) {
                                                                    boolean v10_47 = v11_11[v13_9];
                                                                    long v29_4 = v11_11;
                                                                    com.google.android.gms.measurement.internal.d v30_2 = v12_21;
                                                                    if (!"_c".equals(v10_47.a)) {
                                                                        if ("_r".equals(v10_47.a)) {
                                                                            v10_47.c = Long.valueOf(1);
                                                                            v27_1 = 1;
                                                                        }
                                                                    } else {
                                                                        v10_47.c = Long.valueOf(1);
                                                                        v26_2 = 1;
                                                                    }
                                                                    v13_9++;
                                                                    v11_11 = v29_4;
                                                                    v12_21 = v30_2;
                                                                }
                                                                if ((v26_2 == 0) && (v7_22 != 0)) {
                                                                    this.j.r().x().a("Marking event as conversion", this.j.k().a(v6_17.b));
                                                                    boolean v10_9 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_17 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_17.a = "_c";
                                                                    v11_17.c = Long.valueOf(1);
                                                                    v10_9[(v10_9.length - 1)] = v11_17;
                                                                    v6_17.a = v10_9;
                                                                }
                                                                if (v27_1 == 0) {
                                                                    this.j.r().x().a("Marking event as real-time", this.j.k().a(v6_17.b));
                                                                    boolean v10_15 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_23 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_23.a = "_r";
                                                                    v11_23.c = Long.valueOf(1);
                                                                    v10_15[(v10_15.length - 1)] = v11_23;
                                                                    v6_17.a = v10_15;
                                                                }
                                                                Long v12_42;
                                                                if (this.d().a(this.x(), v2_1.a.o, 0, 0, 0, 0, 1).e <= ((long) this.j.b().a(v2_1.a.o))) {
                                                                    v26_1 = v3_9;
                                                                    v12_42 = 1;
                                                                } else {
                                                                    boolean v10_21 = 0;
                                                                    while (v10_21 < v6_17.a.length) {
                                                                        if (!"_r".equals(v6_17.a[v10_21].a)) {
                                                                            v10_21++;
                                                                        } else {
                                                                            int v11_31 = new com.google.android.gms.internal.measurement.db[(v6_17.a.length - 1)];
                                                                            if (v10_21) {
                                                                                System.arraycopy(v6_17.a, 0, v11_31, 0, v10_21);
                                                                            }
                                                                            if (v10_21 >= v11_31.length) {
                                                                                v26_1 = v3_9;
                                                                            } else {
                                                                                v26_1 = v3_9;
                                                                                System.arraycopy(v6_17.a, (v10_21 + 1), v11_31, v10_21, (v11_31.length - v10_21));
                                                                            }
                                                                            v6_17.a = v11_31;
                                                                        }
                                                                        v12_42 = v21_0;
                                                                    }
                                                                    v26_1 = v3_9;
                                                                }
                                                                if ((!com.google.android.gms.measurement.internal.es.a(v6_17.b)) || (v7_22 == 0)) {
                                                                    v18_0 = v12_42;
                                                                    v29_0 = v14_12;
                                                                } else {
                                                                    v18_0 = v12_42;
                                                                    if (this.d().a(this.x(), v2_1.a.o, 0, 0, 1, 0, 0).c <= ((long) this.j.b().b(v2_1.a.o, com.google.android.gms.measurement.internal.h.v))) {
                                                                        v29_0 = v14_12;
                                                                    } else {
                                                                        this.j.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                        com.google.android.gms.measurement.internal.d v3_25 = v6_17.a;
                                                                        boolean v10_25 = v3_25.length;
                                                                        int v11_35 = 0;
                                                                        Long v12_52 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_35 < v10_25) {
                                                                            boolean v10_44 = v3_25[v11_35];
                                                                            if (!"_c".equals(v10_44.a)) {
                                                                                if ("_err".equals(v10_44.a)) {
                                                                                    v12_52 = 1;
                                                                                }
                                                                            } else {
                                                                                v13_23 = v10_44;
                                                                            }
                                                                            v11_35++;
                                                                        }
                                                                        v29_0 = v14_12;
                                                                        if ((v12_52 == null) || (v13_23 == 0)) {
                                                                            if (v13_23 == 0) {
                                                                                this.j.r().c_().a("Did not find conversion parameter. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                            } else {
                                                                                v13_23.a = "_err";
                                                                                v13_23.c = Long.valueOf(10);
                                                                            }
                                                                        } else {
                                                                            com.google.android.gms.measurement.internal.d v3_31 = v6_17.a;
                                                                            int v11_39 = new com.google.android.gms.internal.measurement.db[1];
                                                                            v11_39[0] = v13_23;
                                                                            v6_17.a = ((com.google.android.gms.internal.measurement.db[]) com.google.android.gms.common.util.b.a(v3_31, v11_39));
                                                                        }
                                                                    }
                                                                }
                                                            } else {
                                                                int v11_5;
                                                                this.g();
                                                                int v11_3 = v6_17.b;
                                                                com.google.android.gms.common.internal.r.a(v11_3);
                                                                Long v12_16 = v11_3.hashCode();
                                                                if (v12_16 == 94660) {
                                                                    if (!v11_3.equals("_in")) {
                                                                        v11_5 = -1;
                                                                    } else {
                                                                        v11_5 = 0;
                                                                    }
                                                                } else {
                                                                    if (v12_16 == 95025) {
                                                                        if (!v11_3.equals("_ug")) {
                                                                        } else {
                                                                            v11_5 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v12_16 == 95027) {
                                                                            if (!v11_3.equals("_ui")) {
                                                                            } else {
                                                                                v11_5 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                int v11_8;
                                                                switch (v11_5) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v11_8 = 1;
                                                                    default:
                                                                        v11_8 = 0;
                                                                }
                                                                if (v11_8 == 0) {
                                                                    v26_1 = v3_9;
                                                                    v29_0 = v14_12;
                                                                    v18_0 = v21_0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((!this.j.b().m(v2_1.a.o)) || (v7_22 == 0)) {
                                                            } else {
                                                                com.google.android.gms.measurement.internal.d v3_37 = v6_17.a;
                                                                int v7_23 = 0;
                                                                boolean v10_32 = -1;
                                                                int v11_40 = -1;
                                                                while (v7_23 < v3_37.length) {
                                                                    if (!"value".equals(v3_37[v7_23].a)) {
                                                                        if ("currency".equals(v3_37[v7_23].a)) {
                                                                            v11_40 = v7_23;
                                                                        }
                                                                    } else {
                                                                        v10_32 = v7_23;
                                                                    }
                                                                    v7_23++;
                                                                }
                                                                if (v10_32 == -1) {
                                                                } else {
                                                                    if ((v3_37[v10_32].c != null) || (v3_37[v10_32].d != null)) {
                                                                        int v7_32;
                                                                        if (v11_40 != -1) {
                                                                            int v7_31 = v3_37[v11_40].b;
                                                                            if (v7_31 == 0) {
                                                                            } else {
                                                                                if (v7_31.length() == 3) {
                                                                                    int v11_43 = 0;
                                                                                    while (v11_43 < v7_31.length()) {
                                                                                        int v13_25 = v7_31.codePointAt(v11_43);
                                                                                        if (Character.isLetter(v13_25)) {
                                                                                            v11_43 += Character.charCount(v13_25);
                                                                                        } else {
                                                                                            v7_32 = 1;
                                                                                            if (v7_32 != 0) {
                                                                                                this.j.r().k().a("Value parameter discarded. You must also supply a 3-letter ISO_4217 currency code in the currency parameter.");
                                                                                                v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 19, "currency");
                                                                                            }
                                                                                            v6_17.a = v3_37;
                                                                                            if (this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.an)) {
                                                                                                if (!"_e".equals(v6_17.b)) {
                                                                                                    if ("_vs".equals(v6_17.b)) {
                                                                                                        this.g();
                                                                                                        if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_et") == null) {
                                                                                                            if ((v8_14 == null) || ((Math.abs((v8_14.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v8_14, v6_17)))) {
                                                                                                                v9_7 = v6_17;
                                                                                                            } else {
                                                                                                                v8_14 = 0;
                                                                                                                v9_7 = 0;
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                } else {
                                                                                                    this.g();
                                                                                                    if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_fr") == null) {
                                                                                                        if ((v9_7 == null) || ((Math.abs((v9_7.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v6_17, v9_7)))) {
                                                                                                            v8_14 = v6_17;
                                                                                                        } else {
                                                                                                            v8_14 = 0;
                                                                                                            v9_7 = 0;
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                            if ((v4_7 == null) || ((v5_13 != null) || (!"_e".equals(v6_17.b)))) {
                                                                                                v3_9 = v26_1;
                                                                                            } else {
                                                                                                if (v6_17.a != null) {
                                                                                                    if (v6_17.a.length != 0) {
                                                                                                        this.g();
                                                                                                        com.google.android.gms.measurement.internal.d v3_68 = ((Long) com.google.android.gms.measurement.internal.ep.b(v6_17, "_et"));
                                                                                                        if (v3_68 != null) {
                                                                                                            v29_0 += v3_68.longValue();
                                                                                                            v3_9 = v26_1;
                                                                                                            v13_34 = (v25_1 + 1);
                                                                                                            v3_9.b[v25_1] = v6_17;
                                                                                                            v14_12 = v29_0;
                                                                                                            v10_56 = (v23_2 + 1);
                                                                                                            v12_66 = v18_0;
                                                                                                        } else {
                                                                                                            this.j.r().i().a("Engagement event does not include duration. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                                        }
                                                                                                    } else {
                                                                                                    }
                                                                                                }
                                                                                                this.j.r().i().a("Engagement event does not contain any parameters. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    v7_32 = 0;
                                                                                } else {
                                                                                }
                                                                            }
                                                                            v7_32 = 1;
                                                                        } else {
                                                                            v7_32 = 1;
                                                                        }
                                                                    } else {
                                                                        this.j.r().k().a("Value must be specified with a numeric type.");
                                                                        v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 18, "value");
                                                                    }
                                                                }
                                                            }
                                                        } else {
                                                            int v7_63;
                                                            v23_2 = v10_56;
                                                            String v25_3 = v13_34;
                                                            this.j.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o), this.j.k().a(v6_17.b));
                                                            if (this.s().f(v2_1.a.o)) {
                                                                v7_63 = 1;
                                                            } else {
                                                                if (!this.s().g(v2_1.a.o)) {
                                                                    v7_63 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_63 == 0) && (!"_err".equals(v6_17.b))) {
                                                                this.j.j().a(v2_1.a.o, 11, "_ev", v6_17.b, 0);
                                                            }
                                                            v18_0 = v21_0;
                                                            v13_34 = v25_3;
                                                        }
                                                    }
                                                    int v13_5;
                                                    boolean v21_4 = v12_66;
                                                    String v25_4 = v13_34;
                                                    long v29_6 = v14_12;
                                                    if (v5_13 == null) {
                                                        v13_5 = v25_4;
                                                    } else {
                                                        v13_5 = v25_4;
                                                        boolean v14_5 = v29_6;
                                                        String v5_0 = 0;
                                                        while (v5_0 < v13_5) {
                                                            long v6_12;
                                                            long v6_9 = v3_9.b[v5_0];
                                                            if (!"_e".equals(v6_9.b)) {
                                                                if (v4_7 != null) {
                                                                    this.g();
                                                                    long v6_10 = com.google.android.gms.measurement.internal.ep.a(v6_9, "_et");
                                                                    if (v6_10 != 0) {
                                                                        long v6_11 = v6_10.c;
                                                                        if ((v6_11 != 0) && (v6_11.longValue() > 0)) {
                                                                            v14_5 += v6_11.longValue();
                                                                            v6_12 = 1;
                                                                            v5_0 += v6_12;
                                                                        }
                                                                    }
                                                                }
                                                                v6_12 = 1;
                                                            } else {
                                                                this.g();
                                                                if (com.google.android.gms.measurement.internal.ep.a(v6_9, "_fr") == null) {
                                                                } else {
                                                                    System.arraycopy(v3_9.b, (v5_0 + 1), v3_9.b, v5_0, ((v13_5 - v5_0) - 1));
                                                                    v13_5--;
                                                                    v5_0--;
                                                                    v6_12 = 1;
                                                                }
                                                            }
                                                        }
                                                        v29_6 = v14_5;
                                                    }
                                                    if (v13_5 < v2_1.c.size()) {
                                                        v3_9.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v3_9.b, v13_5));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_9.o, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.measurement.internal.er;
                                                            v4_12(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf(v29_6));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                String v5_21 = new com.google.android.gms.measurement.internal.er;
                                                                v5_21(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v29_6)));
                                                                v4_12 = v5_21;
                                                            } else {
                                                            }
                                                        }
                                                        String v5_24 = new com.google.android.gms.internal.measurement.dg();
                                                        v5_24.b = "_lte";
                                                        v5_24.a = Long.valueOf(this.j.m().a());
                                                        v5_24.d = ((Long) v4_12.e);
                                                        long v6_48 = 0;
                                                        while (v6_48 < v3_9.c.length) {
                                                            if (!"_lte".equals(v3_9.c[v6_48].b)) {
                                                                v6_48++;
                                                            } else {
                                                                v3_9.c[v6_48] = v5_24;
                                                                long v6_49 = 1;
                                                            }
                                                            String v5_25;
                                                            if (v6_49 != 0) {
                                                                v5_25 = 0;
                                                            } else {
                                                                v3_9.c = ((com.google.android.gms.internal.measurement.dg[]) java.util.Arrays.copyOf(v3_9.c, (v3_9.c.length + 1)));
                                                                v3_9.c[(v2_1.a.c.length - 1)] = v5_24;
                                                                v5_25 = 0;
                                                            }
                                                            if (v29_6 > v5_25) {
                                                                this.d().a(v4_12);
                                                                this.j.r().w().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_49 = 0;
                                                    }
                                                    Object v9_9;
                                                    String v1_7;
                                                    Object v4_14 = v3_9.o;
                                                    String v5_30 = v3_9.c;
                                                    long v6_55 = v3_9.b;
                                                    com.google.android.gms.common.internal.r.a(v4_14);
                                                    v3_9.A = this.e().a(v4_14, v6_55, v5_30);
                                                    try {
                                                        if (!this.j.b().d(v2_1.a.o)) {
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                        } else {
                                                            Object v4_20 = new java.util.HashMap();
                                                            String v5_35 = new com.google.android.gms.internal.measurement.da[v3_9.b.length];
                                                            long v6_7 = this.j.j().h();
                                                            int v7_10 = v3_9.b;
                                                            Boolean v8_10 = v7_10.length;
                                                            Object v9_3 = 0;
                                                            boolean v10_0 = 0;
                                                            while (v9_3 < v8_10) {
                                                                String v23_0;
                                                                int v26_0;
                                                                String v25_0;
                                                                Object v9_1;
                                                                long v27_0;
                                                                int v11_54 = v7_10[v9_3];
                                                                if (!v11_54.b.equals("_ep")) {
                                                                    long v28_1;
                                                                    com.google.android.gms.measurement.internal.d v3_122;
                                                                    Long v12_81 = this.s().e(v2_1.a.o);
                                                                    v1_0.j.j();
                                                                    boolean v14_21 = com.google.android.gms.measurement.internal.es.a(v11_54.c.longValue(), v12_81);
                                                                    v23_0 = v7_10;
                                                                    v25_0 = v8_10;
                                                                    Boolean v8_22 = Long.valueOf(1);
                                                                    if ((!android.text.TextUtils.isEmpty("_dbg")) && (v8_22 != null)) {
                                                                        v26_0 = v3_9;
                                                                        com.google.android.gms.measurement.internal.d v3_121 = v11_54.a;
                                                                        v27_0 = v9_3;
                                                                        Object v9_10 = v3_121.length;
                                                                        v28_1 = v12_81;
                                                                        Long v12_82 = 0;
                                                                        while (v12_82 < v9_10) {
                                                                            int v13_57 = v3_121[v12_82];
                                                                            if (!"_dbg".equals(v13_57.a)) {
                                                                                v12_82++;
                                                                            } else {
                                                                                if (((!(v8_22 instanceof Long)) || (!v8_22.equals(v13_57.c))) && (((!(v8_22 instanceof String)) || (!v8_22.equals(v13_57.b))) && ((!(v8_22 instanceof Double)) || (!v8_22.equals(v13_57.d))))) {
                                                                                    v3_122 = 0;
                                                                                } else {
                                                                                    v3_122 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                        v3_122 = 0;
                                                                    } else {
                                                                        v26_0 = v3_9;
                                                                        v27_0 = v9_3;
                                                                        v28_1 = v12_81;
                                                                        v3_122 = 0;
                                                                    }
                                                                    Long v12_83;
                                                                    if (v3_122 != null) {
                                                                        v12_83 = 1;
                                                                    } else {
                                                                        v12_83 = this.s().d(v2_1.a.o, v11_54.b);
                                                                    }
                                                                    if (v12_83 > null) {
                                                                        com.google.android.gms.measurement.internal.d v3_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v11_54.b));
                                                                        if (v3_1 == null) {
                                                                            v3_1 = this.d().a(v2_1.a.o, v11_54.b);
                                                                            if (v3_1 == null) {
                                                                                v1_0.j.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_1.a.o, v11_54.b);
                                                                                v3_1 = new com.google.android.gms.measurement.internal.d;
                                                                                v3_1(v2_1.a.o, v11_54.b, 1, 1, v11_54.c.longValue(), 0, 0, 0, 0, 0);
                                                                            }
                                                                        }
                                                                        Boolean v8_28;
                                                                        this.g();
                                                                        int v7_123 = ((Long) com.google.android.gms.measurement.internal.ep.b(v11_54, "_eid"));
                                                                        if (v7_123 == 0) {
                                                                            v8_28 = 0;
                                                                        } else {
                                                                            v8_28 = 1;
                                                                        }
                                                                        Boolean v8_29 = Boolean.valueOf(v8_28);
                                                                        if (v12_83 != 1) {
                                                                            if (v6_7.nextInt(v12_83) != 0) {
                                                                                p46 = v6_7;
                                                                                int v13_58;
                                                                                String v1_20;
                                                                                if (!v1_0.j.b().o(v2_1.a.o)) {
                                                                                    v9_1 = v2_1;
                                                                                    v13_58 = v7_123;
                                                                                    if (Math.abs((v11_54.c.longValue() - v3_1.f)) < 86400000) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                } else {
                                                                                    long v28_2;
                                                                                    if (v3_1.g == null) {
                                                                                        v1_0.j.j();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                        v28_2 = com.google.android.gms.measurement.internal.es.a(v11_54.d.longValue(), v28_1);
                                                                                    } else {
                                                                                        v28_2 = v3_1.g.longValue();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                    }
                                                                                    if (v28_2 == v14_21) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                }
                                                                                if (v1_20 == null) {
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v4_20.put(v11_54.b, v3_1.a(v13_58, 0, 0));
                                                                                    }
                                                                                } else {
                                                                                    this.g();
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                                    this.g();
                                                                                    long v6_89 = ((long) v12_83);
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v6_89));
                                                                                    String v1_29 = (v10_0 + 1);
                                                                                    v5_35[v10_0] = v11_54;
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v3_1 = v3_1.a(0, Long.valueOf(v6_89), Boolean.valueOf(1));
                                                                                    }
                                                                                    v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                    v10_0 = v1_29;
                                                                                }
                                                                            } else {
                                                                                this.g();
                                                                                Long v12_0 = ((long) v12_83);
                                                                                p46 = v6_7;
                                                                                v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v12_0));
                                                                                long v6_6 = (v10_0 + 1);
                                                                                v5_35[v10_0] = v11_54;
                                                                                if (v8_29.booleanValue()) {
                                                                                    v3_1 = v3_1.a(0, Long.valueOf(v12_0), 0);
                                                                                }
                                                                                v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                v9_1 = v2_1;
                                                                                v10_0 = v6_6;
                                                                            }
                                                                        } else {
                                                                            int v7_6 = (v10_0 + 1);
                                                                            v5_35[v10_0] = v11_54;
                                                                            if ((v8_29.booleanValue()) && ((v3_1.h != null) || ((v3_1.i != null) || (v3_1.j != null)))) {
                                                                                v4_20.put(v11_54.b, v3_1.a(0, 0, 0));
                                                                            }
                                                                            v9_1 = v2_1;
                                                                            p46 = v6_7;
                                                                            v10_0 = v7_6;
                                                                        }
                                                                    } else {
                                                                        v1_0.j.r().i().a("Sample rate must be positive. event, rate", v11_54.b, Integer.valueOf(v12_83));
                                                                        com.google.android.gms.measurement.internal.d v3_8 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v9_1 = v2_1;
                                                                        v10_0 = v3_8;
                                                                        p46 = v6_7;
                                                                    }
                                                                } else {
                                                                    this.g();
                                                                    Long v12_3 = ((String) com.google.android.gms.measurement.internal.ep.b(v11_54, "_en"));
                                                                    int v13_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v12_3));
                                                                    if (v13_1 == 0) {
                                                                        v13_1 = this.d().a(v2_1.a.o, v12_3);
                                                                        v4_20.put(v12_3, v13_1);
                                                                    }
                                                                    if (v13_1.h != null) {
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v9_1 = v2_1;
                                                                    } else {
                                                                        if (v13_1.i.longValue() > 1) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", v13_1.i);
                                                                        }
                                                                        if ((v13_1.j != null) && (v13_1.j.booleanValue())) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                        }
                                                                        Long v12_14 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v10_0 = v12_14;
                                                                        v9_1 = v2_1;
                                                                    }
                                                                }
                                                                v6_7 = p46;
                                                                v2_1 = v9_1;
                                                                v7_10 = v23_0;
                                                                v8_10 = v25_0;
                                                                v3_9 = v26_0;
                                                                v9_3 = (v27_0 + 1);
                                                                v1_0 = this;
                                                            }
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                            if (v10_0 < v1_7.b.length) {
                                                                v1_7.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v5_35, v10_0));
                                                            }
                                                            int v2_10 = v4_20.entrySet().iterator();
                                                            while (v2_10.hasNext()) {
                                                                this.d().a(((com.google.android.gms.measurement.internal.d) ((java.util.Map$Entry) v2_10.next()).getValue()));
                                                            }
                                                        }
                                                        try {
                                                            v1_7.e = Long.valueOf(nan);
                                                            v1_7.f = Long.valueOf(-0.0);
                                                            int v2_15 = 0;
                                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                                            String v1_2 = v0_4;
                                                            this.d().x();
                                                            throw v1_2;
                                                        }
                                                        while (v2_15 < v1_7.b.length) {
                                                            com.google.android.gms.measurement.internal.d v3_115 = v1_7.b[v2_15];
                                                            if (v3_115.c.longValue() < v1_7.e.longValue()) {
                                                                v1_7.e = v3_115.c;
                                                            }
                                                            if (v3_115.c.longValue() > v1_7.f.longValue()) {
                                                                v1_7.f = v3_115.c;
                                                            }
                                                            v2_15++;
                                                        }
                                                        Object v4_21;
                                                        int v2_17 = v9_9.a.o;
                                                        com.google.android.gms.measurement.internal.d v3_91 = this.d().b(v2_17);
                                                        if (v3_91 != null) {
                                                            v4_21 = this;
                                                            if (v1_7.b.length > 0) {
                                                                int v7_99;
                                                                String v5_38 = v3_91.i();
                                                                if (v5_38 == 0) {
                                                                    v7_99 = 0;
                                                                } else {
                                                                    v7_99 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.h = v7_99;
                                                                int v7_100 = v3_91.h();
                                                                if (v7_100 != 0) {
                                                                    v5_38 = v7_100;
                                                                } else {
                                                                }
                                                                String v5_39;
                                                                if (v5_38 == 0) {
                                                                    v5_39 = 0;
                                                                } else {
                                                                    v5_39 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.g = v5_39;
                                                                v3_91.s();
                                                                v1_7.w = Integer.valueOf(((int) v3_91.p()));
                                                                v3_91.a(v1_7.e.longValue());
                                                                v3_91.b(v1_7.f.longValue());
                                                                v1_7.x = v3_91.A();
                                                                this.d().a(v3_91);
                                                            }
                                                        } else {
                                                            v4_21 = this;
                                                            this.j.r().c_().a("Bundling raw events w/o app info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                        }
                                                        if (v1_7.b.length > 0) {
                                                            v4_21.j.u();
                                                            com.google.android.gms.measurement.internal.d v3_99 = this.s().a(v9_9.a.o);
                                                            if (v3_99 == null) {
                                                                if (!android.text.TextUtils.isEmpty(v9_9.a.y)) {
                                                                    v4_21.j.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                                } else {
                                                                    v1_7.E = Long.valueOf(-1);
                                                                }
                                                            } else {
                                                                if (v3_99.a != null) {
                                                                    v1_7.E = v3_99.a;
                                                                } else {
                                                                }
                                                            }
                                                            this.d().a(v1_7, v21_4);
                                                        }
                                                        String v1_8 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_109 = v9_9.b;
                                                        com.google.android.gms.common.internal.r.a(v3_109);
                                                        v1_8.d();
                                                        v1_8.k();
                                                        String v5_56 = new StringBuilder("rowid in (");
                                                        long v6_65 = 0;
                                                        while (v6_65 < v3_109.size()) {
                                                            if (v6_65 != 0) {
                                                                v5_56.append(",");
                                                            }
                                                            v5_56.append(((Long) v3_109.get(v6_65)).longValue());
                                                            v6_65++;
                                                        }
                                                        v5_56.append(")");
                                                        String v5_58 = v1_8.y().delete("raw_events", v5_56.toString(), 0);
                                                        if (v5_58 != v3_109.size()) {
                                                            v1_8.r().c_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_58), Integer.valueOf(v3_109.size()));
                                                        }
                                                        String v1_11 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_112 = v1_11.y();
                                                        try {
                                                            long v6_71 = new String[2];
                                                            v6_71[0] = v2_17;
                                                            v6_71[1] = v2_17;
                                                            v3_112.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_71);
                                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                                            v1_11.r().c_().a("Failed to remove unused event metadata. appId", com.google.android.gms.measurement.internal.r.a(v2_17), v0_7);
                                                        }
                                                        this.d().w();
                                                        this.d().x();
                                                        return 1;
                                                    } catch (android.database.sqlite.SQLiteException v0_2) {
                                                        v1_2 = v0_2;
                                                    }
                                                }
                                            } else {
                                                v6_3.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            com.google.android.gms.measurement.internal.d v3_0 = v0_1;
                                            try {
                                                v4_30.r().c_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.measurement.internal.r.a(v7_2), v3_0);
                                            } catch (android.database.sqlite.SQLiteException v0_6) {
                                                String v1_3 = v0_6;
                                                int v22 = v6_3;
                                                if (v22 != 0) {
                                                    v22.close();
                                                }
                                                throw v1_3;
                                            }
                                            if (v6_3 == 0) {
                                            } else {
                                                v6_3.close();
                                            }
                                        }
                                        if (v15_2.moveToNext()) {
                                            v4_30.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        }
                                        String[] v17_2;
                                        String v16_2;
                                        v15_2.close();
                                        v2_1.a(v14_10);
                                        if (v5_62 == -1) {
                                            boolean v10_59 = new String[2];
                                            v10_59[0] = v3_10;
                                            v10_59[1] = v7_2;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_2 = v10_59;
                                        } else {
                                            int v13_44 = new String[3];
                                            v13_44[0] = v3_10;
                                            v13_44[1] = v7_2;
                                            v13_44[2] = String.valueOf(v5_62);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_2 = v13_44;
                                        }
                                        v6_3 = v15_2;
                                        String v5_6 = v25_2.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v16_2, v17_2, 0, 0, "rowid", 0);
                                        try {
                                            if (!v5_6.moveToFirst()) {
                                                v4_30.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                            v22 = v5_6;
                                            v1_3 = v0_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            v6_3 = v5_6;
                                        }
                                        do {
                                            long v6_24 = v5_6.getLong(0);
                                            Long v12_70 = v5_6.getBlob(3);
                                            boolean v10_64 = com.google.android.gms.internal.measurement.iv.a(v12_70, 0, v12_70.length);
                                            Long v12_72 = new com.google.android.gms.internal.measurement.da();
                                            v12_72.a(v10_64);
                                            v12_72.b = v5_6.getString(1);
                                            v12_72.c = Long.valueOf(v5_6.getLong(2));
                                            if (v2_1.a(v6_24, v12_72)) {
                                            } else {
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } while(v5_6.moveToNext());
                                        if (v5_6 == null) {
                                        } else {
                                            v5_6.close();
                                        }
                                    } else {
                                        v4_30.r().c_().a("Raw event metadata record is missing. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        if (v15_2 == null) {
                                        } else {
                                            v15_2.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v22 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v7_2 = v3_10;
                                    v6_3 = v15_2;
                                }
                                v22 = v6_3;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v22 = v23_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v7_2 = v3_10;
                                v6_3 = v23_1;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    } else {
                        boolean v14_17;
                        int v13_52 = v5_62 cmp -1;
                        try {
                            if (v13_52 == 0) {
                                v14_17 = new String[1];
                                v14_17[0] = String.valueOf(p47);
                            } else {
                                v14_17 = new String[2];
                                v14_17[0] = String.valueOf(v5_62);
                                v14_17[1] = String.valueOf(p47);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v6_3 = 0;
                            v7_2 = 0;
                        }
                        int v13_53;
                        if (v13_52 == 0) {
                            v13_53 = "";
                        } else {
                            v13_53 = "rowid <= ? and ";
                        }
                        com.google.android.gms.measurement.internal.d v3_142 = new StringBuilder((String.valueOf(v13_53).length() + 148));
                        v3_142.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_142.append(v13_53);
                        v3_142.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v3_142.toString(), v14_17);
                        if (v3_10.moveToFirst()) {
                            int v7_9 = v3_10.getString(0);
                            try {
                                int v13_4 = v3_10.getString(1);
                                v3_10.close();
                                v23_1 = v3_10;
                                v3_10 = v7_9;
                                v7_2 = v13_4;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v6_3 = v3_10;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_0) {
                    v22 = v3_10;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v6_3 = v3_10;
                    v7_2 = 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v22 = 0;
            } catch (android.database.sqlite.SQLiteException v0_8) {
                v3_0 = v0_8;
                v6_3 = 0;
                v7_2 = 0;
            } catch (android.database.sqlite.SQLiteException v0_4) {
            }
        } catch (android.database.sqlite.SQLiteException v0_4) {
        }
    }

Method com.google.android.gms.measurement.internal.o.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) {
            try {
                android.database.Cursor v0_3 = p8.rawQuery("PRAGMA journal_mode=memory", 0);
                v0_3.moveToFirst();
            } catch (Throwable v8_1) {
                if (v0_3 != null) {
                    v0_3.close();
                }
                throw v8_1;
            }
            if (v0_3 != null) {
                v0_3.close();
            }
        }
        com.google.android.gms.measurement.internal.fh.a(this.a.r(), 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.measurement.internal.fh.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.measurement.af.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p9)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_13 = p9.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_13.moveToFirst();
                v0_13.close();
            } catch (android.database.sqlite.SQLiteException v9_10) {
                v0_13.close();
                throw v9_10;
            }
        }
        String v1_3 = 0;
        if (this.a(p9, "hits2")) {
            String v0_6 = com.google.android.gms.internal.measurement.af.b(p9, "hits2");
            boolean v3_1 = 0;
            while (v3_1 < 4) {
                String v4_2 = new String[] {"hit_id", "hit_string", "hit_time", "hit_url"})[v3_1];
                if (v0_6.remove(v4_2)) {
                    v3_1++;
                } else {
                    String v0_12;
                    String v1_5 = String.valueOf(v4_2);
                    if (v1_5.length() == 0) {
                        v0_12 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_12 = "Database hits2 is missing required column: ".concat(v1_5);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_12);
                }
            }
            int v2_5 = (v0_6.remove("hit_app_id") ^ 1);
            if (!v0_6.isEmpty()) {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            } else {
                if (v2_5 != 0) {
                    p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
                }
            }
        } else {
            p9.execSQL(com.google.android.gms.internal.measurement.ae.B());
        }
        if (this.a(p9, "properties")) {
            android.database.sqlite.SQLiteException v9_6 = com.google.android.gms.internal.measurement.af.b(p9, "properties");
            String v4 = "tid";
            String v6 = "adid";
            while (v1_3 < 6) {
                int v2_9 = new String[] {"app_uid", "hits_count"})[v1_3];
                if (v9_6.remove(v2_9)) {
                    v1_3++;
                } else {
                    String v0_1;
                    String v1_8 = String.valueOf(v2_9);
                    if (v1_8.length() == 0) {
                        v0_1 = new String("Database properties is missing required column: ");
                    } else {
                        v0_1 = "Database properties is missing required column: ".concat(v1_8);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_1);
                }
            }
            if (!v9_6.isEmpty()) {
                throw new android.database.sqlite.SQLiteException("Database properties table has extra columns");
            } else {
                return;
            }
        } else {
            p9.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
            return;
        }
    }

Method com.google.android.gms.internal.measurement.af.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.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static declared_synchronized boolean a(android.content.Context p12, com.baidu.android.pushservice.c.e p13)
    {
        try {
        } catch (long v12_4) {
            throw v12_4;
        }
        long v12_1 = ark>com.baidu.android.pushservice.c.cark>.a(p12);
        int v2_0 = 0;
        if (v12_1 != 0) {
            String v3_5 = new android.content.ContentValues();
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.b.name(), p13.a);
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.c.name(), p13.b);
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.d.name(), p13.d);
            int v4_6 = ark>com.baidu.android.pushservice.c.cark>$f.e.name();
            long v5_4 = new StringBuilder();
            v5_4.append(System.currentTimeMillis());
            v5_4.append("");
            v3_5.put(v4_6, v5_4.toString());
            android.database.Cursor v7 = 0;
            long v8_1 = v12_1.insert("PushVerifInfo", 0, v3_5);
            v7 = v12_1.rawQuery("SELECT COUNT(*) FROM PushVerifInfo;", 0);
            if ((v7.moveToFirst()) && (v7.getInt(0) > 200)) {
                String[] v11 = new String[1];
                v11[0] = p13.a;
                v12_1.delete("PushVerifInfo", " msgId IS NOT ?", v11);
            }
            if ((v7 == null) || (v7.isClosed())) {
                v12_1.close();
                if (v8_1 != -1) {
                    v2_0 = 1;
                }
                return v2_0;
            } else {
                v7.close();
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.a.e() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static boolean e(android.content.Context p16, String p17)
    {
        try {
            android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.a.e(p16);
        } catch (boolean v0_2) {
            throw v0_2;
        }
        if (v10 != null) {
            android.database.Cursor v12 = 0;
            try {
                android.content.ContentValues v14_1 = new android.content.ContentValues();
                v14_1.clear();
                v14_1.put(com.baidu.android.pushservice.c.a$h.b.name(), p17);
                v14_1.put(com.baidu.android.pushservice.c.a$h.c.name(), Long.valueOf(System.currentTimeMillis()));
                boolean v2_5 = new StringBuilder();
                v2_5.append(com.baidu.android.pushservice.c.a$h.b.name());
                v2_5.append(" =? ");
                String v15 = v2_5.toString();
                String[] v4_1 = new String[1];
                v4_1[0] = com.baidu.android.pushservice.c.a$h.b.name();
                String[] v6 = new String[1];
                v6[0] = p17;
                boolean v2_9 = v10.query("MsgArriveApp", v4_1, v15, v6, 0, 0, 0);
                try {
                    if ((!v2_9) || (v2_9.getCount() <= 0)) {
                        v2_9 = v10.rawQuery("SELECT COUNT(*) FROM MsgArriveApp;", 0);
                        v2_9.moveToFirst();
                        if (v2_9.getInt(0) > com.baidu.android.pushservice.c.a.c) {
                            v10.delete("MsgArriveApp", 0, 0);
                        }
                        v10.insert("MsgArriveApp", 0, v14_1);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 1;
                    } else {
                        String[] v4_0 = new String[1];
                        v4_0[0] = p17;
                        v10.update("MsgArriveApp", v14_1, v15, v4_0);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 0;
                    }
                } catch (boolean v0_7) {
                    v12 = v2_9;
                    if (v12 != null) {
                        if (!v12.isClosed()) {
                            v12.close();
                        }
                    }
                    v10.close();
                    throw v0_7;
                } catch (Exception) {
                    v12 = v2_9;
                    if (!com.baidu.android.pushservice.a.d(p16)) {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 1;
                    } else {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 0;
                    }
                }
            } catch (boolean v0_7) {
            }
        } else {
            return 1;
        }
    }

Method com.baidu.android.pushservice.c.a.c() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static void c(android.content.Context p8)
    {
        try {
            android.database.sqlite.SQLiteDatabase v1 = com.baidu.android.pushservice.c.a.e(p8);
        } catch (Throwable v8_2) {
            throw v8_2;
        }
        if (v1 != null) {
            android.database.Cursor v3_1 = v1.rawQuery("SELECT * FROM AlarmMsgInfo;", 0);
            while (v3_1.moveToNext()) {
                String v2_1 = new com.baidu.android.pushservice.g.a();
                v2_1.a = v3_1.getString(v3_1.getColumnIndex(com.baidu.android.pushservice.c.a$a.b.name()));
                v2_1.b = v3_1.getLong(v3_1.getColumnIndex(com.baidu.android.pushservice.c.a$a.c.name()));
                v2_1.c = v3_1.getLong(v3_1.getColumnIndex(com.baidu.android.pushservice.c.a$a.d.name()));
                v2_1.d = v3_1.getLong(v3_1.getColumnIndex(com.baidu.android.pushservice.c.a$a.e.name()));
                v2_1.e = v3_1.getInt(v3_1.getColumnIndex(com.baidu.android.pushservice.c.a$a.g.name()));
                v2_1.f = v3_1.getInt(v3_1.getColumnIndex(com.baidu.android.pushservice.c.a$a.f.name()));
                if ((v2_1.f == 0) || (v2_1.d < System.currentTimeMillis())) {
                    com.baidu.android.pushservice.c.a.d(p8, v2_1.a);
                }
            }
            if (v3_1 == null) {
                v1.close();
                return;
            } else {
                v3_1.close();
            }
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.a.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static boolean b(android.content.Context p4, long p5, long p7)
    {
        try {
            Throwable v4_1 = com.baidu.android.pushservice.c.a.e(p4);
        } catch (Throwable v4_2) {
            throw v4_2;
        }
        if (v4_1 != null) {
            StringBuilder v2_1 = new StringBuilder();
            v2_1.append("SELECT ");
            v2_1.append(com.baidu.android.pushservice.c.a$c.b.name());
            v2_1.append(" FROM ");
            v2_1.append("PushBehavior");
            v2_1.append(" WHERE ");
            v2_1.append(com.baidu.android.pushservice.c.a$c.c.name());
            v2_1.append(" < ");
            v2_1.append(p5);
            v2_1.append(" AND ");
            v2_1.append(com.baidu.android.pushservice.c.a$c.c.name());
            v2_1.append(" >= ");
            v2_1.append(p7);
            v2_1.append(" ;");
            android.database.Cursor v6_1 = v4_1.rawQuery(v2_1.toString(), 0);
            int v5_7 = 0;
            while (v6_1.moveToNext()) {
                boolean v7_3 = v6_1.getString(0);
                if ((!android.text.TextUtils.isEmpty(v7_3)) && (!v7_3.startsWith(com.baidu.android.pushservice.g.l.t))) {
                    v5_7 = 1;
                }
            }
            if (v6_1 != null) {
                v6_1.close();
            }
            if (v5_7 == 0) {
                return v5_7;
            } else {
                v4_1.close();
                return v5_7;
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()

Couldn't retrieve source code

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static java.util.List a(android.content.Context p5, long p6, long p8, int p10)
    {
        try {
            Throwable v5_2 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (Throwable v5_1) {
            throw v5_1;
        }
        if (v5_2 != null) {
            java.util.ArrayList v2_1 = new java.util.ArrayList();
            StringBuilder v3_1 = new StringBuilder();
            v3_1.append("SELECT * FROM PushBehavior WHERE ");
            v3_1.append(ark>com.baidu.android.pushservice.c.aark>$c.c.name());
            v3_1.append(" < ");
            v3_1.append(p6);
            v3_1.append(" AND ");
            v3_1.append(ark>com.baidu.android.pushservice.c.aark>$c.c.name());
            v3_1.append(" >= ");
            v3_1.append(p8);
            v3_1.append(" LIMIT ");
            v3_1.append(p10);
            v3_1.append(";");
            android.database.Cursor v1_1 = v5_2.rawQuery(v3_1.toString(), 0);
            while (v1_1.moveToNext()) {
                com.baidu.android.pushservice.g.e v6_11 = new com.baidu.android.pushservice.g.e();
                v6_11.a(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.a.name())));
                v6_11.a(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.b.name())));
                v6_11.f(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.l.name())));
                v6_11.g(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.m.name())));
                v6_11.e(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.k.name())));
                v6_11.d(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.h.name())));
                v6_11.c(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.f.name())));
                v6_11.c(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.g.name())));
                v6_11.b(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.e.name())));
                v6_11.b(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.d.name())));
                v6_11.i(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.n.name())));
                v6_11.e(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.i.name())));
                v6_11.d(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.j.name())));
                v6_11.a(v1_1.getLong(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.c.name())));
                v6_11.h(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$c.o.name())));
                v2_1.add(v6_11);
            }
            if (v1_1 == null) {
                v5_2.close();
                return v2_1;
            } else {
                v1_1.close();
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static java.util.List a(android.content.Context p5)
    {
        try {
            Throwable v5_1 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (Throwable v5_2) {
            throw v5_2;
        }
        if (v5_1 != null) {
            Throwable v2_2 = new java.util.ArrayList();
            android.database.Cursor v1_1 = v5_1.rawQuery("SELECT * FROM AppInfo;", 0);
            while (v1_1.moveToNext()) {
                com.baidu.android.pushservice.g.i v3_2 = new com.baidu.android.pushservice.g.i();
                v3_2.a(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.b.name())));
                v3_2.c(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.c.name())));
                v3_2.b(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.d.name())));
                v3_2.c(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.e.name())));
                v3_2.d(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.f.name())));
                v3_2.a(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.g.name())));
                v3_2.e(v1_1.getString(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.h.name())));
                v3_2.b(v1_1.getInt(v1_1.getColumnIndex(ark>com.baidu.android.pushservice.c.aark>$b.i.name())));
                v2_2.add(v3_2);
            }
            if (v1_1 == null) {
                v5_1.close();
                return v2_2;
            } else {
                v1_1.close();
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static int a(android.content.Context p4, long p5, long p7)
    {
        try {
            Throwable v4_1 = ark>com.baidu.android.pushservice.c.aark>.e(p4);
        } catch (Throwable v4_2) {
            throw v4_2;
        }
        if (v4_1 != null) {
            StringBuilder v2_1 = new StringBuilder();
            v2_1.append("SELECT COUNT(*) FROM PushBehavior WHERE ");
            v2_1.append(ark>com.baidu.android.pushservice.c.aark>$c.c.name());
            v2_1.append(" < ");
            v2_1.append(p5);
            v2_1.append(" AND ");
            v2_1.append(ark>com.baidu.android.pushservice.c.aark>$c.c.name());
            v2_1.append(" >= ");
            v2_1.append(p7);
            v2_1.append(" ;");
            android.database.Cursor v6_1 = v4_1.rawQuery(v2_1.toString(), 0);
            v6_1.moveToFirst();
            int v1_1 = v6_1.getInt(0);
            if (v6_1 == null) {
                v4_1.close();
                return v1_1;
            } else {
                v6_1.close();
            }
        } else {
            return 0;
        }
    }

Method io.fabric.sdk.android.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.fabric.sdk.android.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.sophos.smsec.core.datastore.b.f() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    public declared_synchronized void f(String p7)
    {
        try {
            String v1_3 = this.a(1);
            StringBuilder v2_4 = new android.content.ContentValues();
            v2_4.put("packagename", p7);
            try {
                this.E();
            } catch (String v7_1) {
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "inserting into DB table rescan_list failed.", v7_1);
                this.b(0);
                return;
            }
            if (-1 == v1_3.insertOrThrow("rescan_list", 0, v2_4)) {
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", "inserting into DB table rescan_list failed.");
            }
            StringBuilder v2_2 = new StringBuilder();
            v2_2.append("Added to VirusRescanTable: ");
            v2_2.append(p7);
            android.util.Log.d("SMSEC_VIRUS_RESCAN", v2_2.toString());
            this.b(1);
            return;
        } catch (String v7_2) {
            throw v7_2;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    public declared_synchronized void a(String p5, com.sophos.smsec.core.datastore.DataStore$AllowListEntryOriginator p6)
    {
        try {
            long v1_1 = this.a(1);
            android.content.ContentValues v2_1 = new android.content.ContentValues();
            v2_1.put("packagename", p5);
            v2_1.put("originator", Integer.valueOf(p6.mValue));
            try {
                this.E();
            } catch (int v5_5) {
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "inserting into DB table quarantine_allowlist failed.", v5_5);
                this.b(0);
                return;
            }
            if (-1 == v1_1.insertOrThrow("quarantine_allowlist", 0, v2_1)) {
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", "inserting into DB table quarantine_allowlist failed.");
            }
            this.b(1);
            return;
        } catch (int v5_7) {
            throw v5_7;
        }
    }

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


    private final boolean a(int p17, byte[] p18)
    {
        this.b();
        this.d();
        Long v2_5 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p17));
            v3_1.put("entry", p18);
            Long v4_4 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_4) {
                int v7 = 0;
                try {
                    int v9 = this.y();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_1 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            try {
                                if ((v12 != 0) && (v12.moveToFirst())) {
                                    v10_1 = v12.getLong(v2_5);
                                }
                                if (v10_1 >= 100000) {
                                    this.r().c_().a("Data loss, local db full");
                                    long v13_2 = ((100000 - v10_1) + 1);
                                    String[] v11 = new String[1];
                                    v11[v2_5] = Long.toString(v13_2);
                                    Long v10_4 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                    if (v10_4 != v13_2) {
                                        this.r().c_().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_4), Long.valueOf((v13_2 - v10_4)));
                                    }
                                }
                                v9.insertOrThrow("messages", 0, v3_1);
                                v9.setTransactionSuccessful();
                                v9.endTransaction();
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                return 1;
                            } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                v7 = v12;
                                android.os.SystemClock.sleep(((long) v6));
                                v6 += 20;
                                if (v7 != 0) {
                                    v7.close();
                                }
                                if (v9 == 0) {
                                    v5++;
                                    v2_5 = 0;
                                    v4_4 = 5;
                                } else {
                                    v9.close();
                                }
                            }
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_5;
                        }
                        v7 = v9;
                        if (v7 != 0) {
                            try {
                                if (v7.inTransaction()) {
                                    v7.endTransaction();
                                }
                            } catch (com.google.android.gms.measurement.internal.t v0_1) {
                                v9 = v7;
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                throw v0_1;
                            }
                        }
                        this.r().c_().a("Error writing entry to local database", com.google.android.gms.measurement.internal.t v0_0);
                        this.b = 1;
                        if (v12 != 0) {
                            v12.close();
                        }
                        if (v7 == 0) {
                        } else {
                            v7.close();
                        }
                    } catch (com.google.android.gms.measurement.internal.t v0_3) {
                        this.r().c_().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.measurement.internal.t v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.measurement.internal.t v0_1) {
                    v9 = 0;
                    v12 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_3) {
                    v9 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v9 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_1) {
                    v12 = v7;
                }
            }
            this.r().i().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized boolean a(String p17, int p18)
    {
        int v2_0 = 1;
        try {
            android.database.sqlite.SQLiteDatabase v11 = this.a(1);
            android.content.ContentValues v12_1 = new android.content.ContentValues();
            v12_1.clear();
            v12_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString(), p17);
            v12_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.toString(), Integer.valueOf(p18));
            String v3_22 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
            String v4_19 = new byte[1];
            String v13 = 0;
            v4_19[0] = 0;
            v12_1.put(v3_22, v4_19);
            this.E();
            try {
                String v3_36;
                String v3_25 = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString();
                String v4_21 = new StringBuilder();
                v4_21.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString());
                v4_21.append(" =?");
                String v4_22 = v4_21.toString();
                long v5_14 = new String[1];
                v5_14[0] = p17;
            } catch (boolean v0_9) {
                String v3_21 = new StringBuilder();
                v3_21.append("inserting into DB table ");
                v3_21.append(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString());
                v3_21.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v3_21.toString(), v0_9);
                this.b(v13);
                return v13;
            }
            if (0 != ((long) v11.update(v3_25, v12_1, v4_22, v5_14))) {
                String v4_25;
                String v4_23 = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString();
                String v3_32 = new StringBuilder();
                v3_32.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString());
                v3_32.append(" = \'");
                v3_32.append(p17);
                v3_32.append("\'");
                String v3_34 = v11.query(v4_23, new String[] {"key"}), v3_32.toString(), 0, 0, 0, 0);
                if (!v3_34.moveToFirst()) {
                    v4_25 = -1;
                } else {
                    v4_25 = ((long) v3_34.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.getColumnIndex(v3_34)));
                }
                v3_34.close();
                v3_36 = v4_25;
            } else {
                v3_36 = v11.insert(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString(), 0, v12_1);
            }
            if (-1 != v3_36) {
                if (!com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.hasHash()) {
                    v13 = 1;
                    this.b(v13);
                    return v13;
                } else {
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", "updated entry in ignored URL table.");
                    ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v3_36).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(p17.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(p18).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    v12_1.clear();
                    v12_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                    String v3_9 = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString();
                    String v4_8 = new StringBuilder();
                    v4_8.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.URL.toString());
                    v4_8.append("=?");
                    String v4_9 = v4_8.toString();
                    long v5_9 = new String[1];
                    v5_9[0] = p17;
                    if (1 != ((long) v11.update(v3_9, v12_1, v4_9, v5_9))) {
                        String v3_13 = new StringBuilder();
                        v3_13.append("inserting hash value into DB table ");
                        v3_13.append(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString());
                        v3_13.append(" failed.");
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v3_13.toString());
                    }
                    if ((com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.hasVerticalHash()) && (!ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE))) {
                        v2_0 = 0;
                    }
                    v13 = v2_0;
                    this.b(v13);
                    return v13;
                }
            } else {
                int v2_2 = new StringBuilder();
                v2_2.append("inserting into DB table ");
                v2_2.append(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString());
                v2_2.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v2_2.toString());
                this.b(v13);
                return v13;
            }
        } catch (boolean v0_10) {
            throw v0_10;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized boolean a(android.content.ContentValues p20)
    {
        try {
            int v14_0;
            String v3_0;
            android.database.sqlite.SQLiteDatabase v13 = this.a(1);
            this.E();
            String v4_46 = this.b(v13);
            int v12_0 = 0;
            int v16 = 0;
        } catch (boolean v0_22) {
            throw v0_22;
        }
        if (v4_46 <= 0) {
            v14_0 = 0;
            v3_0 = 0;
        } else {
            boolean v0_3 = new android.content.ContentValues();
            v0_3.put("type", Integer.valueOf(1));
            String v7_11 = com.sophos.smsec.core.datastore.DataStore.c().getString(com.sophos.smsec.core.datastore.e$c.log_log_pruned);
            String[] v8_2 = new Object[1];
            v8_2[0] = Long.valueOf(v4_46);
            v0_3.put("description", String.format(v7_11, v8_2));
            v0_3.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), Byte.valueOf(0));
            try {
                String v4_45 = v13.insert(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), 0, v0_3);
            } catch (boolean v0_0) {
                v14_0 = 0;
                String v4_14 = new StringBuilder();
                v4_14.append("inserting into DB table ");
                v4_14.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
                v4_14.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v4_14.toString(), v0_0);
                v3_0 = v12_0;
            }
            if (-1 != v4_45) {
                String v7_13 = new StringBuilder();
                v7_13.append("new entry to table ");
                v7_13.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
                v7_13.append(" added. ID=");
                v7_13.append(v4_45);
                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v7_13.toString());
            } else {
                String v7_16 = new StringBuilder();
                v7_16.append("inserting into DB table ");
                v7_16.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
                v7_16.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v7_16.toString());
            }
            int v11_1 = new String[1];
            v11_1[0] = String.valueOf(v4_45);
            String v3_6 = v11_1;
            v14_0 = 0;
            try {
                v12_0 = v13.query(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), 0, "key=?", v11_1, 0, 0, 0, 0);
                try {
                    if ((v12_0.moveToFirst()) && ((v12_0.getColumnCount() > 0) && (com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasHash()))) {
                        ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v12_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.getColumnIndex(v12_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(v12_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.getColumnIndex(v12_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v12_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.getColumnIndex(v12_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        ark>com.sophos.smsec.core.datastore.bark>.b.update(v12_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.DESCRIPTION.getColumnIndex(v12_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                        v12_0.close();
                        v0_3.clear();
                        v0_3.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                        String v3_1 = ((long) v13.update(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), v0_3, "key=?", v3_6));
                        StringBuilder v5_25 = new StringBuilder();
                        v5_25.append("updated ");
                        v5_25.append(v3_1);
                        v5_25.append(" rows in hash table.");
                        com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v5_25.toString());
                    }
                } catch (boolean v0_0) {
                }
                v3_0 = v12_0;
            } catch (boolean v0_0) {
                v12_0 = 0;
            }
        }
        p20.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), Byte.valueOf(0));
        try {
            int v14_1;
            String v4_17 = v13.insert(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), v14_0, p20);
        } catch (boolean v0_18) {
            String v4_40 = new StringBuilder();
            v4_40.append("inserting into DB table ");
            v4_40.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
            v4_40.append(" failed.");
            com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v4_40.toString(), v0_18);
            boolean v0_19 = 0;
        }
        if (-1 != v4_17) {
            String v6_9 = new StringBuilder();
            v6_9.append("new entry to table ");
            v6_9.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
            v6_9.append(" added. ID=");
            v6_9.append(v4_17);
            com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v6_9.toString());
            v14_1 = 1;
        } else {
            String v6_12 = new StringBuilder();
            v6_12.append("inserting into DB table ");
            v6_12.append(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString());
            v6_12.append(" failed.");
            com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v6_12.toString());
            v14_1 = 1;
        }
        boolean v0_13 = new String[v14_1];
        v0_13[0] = String.valueOf(v4_17);
        v3_0 = v13.query(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), 0, "key=?", v0_13, 0, 0, 0, 0);
        if ((v3_0.moveToFirst()) && (v3_0.getColumnCount() > 0)) {
            if (!com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasHash()) {
                v16 = 1;
            } else {
                ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v3_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.getColumnIndex(v3_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(v3_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.getColumnIndex(v3_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v3_0.getInt(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.getColumnIndex(v3_0))).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(v3_0.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.DESCRIPTION.getColumnIndex(v3_0)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                v3_0.close();
                p20.clear();
                p20.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                String v4_36 = ((long) v13.update(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), p20, "key=?", v0_13));
                String v2_2 = new StringBuilder();
                v2_2.append("updated ");
                v2_2.append(v4_36);
                v2_2.append(" rows in hash table.");
                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v2_2.toString());
                if ((com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasVerticalHash()) && (!ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG))) {
                    v14_1 = 0;
                }
                v16 = v14_1;
            }
        }
        v0_19 = v16;
        if ((v3_0 != null) && (!v3_0.isClosed())) {
            v3_0.close();
        }
        this.b(v0_19);
        return v0_19;
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized boolean a(int p6, int p7, String p8)
    {
        try {
            String v1_0 = this.a(1);
            android.content.ContentValues v2_1 = new android.content.ContentValues();
            v2_1.clear();
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_ID.toString(), Integer.valueOf(p6));
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_COUNT.toString(), Integer.valueOf(p7));
        } catch (String v6_14) {
            throw v6_14;
        }
        if (p8 != null) {
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_INFO.toString(), p8);
        }
        int v7_2 = 0;
        v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_IGNORE.toString(), Boolean.valueOf(0));
        try {
            if (-1 != v1_0.insert(com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString(), 0, v2_1)) {
                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", "add entry in alert items table.");
                v7_2 = 1;
            } else {
                String v8_5 = new StringBuilder();
                v8_5.append("inserting into DB table ");
                v8_5.append(com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString());
                v8_5.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v8_5.toString());
            }
        } catch (String v6_13) {
            String v0_6 = new StringBuilder();
            v0_6.append("inserting into DB table ");
            v0_6.append(com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString());
            v0_6.append(" failed.");
            com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v0_6.toString(), v6_13);
        }
        return v7_2;
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized long a(String p22, String p23, String p24, int p25)
    {
        try {
            android.database.sqlite.SQLiteDatabase v14 = this.a(1);
            android.content.ContentValues v15_1 = new android.content.ContentValues();
            v15_1.clear();
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_IDENTIFIER.toString(), p22);
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.FINGERPRINT.toString(), p23);
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_NAME.toString(), p24);
            v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_TYPE.toString(), Integer.valueOf(p25));
            java.nio.charset.Charset v5_10 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
            String v6_1 = new byte[1];
            v6_1[0] = 0;
            v15_1.put(v5_10, v6_1);
            try {
                v14.beginTransaction();
                long v19 = v14.insert(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString(), 0, v15_1);
            } catch (com.sophos.smsec.core.datastore.DataStore$Table v0_10) {
                v14.endTransaction();
                throw v0_10;
            } catch (RuntimeException) {
                v14.endTransaction();
                return -1;
            }
            if ((v19 >= 0) && (com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.hasHash())) {
                ark>com.sophos.smsec.core.datastore.bark>.b.reset();
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(v19).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(p22.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(p23.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(p24.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                ark>com.sophos.smsec.core.datastore.bark>.b.update(String.valueOf(p25).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                String v6_6 = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString();
                String[] v9 = new String[1];
                v9[0] = String.valueOf(v19);
                com.sophos.smsec.core.datastore.DataStore$Table v0_18 = v14.query(v6_6, 0, "key=?", v9, 0, 0, 0, 0);
                if (!v0_18.moveToFirst()) {
                    String v2_1 = new StringBuilder();
                    v2_1.append("inserting hash value into DB table ");
                    v2_1.append(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString());
                    v2_1.append(" failed.");
                    com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v2_1.toString());
                    v14.endTransaction();
                    return -1;
                } else {
                    ark>com.sophos.smsec.core.datastore.bark>.b.update(v0_18.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.getColumnIndex(v0_18)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                    v0_18.close();
                    v15_1.clear();
                    v15_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), ark>com.sophos.smsec.core.datastore.bark>.b.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                    com.sophos.smsec.core.datastore.DataStore$Table v0_5 = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString();
                    String v3_11 = new String[1];
                    v3_11[0] = String.valueOf(v19);
                    if (1 != ((long) v14.update(v0_5, v15_1, "key=?", v3_11))) {
                        String v2_9 = new StringBuilder();
                        v2_9.append("inserting hash value into DB table ");
                        v2_9.append(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString());
                        v2_9.append(" failed.");
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", v2_9.toString());
                    }
                    ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE);
                }
            }
            v14.setTransactionSuccessful();
            v14.endTransaction();
            return v19;
        } catch (com.sophos.smsec.core.datastore.DataStore$Table v0_11) {
            throw v0_11;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    static boolean a(com.sophos.smsec.core.datastore.DataStore$Table p26, boolean p27, android.database.sqlite.SQLiteDatabase p28)
    {
        if (p26.hasVerticalHash()) {
            int v3 = (p27 & p26.hasHash());
            ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore.c());
            try {
                android.database.sqlite.SQLiteDatabase v15;
                long v0_1 = com.sophos.smsec.core.datastore.DataStore$TableColumn.ROWID.toString();
                android.content.ContentValues v14_1 = new android.content.ContentValues();
            } catch (long v0_24) {
                throw v0_24;
            }
            if (p28 != 0) {
                v15 = p28;
            } else {
                v15 = com.sophos.smsec.core.datastore.DataStore.a(com.sophos.smsec.core.datastore.DataStore.c()).a(1);
            }
            String v12_1;
            if (v3 == 0) {
                v12_1 = 0;
            } else {
                v12_1 = ark>com.sophos.smsec.core.datastore.bark>.b();
            }
            StringBuilder v11_5 = ark>com.sophos.smsec.core.datastore.bark>.b();
            int v16 = 0;
            if (v11_5 != null) {
                if ((p26 != com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS) && (p26 != com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS)) {
                    int v17 = 1;
                } else {
                    v17 = 0;
                }
                String v18;
                String vtmp11 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
                if (v3 == 0) {
                    v18 = vtmp11;
                } else {
                    v15.beginTransaction();
                    v18 = "*";
                }
                v11_5.reset();
                v11_5.update(p26.toString().getBytes(java.nio.charset.StandardCharsets.UTF_8));
                long v19 = 0;
                long v21 = 0;
                while(true) {
                    String v8_9;
                    long v6_1;
                    int v13_0;
                    long v6_4 = p26.toString();
                    int v7_12 = new String[2];
                    v7_12[0] = v18;
                    v7_12[1] = ark>com.sophos.smsec.core.datastore.bark>.a;
                    String v10_5 = new Object[1];
                    v10_5[0] = Long.valueOf(v21);
                    boolean v25 = v11_5;
                    int v28_1 = v12_1;
                    String v5_30 = v15.query(v6_4, v7_12, 0, 0, 0, 0, v0_1, String.format(java.util.Locale.US, "%d, 1000", v10_5));
                    if (!v5_30.moveToFirst()) {
                        v13_0 = v28_1;
                        v8_9 = v25;
                        v6_1 = 0;
                    } else {
                        long v6_7 = com.sophos.smsec.core.datastore.DataStore$TableColumn.VALUE_BOOLEAN.getColumnIndex(v5_30);
                        while(true) {
                            if (v3 == 0) {
                                v13_0 = v28_1;
                                v8_9 = v25;
                                if (v17 == 0) {
                                    v8_9.update(v5_30.getString(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.getColumnIndex(v5_30)).getBytes(java.nio.charset.StandardCharsets.UTF_8));
                                } else {
                                    v8_9.update(v5_30.getBlob(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.getColumnIndex(v5_30)));
                                }
                            } else {
                                v28_1.reset();
                                int v7_5 = 0;
                                while (v7_5 < v5_30.getColumnCount()) {
                                    int v13_1;
                                    if (com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString().equals(v5_30.getColumnName(v7_5))) {
                                        v13_1 = v28_1;
                                    } else {
                                        if (com.sophos.smsec.core.datastore.DataStore$TableColumn.ROWID.toString().equals(v5_30.getColumnName(v7_5))) {
                                            v13_1 = v28_1;
                                        } else {
                                            String v8_17 = v5_30.getString(v7_5);
                                            if (v8_17 == null) {
                                                v13_1 = v28_1;
                                            } else {
                                                if ((p26 == com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES) && (v6_7 == v7_5)) {
                                                    String v8_19;
                                                    if (v5_30.getInt(v7_5) == 0) {
                                                        v8_19 = 0;
                                                    } else {
                                                        v8_19 = 1;
                                                    }
                                                    v8_17 = String.valueOf(v8_19);
                                                }
                                                v13_1 = v28_1;
                                                v13_1.update(v8_17.getBytes(java.nio.charset.StandardCharsets.UTF_8));
                                            }
                                        }
                                    }
                                    v7_5++;
                                    v28_1 = v13_1;
                                }
                                int v7_7;
                                v13_0 = v28_1;
                                v14_1.clear();
                                if (v17 == 0) {
                                    v7_7 = v13_0.digest(ark>com.sophos.smsec.core.datastore.bark>.H());
                                } else {
                                    v7_7 = v13_0.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a());
                                }
                                v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v7_7);
                                String v8_3 = p26.toString();
                                java.nio.charset.Charset v9_2 = new StringBuilder();
                                v9_2.append(v0_1);
                                v9_2.append("=?");
                                java.nio.charset.Charset v9_3 = v9_2.toString();
                                String v10_1 = new String[1];
                                v10_1[0] = String.valueOf(v5_30.getInt(v5_30.getColumnIndex(v0_1)));
                                String v8_5 = ((long) v15.update(v8_3, v14_1, v9_3, v10_1));
                                StringBuilder v11_4 = new StringBuilder();
                                v11_4.append("updated ");
                                v11_4.append(v8_5);
                                v11_4.append(" hash rows in table ");
                                v11_4.append(p26.toString());
                                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v11_4.toString());
                                v8_9 = v25;
                                v8_9.update(v7_7);
                            }
                            if (v5_30.moveToNext()) {
                                break;
                            }
                            v6_1 = ((long) v5_30.getCount());
                        }
                        v25 = v8_9;
                        v28_1 = v13_0;
                    }
                    v21 += 1000;
                    v5_30.close();
                    if (v6_1 != 1000) {
                        break;
                    }
                    v11_5 = v8_9;
                    v12_1 = v13_0;
                }
                v14_1.clear();
                v14_1.put("tablename", p26.toString());
                if (v17 == 0) {
                    v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v8_9.digest(ark>com.sophos.smsec.core.datastore.bark>.H()));
                } else {
                    v14_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString(), v8_9.digest(com.sophos.smsec.core.datastore.SmSecPreferences.c(com.sophos.smsec.core.datastore.DataStore.c()).a()));
                }
                try {
                    long v0_9 = com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString();
                    String v10_3 = new String[1];
                    v10_3[0] = p26.toString();
                    long v6_2 = ((long) v15.update(v0_9, v14_1, "tablename=?", v10_3));
                } catch (long v0_18) {
                    if (v3 != 0) {
                        v15.endTransaction();
                    }
                    throw v0_18;
                } catch (long v0_17) {
                    com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "inserting into or updating of hash table failed.", v0_17);
                    if (v3 == 0) {
                        if ((1 == v6_2) || (-1 != v19)) {
                            v16 = 1;
                        }
                        return v16;
                    } else {
                        v15.endTransaction();
                    }
                    if (v3 == 0) {
                    } else {
                    }
                }
                if (0 != v6_2) {
                    String v5_12 = new StringBuilder();
                    v5_12.append("updated entry in hash table. Name=");
                    v5_12.append(p26.toString());
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v5_12.toString());
                } else {
                    v19 = v15.insert(com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString(), 0, v14_1);
                    if (-1 == v19) {
                        com.sophos.smsec.core.smsectrace.d.d("SMSec: DataBase", "inserting into hash table failed.");
                    }
                }
                if (v3 != 0) {
                    v15.setTransactionSuccessful();
                }
            } else {
                return 0;
            }
        } else {
            return 1;
        }
    }

Method com.sophos.smsec.core.statistics.c.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    private static void a(android.content.Context p3, android.content.ContentValues p4)
    {
        try {
            Exception v3_2 = com.sophos.smsec.core.statistics.ScanStatistics.a().a(p3);
            v3_2.delete("webfiltering", "timestamp < datetime(\'now\', \'-84 days\')", 0);
            v3_2.insert("webfiltering", 0, p4);
        } catch (Exception v3_1) {
            com.sophos.smsec.core.smsectrace.d.c("WebFilteringStatistics", "writing last web-filtering statistics failed.", v3_1);
        }
        return;
    }

Method com.sophos.smsec.core.statistics.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    private static void a(android.content.Context p3, android.content.ContentValues p4)
    {
        try {
            Exception v3_2 = com.sophos.smsec.core.statistics.ScanStatistics.a().a(p3);
            v3_2.delete("permissionHistory", "timestamp < datetime(\'now\', \'-21 days\')", 0);
            v3_2.insert("permissionHistory", 0, p4);
        } catch (Exception v3_1) {
            android.util.Log.e("PermissionHistoryStats", "writing permission statistics failed.", v3_1);
        }
        return;
    }

Method com.sophos.smsec.core.statistics.ScanStatistics.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    declared_synchronized void a(android.content.Context p4, ark>com.sophos.smsec.core.statistics.ScanStatisticsark>$ScanType p5)
    {
        try {
            Exception v4_1 = this.a(p4);
            v4_1.delete("scanCounter", "timestamp < datetime(\'now\', \'-84 days\')", 0);
            String v0_3 = new android.content.ContentValues();
            v0_3.put("scanType", Integer.valueOf(p5.getValue()));
            v4_1.insert("scanCounter", 0, v0_3);
        } catch (Exception v4_3) {
            throw v4_3;
        } catch (Exception v4_2) {
            com.sophos.smsec.core.smsectrace.d.c("ScanStatistics", "writing last scan count failed.", v4_2);
        }
        return;
    }

Method com.sophos.smsec.core.statistics.ScanStatistics.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized void a(android.content.Context p4, int p5, int p6, int p7, int p8)
    {
        try {
            Exception v4_1 = this.a(p4);
            v4_1.delete("scanResult", "timestamp < datetime(\'now\', \'-84 days\')", 0);
            android.content.ContentValues v0_2 = new android.content.ContentValues();
            v0_2.put("clean", Integer.valueOf(p5));
            v0_2.put("lowRep", Integer.valueOf(p6));
            v0_2.put("pua", Integer.valueOf(p7));
            v0_2.put("malicious", Integer.valueOf(p8));
            v4_1.insert("scanResult", 0, v0_2);
        } catch (Exception v4_3) {
            throw v4_3;
        } catch (Exception v4_2) {
            com.sophos.smsec.core.smsectrace.d.c("ScanStatistics", "writing last scan result failed.", v4_2);
        }
        return;
    }

Method com.sophos.smsec.core.datastore.DbHelper.b() calling method android.database.sqlite.SQLiteDatabase.insert()


    private void b(android.database.sqlite.SQLiteDatabase p9)
    {
        try {
            Exception v0_3 = p9.query("scan_apk_ignore", new String[] {"fp_pkgname", "fp_flags"}), 0, 0, 0, 0, 0);
            String v1_1 = 0;
            try {
                p9.beginTransaction();
                Throwable v2_1 = new android.content.ContentValues();
            } catch (Throwable v2_4) {
                if (v0_3 != null) {
                    if (v1_1 == null) {
                        v0_3.close();
                    } else {
                        try {
                            v0_3.close();
                        } catch (Exception v0_9) {
                            v1_1.addSuppressed(v0_9);
                        }
                    }
                }
                throw v2_4;
            } catch (String v1_1) {
                throw v1_1;
            }
            while (v0_3.moveToNext()) {
                try {
                    v2_1.put("packagename", v0_3.getString(v0_3.getColumnIndex("fp_pkgname")));
                    v2_1.put("originator", v0_3.getString(v0_3.getColumnIndex("fp_flags")));
                } catch (String v3_11) {
                    v2_1.clear();
                    throw v3_11;
                } catch (String v3_10) {
                    String v4_12 = new StringBuilder();
                    v4_12.append("Transition for allowItem ");
                    v4_12.append(v2_1.get("packagename"));
                    v4_12.append(" failed.");
                    com.sophos.smsec.core.smsectrace.d.c(v4_12.toString(), v3_10);
                    v2_1.clear();
                }
                if (p9.insert("quarantine_allowlist", 0, v2_1) <= 0) {
                } else {
                    String v3_8 = new StringBuilder();
                    v3_8.append("Transition for allowItem ");
                    v3_8.append(v2_1.get("packagename"));
                    v3_8.append(" successful.");
                    com.sophos.smsec.core.smsectrace.d.f(v3_8.toString());
                }
            }
            p9.setTransactionSuccessful();
            if (v0_3 != null) {
                v0_3.close();
            }
            p9.endTransaction();
            try {
                p9.beginTransaction();
                p9.execSQL("DROP TRIGGER IF EXISTS scan_apk_ignore");
                p9.execSQL("DROP TABLE IF EXISTS quarantine_allow_fingerprints");
                p9.execSQL("DROP TABLE IF EXISTS scan_apk_ignore");
                p9.setTransactionSuccessful();
            } catch (Exception v0_8) {
                p9.endTransaction();
                throw v0_8;
            } catch (Exception v0_7) {
                com.sophos.smsec.core.smsectrace.d.c("Droping table during AllowList transition failed", v0_7);
            }
            p9.endTransaction();
            return;
        } catch (Exception v0_2) {
            p9.endTransaction();
            throw v0_2;
        }
    }

Method com.sophos.nge.db.NgDbHelper.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p23, int p24, int p25)
    {
        java.util.ArrayList v5_4 = new StringBuilder();
        v5_4.append("Upgrade Database from ");
        v5_4.append(p24);
        v5_4.append(" to ");
        v5_4.append(p25);
        com.sophos.smsec.core.smsectrace.d.b("SMSec: NgDataBaseInit", v5_4.toString());
        if (p24 < p25) {
            java.util.ArrayList v5_2 = new java.util.ArrayList();
            com.sophos.nge.db.NgDbHelper.e = com.sophos.nge.db.NgDbHelper$UPDATE_STATE.UPDATE_PENDIG;
            if (p24 == 0) {
                try {
                    String v8_1 = com.sophos.smsec.core.datastore.DataStore.a(this.c).x();
                    try {
                        if (!v8_1.moveToFirst()) {
                            com.sophos.smsec.core.datastore.DataStore.a(this.c).w();
                            com.sophos.smsec.core.smsectrace.d.b("SMSec: NgDataBase", "dropped empty table.");
                        } else {
                            String v0_26 = new android.content.ContentValues();
                            StringBuilder v9_11 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.IDENTIFIER.toString());
                            String v10_5 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.APP_NAME.toString());
                            int v11_2 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.PERMISSIONS_GRANTED.toString());
                            int v12_2 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.PERMISSIONS_REQUESTED.toString());
                            int v13_2 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.APP_INSTALLED.toString());
                            int v14_2 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.OLD_SDK_VERSION.toString());
                            int v15_2 = v8_1.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.toString());
                            do {
                                v0_26.clear();
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.IDENTIFIER.toString(), v8_1.getString(v9_11));
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.APP_NAME.toString(), v8_1.getString(v10_5));
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.PERMISSIONS_GRANTED.toString(), v8_1.getString(v11_2));
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.PERMISSIONS_REQUESTED.toString(), v8_1.getString(v12_2));
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.APP_INSTALLED.toString(), Integer.valueOf(v8_1.getInt(v13_2)));
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.OLD_SDK_VERSION.toString(), Integer.valueOf(v8_1.getInt(v14_2)));
                                v0_26.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.toString(), v8_1.getString(v15_2));
                                String v6_11;
                                int v21;
                                long v18 = p23.insert(com.sophos.nge.db.NgDataBase$Table.PERMISSION_HISTORY.toString(), 0, v0_26);
                                if (-1 != v18) {
                                } else {
                                    String v6_13 = new StringBuilder();
                                    v6_13.append("inserting into DB table ");
                                    v6_13.append(com.sophos.nge.db.NgDataBase$Table.PERMISSION_HISTORY.toString());
                                    v6_13.append(" failed.");
                                    com.sophos.smsec.core.smsectrace.d.d("SMSec: NgDataBase", v6_13.toString());
                                    v6_11 = v18;
                                    v21 = 0;
                                    StringBuilder v9_5 = new StringBuilder();
                                    v9_5.append("moved ");
                                    v9_5.append(v6_11);
                                    v9_5.append(" entries to new table.");
                                    com.sophos.smsec.core.smsectrace.d.b("SMSec: NgDataBase", v9_5.toString());
                                    if (v21 != 0) {
                                        com.sophos.smsec.core.datastore.DataStore.a(this.c).w();
                                        StringBuilder v9_8 = new StringBuilder();
                                        v9_8.append("dropped table with ");
                                        v9_8.append(v6_11);
                                        v9_8.append(" entries.");
                                        com.sophos.smsec.core.smsectrace.d.b("SMSec: NgDataBase", v9_8.toString());
                                    }
                                }
                            } while(v8_1.moveToNext());
                            v6_11 = v18;
                            v21 = 1;
                        }
                    } catch (String v0_8) {
                        if (v8_1 != null) {
                            if (!v8_1.isClosed()) {
                                v8_1.close();
                            }
                        }
                        throw v0_8;
                    } catch (String v0_7) {
                        boolean v7_18 = v8_1;
                        try {
                            com.sophos.smsec.core.smsectrace.d.c("SMSec: NgDataBase", "data base migration failed. ", v0_7);
                        } catch (String v0_8) {
                            v8_1 = v7_18;
                        }
                        if (!v7_18) {
                            String v0_11 = (p24 + 1);
                            while (v0_11 <= p25) {
                                v5_2.add(com.sophos.smsec.core.datastore.c.a(v0_11, "ngdb_update_%VERSION%.sql"));
                                v0_11++;
                            }
                            String v0_14 = new String[v5_2.size()];
                            this.a(p23, ((String[]) v5_2.toArray(v0_14)));
                            com.sophos.nge.db.NgDbHelper.e = com.sophos.nge.db.NgDbHelper$UPDATE_STATE.UPDATE_DONE;
                            com.sophos.smsec.core.smsectrace.d.b("SMSec: NgDataBaseInit", "Upgrade NgDatabase done.");
                            return;
                        } else {
                            if (v7_18.isClosed()) {
                            } else {
                                v7_18.close();
                            }
                        }
                    }
                    if ((v8_1 != null) && (!v8_1.isClosed())) {
                        v8_1.close();
                    }
                } catch (String v0_8) {
                    v8_1 = 0;
                } catch (String v0_7) {
                    v7_18 = 0;
                }
            }
        }
        com.sophos.nge.db.NgDbHelper.e = com.sophos.nge.db.NgDbHelper$UPDATE_STATE.UPDATE_DONE;
        com.sophos.smsec.core.smsectrace.d.b("SMSec: NgDataBaseInit", "Upgrade NgDatabase done.");
        return;
    }

Method com.sophos.nge.db.NgDataBase.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized boolean a(String p5, String p6, String p7, String p8, long p9, int p11, int p12)
    {
        try {
            android.database.sqlite.SQLiteDatabase v1 = this.a(1);
            android.content.ContentValues v2_1 = new android.content.ContentValues();
            v2_1.clear();
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.IDENTIFIER.toString(), p5);
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.APP_NAME.toString(), p6);
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.PERMISSIONS_GRANTED.toString(), p7);
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.PERMISSIONS_REQUESTED.toString(), p8);
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.APP_INSTALLED.toString(), Integer.valueOf(p11));
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.OLD_SDK_VERSION.toString(), Integer.valueOf(p12));
            v2_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.toString(), Long.valueOf(p9));
            int v5_13 = 0;
            try {
                if (-1 != v1.insert(ark>com.sophos.nge.db.NgDataBaseark>$Table.PERMISSION_HISTORY.toString(), 0, v2_1)) {
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: NgDataBase", "add entry in permission history table");
                    v5_13 = 1;
                } else {
                    String v7_4 = new StringBuilder();
                    v7_4.append("inserting into DB table ");
                    v7_4.append(ark>com.sophos.nge.db.NgDataBaseark>$Table.PERMISSION_HISTORY.toString());
                    v7_4.append(" failed.");
                    com.sophos.smsec.core.smsectrace.d.d("SMSec: NgDataBase", v7_4.toString());
                }
            } catch (String v6_10) {
                String v8_7 = new StringBuilder();
                v8_7.append("inserting into DB table ");
                v8_7.append(ark>com.sophos.nge.db.NgDataBaseark>$Table.PERMISSION_HISTORY.toString());
                v8_7.append(" failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: NgDataBase", v8_7.toString(), v6_10);
            }
            return v5_13;
        } catch (int v5_14) {
            throw v5_14;
        }
    }

Method com.sophos.nge.db.NgDataBase.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public declared_synchronized long a(String p4, String p5, int p6)
    {
        try {
            android.database.sqlite.SQLiteDatabase v0_1 = this.a(1);
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.clear();
            v1_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.THREAT_IDENTIFIER.toString(), p4);
            v1_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.RESULT_VECTOR.toString(), p5);
            v1_1.put(com.sophos.smsec.core.datastore.DataStore$TableColumn.RESULT_SCORE.toString(), Integer.valueOf(p6));
            try {
                v0_1.beginTransaction();
                long v4_7 = v0_1.insert(ark>com.sophos.nge.db.NgDataBaseark>$Table.NGE_RESULTS.toString(), 0, v1_1);
                v0_1.setTransactionSuccessful();
            } catch (long v4_9) {
                v0_1.endTransaction();
                throw v4_9;
            } catch (Exception) {
                v0_1.endTransaction();
                return -1;
            }
            v0_1.endTransaction();
            return v4_7;
        } catch (long v4_10) {
            throw v4_10;
        }
    }

Method com.sophos.mobile.msgbox.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void a(String p4, String p5, long p6)
    {
        try {
            android.database.sqlite.SQLiteDatabase v0 = this.getWritableDatabase();
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.put("title", p4);
            v1_1.put("body", p5);
            v1_1.put("date", Long.valueOf(p6));
            v0.insert("messages", 0, v1_1);
            v0.close();
        } catch (Exception v4_2) {
            com.sophos.smsec.core.smsectrace.d.c("MessageBox", "failed to insert message in database", v4_2);
        }
        return;
    }

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


    public final boolean a(com.google.android.gms.measurement.internal.c p9, long p10, boolean p12)
    {
        this.d();
        this.k();
        com.google.android.gms.common.internal.r.a(p9);
        com.google.android.gms.common.internal.r.a(p9.a);
        long v0_6 = new com.google.android.gms.internal.measurement.da();
        v0_6.d = Long.valueOf(p9.d);
        byte[] v1_2 = new com.google.android.gms.internal.measurement.db[p9.e.a()];
        v0_6.a = 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.measurement.db();
            int v7 = (v3_2 + 1);
            v0_6.a[v3_2] = v5_1;
            v5_1.a = v4_1;
            this.g().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.measurement.ix.a(v1_6, 0, v1_6.length);
            v0_6.a(v3_4);
            v3_4.a();
            this.r().x().a("Saving event, name, data size", this.o().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.y().insert("raw_events", 0, v0_4) != -1) {
                    return 1;
                } else {
                    this.r().c_().a("Failed to insert raw event (got -1). appId", com.google.android.gms.measurement.internal.r.a(p9.a));
                    return 0;
                }
            } catch (com.google.android.gms.measurement.internal.t v10_10) {
                this.r().c_().a("Error storing raw event. appId", com.google.android.gms.measurement.internal.r.a(p9.a), v10_10);
                return 0;
            }
        } catch (com.google.android.gms.measurement.internal.t v10_6) {
            this.r().c_().a("Data loss. Failed to serialize event params/data. appId", com.google.android.gms.measurement.internal.r.a(p9.a), v10_6);
            return 0;
        }
    }

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


    public final boolean a(com.google.android.gms.internal.measurement.dd p7, boolean p8)
    {
        this.d();
        this.k();
        com.google.android.gms.common.internal.r.a(p7);
        com.google.android.gms.common.internal.r.a(p7.o);
        com.google.android.gms.common.internal.r.a(p7.f);
        this.B();
        int v0_0 = this.m().a();
        if ((p7.f.longValue() < (v0_0 - com.google.android.gms.measurement.internal.fa.j())) || (p7.f.longValue() > (com.google.android.gms.measurement.internal.fa.j() + v0_0))) {
            this.r().i().a("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.measurement.internal.r.a(p7.o), Long.valueOf(v0_0), p7.f);
        }
        try {
            String v1_5 = new byte[p7.e()];
            Object v2_12 = com.google.android.gms.internal.measurement.ix.a(v1_5, 0, v1_5.length);
            p7.a(v2_12);
            v2_12.a();
            String v1_6 = this.g().b(v1_5);
            this.r().x().a("Saving bundle, size", Integer.valueOf(v1_6.length));
            Object v2_17 = new android.content.ContentValues();
            v2_17.put("app_id", p7.o);
            v2_17.put("bundle_end_timestamp", p7.f);
            v2_17.put("data", v1_6);
            v2_17.put("has_realtime", Integer.valueOf(p8));
        } catch (com.google.android.gms.measurement.internal.t v8_6) {
            this.r().c_().a("Data loss. Failed to serialize bundle. appId", com.google.android.gms.measurement.internal.r.a(p7.o), v8_6);
            return 0;
        }
        if (p7.H != null) {
            v2_17.put("retry_count", p7.H);
        }
        try {
            if (this.y().insert("queue", 0, v2_17) != -1) {
                return 1;
            } else {
                this.r().c_().a("Failed to insert bundle (got -1). appId", com.google.android.gms.measurement.internal.r.a(p7.o));
                return 0;
            }
        } catch (com.google.android.gms.measurement.internal.t v8_1) {
            this.r().c_().a("Error storing bundle. appId", com.google.android.gms.measurement.internal.r.a(p7.o), v8_1);
            return 0;
        }
    }

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


    public final void a(com.google.android.gms.internal.measurement.bg p7)
    {
        com.google.android.gms.common.internal.r.a(p7);
        com.google.android.gms.analytics.r.d();
        this.z();
        com.google.android.gms.common.internal.r.a(p7);
        Long v0_3 = new android.net.Uri$Builder();
        android.database.sqlite.SQLiteDatabase v1_0 = p7.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.measurement.bb.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.h();
            String v2_11 = new android.content.ContentValues();
            v2_11.put("hit_string", v0_1);
            v2_11.put("hit_time", Long.valueOf(p7.d()));
            v2_11.put("hit_app_id", Integer.valueOf(p7.a()));
            if (!p7.f()) {
                v3_10 = com.google.android.gms.internal.measurement.at.i();
            } else {
                v3_10 = com.google.android.gms.internal.measurement.at.h();
            }
            v2_11.put("hit_url", v3_10);
            try {
                Long v0_8 = v1_7.insert("hits2", 0, v2_11);
            } catch (String v7_2) {
                this.e("Error storing a hit", v7_2);
                return;
            }
            if (v0_8 != -1) {
                this.b("Hit saved to database. db-id, hit", Long.valueOf(v0_8), p7);
                return;
            } else {
                this.f("Failed to insert a hit (got -1)");
                return;
            }
        } else {
            this.l().a(p7, "Hit length exceeds the maximum allowed size");
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static declared_synchronized boolean a(android.content.Context p12, com.baidu.android.pushservice.c.e p13)
    {
        try {
        } catch (long v12_4) {
            throw v12_4;
        }
        long v12_1 = ark>com.baidu.android.pushservice.c.cark>.a(p12);
        int v2_0 = 0;
        if (v12_1 != 0) {
            String v3_5 = new android.content.ContentValues();
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.b.name(), p13.a);
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.c.name(), p13.b);
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.d.name(), p13.d);
            int v4_6 = ark>com.baidu.android.pushservice.c.cark>$f.e.name();
            long v5_4 = new StringBuilder();
            v5_4.append(System.currentTimeMillis());
            v5_4.append("");
            v3_5.put(v4_6, v5_4.toString());
            android.database.Cursor v7 = 0;
            long v8_1 = v12_1.insert("PushVerifInfo", 0, v3_5);
            v7 = v12_1.rawQuery("SELECT COUNT(*) FROM PushVerifInfo;", 0);
            if ((v7.moveToFirst()) && (v7.getInt(0) > 200)) {
                String[] v11 = new String[1];
                v11[0] = p13.a;
                v12_1.delete("PushVerifInfo", " msgId IS NOT ?", v11);
            }
            if ((v7 == null) || (v7.isClosed())) {
                v12_1.close();
                if (v8_1 != -1) {
                    v2_0 = 1;
                }
                return v2_0;
            } else {
                v7.close();
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static declared_synchronized void a(android.content.Context p8, java.util.List p9)
    {
        try {
        } catch (Throwable v8_3) {
            throw v8_3;
        }
        Throwable v8_1 = ark>com.baidu.android.pushservice.c.cark>.a(p8);
        if (v8_1 != null) {
            v8_1.beginTransaction();
            v8_1.delete("PushAppStatus", 0, 0);
            Throwable v9_1 = p9.iterator();
            while (v9_1.hasNext()) {
                String v2_2 = ((com.baidu.android.pushservice.g.g) v9_1.next());
                android.content.ContentValues v4_1 = new android.content.ContentValues();
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.b.name(), v2_2.d);
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.e.name(), v2_2.j);
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.c.name(), Long.valueOf(v2_2.e));
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.f.name(), Integer.valueOf(v2_2.b));
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.g.name(), v2_2.a);
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.h.name(), Integer.valueOf(v2_2.c));
                v8_1.insert("PushAppStatus", 0, v4_1);
            }
            v8_1.setTransactionSuccessful();
            v8_1.endTransaction();
            v8_1.close();
            return;
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static void a(android.content.Context p4, String p5, int p6, long p7, byte[] p9, byte[] p10, long p11, int p13)
    {
        try {
            android.database.sqlite.SQLiteDatabase v1 = ark>com.baidu.android.pushservice.c.cark>.a(p4);
        } catch (String v4_12) {
            throw v4_12;
        }
        if (v1 != null) {
            android.content.ContentValues v2_1 = new android.content.ContentValues();
            v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.b.name(), p5);
            v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.d.name(), Long.valueOf(p7));
            v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.c.name(), Integer.valueOf(p6));
            if ((p9 != null) && (p9.length > 0)) {
                v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.g.name(), com.baidu.android.pushservice.jni.BaiduAppSSOJni.getEncrypted(p4, p5, p9));
                v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.f.name(), p10);
                v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.h.name(), Long.valueOf(p11));
            }
            v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.e.name(), Long.valueOf(System.currentTimeMillis()));
            v2_1.put(ark>com.baidu.android.pushservice.c.cark>$d.i.name(), Integer.valueOf(p13));
            v1.insert("PushMsgInfos", 0, v2_1);
            v1.close();
            return;
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static declared_synchronized long a(android.content.Context p17, com.baidu.android.pushservice.c.b p18)
    {
        try {
        } catch (boolean v0_5) {
            throw v0_5;
        }
        android.database.sqlite.SQLiteDatabase v12 = ark>com.baidu.android.pushservice.c.cark>.a(p17);
        if (v12 != null) {
            android.content.ContentValues v15_1 = new android.content.ContentValues();
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.b.name(), Long.valueOf(p18.a));
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.c.name(), Long.valueOf(p18.b));
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.d.name(), p18.c);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.e.name(), p18.d);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.f.name(), p18.e);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.h.name(), p18.g);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.g.name(), p18.f);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.i.name(), p18.h);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.j.name(), p18.i);
            v15_1.put(ark>com.baidu.android.pushservice.c.cark>$e.k.name(), p18.j);
            long v13_0;
            long v11_1 = 0;
            StringBuilder v4_2;
            v11_1 = v12.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
            if ((v11_1 == 0) || (v11_1.getCount() == 0)) {
                v13_0 = v12.insert("PushShareInfo", 0, v15_1);
                v4_2 = "pushadvertiseinfo:  insert into database";
            } else {
                String v5_16 = new StringBuilder();
                v5_16.append(ark>com.baidu.android.pushservice.c.cark>$e.a.name());
                v5_16.append("=1");
                v13_0 = ((long) v12.update("PushShareInfo", v15_1, v5_16.toString(), 0));
                v4_2 = "pushadvertiseinfo:  update into database";
            }
            com.baidu.android.pushservice.i.l.b(v4_2, p17);
            StringBuilder v4_5 = new StringBuilder();
            v4_5.append("updatePushInfo pushinfo:  insert into database,  clientinfo = ");
            v4_5.append(p18.a().toString());
            com.baidu.android.pushservice.i.l.b(v4_5.toString(), p17);
            if ((v11_1 == 0) || (v11_1.isClosed())) {
                v12.close();
                return v13_0;
            } else {
                v11_1.close();
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.e() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static boolean e(android.content.Context p16, String p17)
    {
        try {
            android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.a.e(p16);
        } catch (boolean v0_2) {
            throw v0_2;
        }
        if (v10 != null) {
            android.database.Cursor v12 = 0;
            try {
                android.content.ContentValues v14_1 = new android.content.ContentValues();
                v14_1.clear();
                v14_1.put(com.baidu.android.pushservice.c.a$h.b.name(), p17);
                v14_1.put(com.baidu.android.pushservice.c.a$h.c.name(), Long.valueOf(System.currentTimeMillis()));
                boolean v2_5 = new StringBuilder();
                v2_5.append(com.baidu.android.pushservice.c.a$h.b.name());
                v2_5.append(" =? ");
                String v15 = v2_5.toString();
                String[] v4_1 = new String[1];
                v4_1[0] = com.baidu.android.pushservice.c.a$h.b.name();
                String[] v6 = new String[1];
                v6[0] = p17;
                boolean v2_9 = v10.query("MsgArriveApp", v4_1, v15, v6, 0, 0, 0);
                try {
                    if ((!v2_9) || (v2_9.getCount() <= 0)) {
                        v2_9 = v10.rawQuery("SELECT COUNT(*) FROM MsgArriveApp;", 0);
                        v2_9.moveToFirst();
                        if (v2_9.getInt(0) > com.baidu.android.pushservice.c.a.c) {
                            v10.delete("MsgArriveApp", 0, 0);
                        }
                        v10.insert("MsgArriveApp", 0, v14_1);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 1;
                    } else {
                        String[] v4_0 = new String[1];
                        v4_0[0] = p17;
                        v10.update("MsgArriveApp", v14_1, v15, v4_0);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 0;
                    }
                } catch (boolean v0_7) {
                    v12 = v2_9;
                    if (v12 != null) {
                        if (!v12.isClosed()) {
                            v12.close();
                        }
                    }
                    v10.close();
                    throw v0_7;
                } catch (Exception) {
                    v12 = v2_9;
                    if (!com.baidu.android.pushservice.a.d(p16)) {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 1;
                    } else {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 0;
                    }
                }
            } catch (boolean v0_7) {
            }
        } else {
            return 1;
        }
    }

Method com.baidu.android.pushservice.c.a.b() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long b(android.content.Context p7, com.baidu.android.pushservice.g.h p8)
    {
        try {
            long v7_1 = com.baidu.android.pushservice.c.a.e(p7);
        } catch (long v7_3) {
            throw v7_3;
        }
        if (v7_1 != 0) {
            if (!com.baidu.android.pushservice.c.a.a(v7_1, p8)) {
                android.content.ContentValues v1_2 = new android.content.ContentValues();
                v1_2.put(com.baidu.android.pushservice.c.a$c.b.name(), p8.d);
                v1_2.put(com.baidu.android.pushservice.c.a$c.c.name(), Long.valueOf(p8.e));
                v1_2.put(com.baidu.android.pushservice.c.a$c.d.name(), p8.f);
                v1_2.put(com.baidu.android.pushservice.c.a$c.j.name(), Integer.valueOf(1));
                v1_2.put(com.baidu.android.pushservice.c.a$c.k.name(), Integer.valueOf(p8.g));
                v1_2.put(com.baidu.android.pushservice.c.a$c.l.name(), p8.h);
                long v2_0 = v7_1.insert("PushBehavior", 0, v1_2);
                v7_1.close();
                return v2_0;
            } else {
                v7_1.close();
                return 0;
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p16, String p17, int p18, int p19, int p20, int p21)
    {
        long v2 = -1;
        try {
            android.database.sqlite.SQLiteDatabase v12 = ark>com.baidu.android.pushservice.c.aark>.e(p16);
        } catch (int v0_3) {
            throw v0_3;
        }
        if (v12 != null) {
            String v6_13 = new String[1];
            v6_13[0] = ark>com.baidu.android.pushservice.c.aark>$i.a.name();
            int v4_3 = new StringBuilder();
            v4_3.append(ark>com.baidu.android.pushservice.c.aark>$i.a.name());
            v4_3.append("= ?");
            String[] v7_4 = v4_3.toString();
            String[] v8_0 = new String[1];
            v8_0[0] = p17;
            int v4_5 = v12.query("NoDisturb", v6_13, v7_4, v8_0, 0, 0, 0);
            String v5_1 = new android.content.ContentValues();
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.a.name(), p17);
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.b.name(), Integer.valueOf(p18));
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.c.name(), Integer.valueOf(p19));
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.d.name(), Integer.valueOf(p20));
            v5_1.put(ark>com.baidu.android.pushservice.c.aark>$i.e.name(), Integer.valueOf(p21));
            if ((v4_5 == 0) || (!v4_5.moveToNext())) {
                v2 = v12.insert("NoDisturb", 0, v5_1);
            } else {
                if ((p18 != 0) || ((p19 != 0) || ((p20 != 0) || (p21 != 0)))) {
                    String[] v7_10 = new StringBuilder();
                    v7_10.append(ark>com.baidu.android.pushservice.c.aark>$i.a.name());
                    v7_10.append("= ?");
                    String[] v7_11 = v7_10.toString();
                    String[] v8_4 = new String[1];
                    v8_4[0] = p17;
                    int v0_1 = v12.update("NoDisturb", v5_1, v7_11, v8_4);
                } else {
                    String v6_15 = new StringBuilder();
                    v6_15.append(ark>com.baidu.android.pushservice.c.aark>$i.a.name());
                    v6_15.append("= ?");
                    String v6_0 = v6_15.toString();
                    String[] v7_0 = new String[1];
                    v7_0[0] = p17;
                    v0_1 = v12.delete("NoDisturb", v6_0, v7_0);
                }
                v2 = ((long) v0_1);
            }
            if (v4_5 != 0) {
                v4_5.close();
            }
            if (v4_5 == 0) {
                v12.close();
                return v2;
            } else {
                v4_5.close();
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p7, com.baidu.android.pushservice.g.j p8)
    {
        try {
            Throwable v7_1 = ark>com.baidu.android.pushservice.c.aark>.e(p7);
        } catch (Throwable v7_2) {
            throw v7_2;
        }
        if (v7_1 != null) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.b.name(), p8.d);
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.c.name(), Long.valueOf(p8.e));
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.d.name(), p8.f);
            if (p8.h != null) {
                v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.l.name(), p8.h);
            }
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.e.name(), Integer.valueOf(p8.c));
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.f.name(), p8.a);
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.g.name(), Integer.valueOf(p8.b));
            v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.k.name(), Integer.valueOf(p8.g));
            if (p8.k != null) {
                v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.n.name(), p8.k);
            }
            if (android.text.TextUtils.isEmpty(p8.j)) {
                v7_1.close();
                return -1;
            } else {
                v3_1.put(ark>com.baidu.android.pushservice.c.aark>$c.o.name(), p8.j);
                long v1_1 = v7_1.insert("PushBehavior", 0, v3_1);
                v7_1.close();
                return v1_1;
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p6, com.baidu.android.pushservice.g.i p7)
    {
        try {
            long v6_1 = ark>com.baidu.android.pushservice.c.aark>.e(p6);
        } catch (long v6_3) {
            throw v6_3;
        }
        if (v6_1 != 0) {
            if (!ark>com.baidu.android.pushservice.c.aark>.b(v6_1, p7)) {
                android.content.ContentValues v1_2 = new android.content.ContentValues();
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.b.name(), p7.a());
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.c.name(), Integer.valueOf(p7.h()));
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.d.name(), p7.b());
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.e.name(), p7.c());
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.f.name(), p7.d());
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.g.name(), Integer.valueOf(p7.e()));
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.h.name(), p7.f());
                v1_2.put(ark>com.baidu.android.pushservice.c.aark>$b.i.name(), Integer.valueOf(p7.g()));
                long v2_1 = v6_1.insert("AppInfo", 0, v1_2);
                v6_1.close();
                return v2_1;
            } else {
                v6_1.close();
                return 0;
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p5, com.baidu.android.pushservice.g.h p6)
    {
        try {
            long v5_1 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (long v5_3) {
            throw v5_3;
        }
        if (v5_1 != 0) {
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.b.name(), p6.d);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.c.name(), Long.valueOf(p6.e));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.d.name(), p6.f);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.h.name(), p6.i);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.j.name(), Integer.valueOf(p6.a));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.k.name(), Integer.valueOf(p6.g));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.l.name(), p6.h);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.f.name(), p6.b);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.n.name(), p6.c);
            long v2_17 = v5_1.insert("PushBehavior", 0, v1_1);
            v5_1.close();
            return v2_17;
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p5, com.baidu.android.pushservice.g.f p6)
    {
        try {
            long v5_1 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (long v5_3) {
            throw v5_3;
        }
        if (v5_1 != 0) {
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.b.name(), p6.d);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.c.name(), Long.valueOf(p6.e));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.d.name(), p6.f);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.h.name(), p6.a);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.l.name(), p6.h);
            long v2_8 = v5_1.insert("PushBehavior", 0, v1_1);
            v5_1.close();
            return v2_8;
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p5, com.baidu.android.pushservice.g.b p6)
    {
        try {
            long v5_1 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (long v5_3) {
            throw v5_3;
        }
        if (v5_1 != 0) {
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.b.name(), p6.d);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.c.name(), Long.valueOf(p6.e));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.d.name(), p6.f);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.l.name(), p6.h);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.h.name(), p6.a);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.i.name(), p6.b);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.k.name(), Integer.valueOf(p6.g));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.o.name(), p6.j);
            if (p6.c != null) {
                v1_1.put(ark>com.baidu.android.pushservice.c.aark>$c.m.name(), p6.c);
            }
            long v2_18 = v5_1.insert("PushBehavior", 0, v1_1);
            v5_1.close();
            return v2_18;
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p8, com.baidu.android.pushservice.g.a p9)
    {
        try {
            android.database.sqlite.SQLiteDatabase v1 = ark>com.baidu.android.pushservice.c.aark>.e(p8);
        } catch (Throwable v8_1) {
            throw v8_1;
        }
        if (v1 != null) {
            android.content.ContentValues v4_1 = new android.content.ContentValues();
            v4_1.put(ark>com.baidu.android.pushservice.c.aark>$a.b.name(), p9.a);
            v4_1.put(ark>com.baidu.android.pushservice.c.aark>$a.c.name(), Long.valueOf(p9.b));
            v4_1.put(ark>com.baidu.android.pushservice.c.aark>$a.d.name(), Long.valueOf(p9.c));
            v4_1.put(ark>com.baidu.android.pushservice.c.aark>$a.e.name(), Long.valueOf(p9.d));
            v4_1.put(ark>com.baidu.android.pushservice.c.aark>$a.g.name(), Integer.valueOf(p9.e));
            v4_1.put(ark>com.baidu.android.pushservice.c.aark>$a.f.name(), Integer.valueOf(p9.f));
            long v2_1 = v1.insert("AlarmMsgInfo", 0, v4_1);
            com.baidu.android.pushservice.i.l.b("AlarmMsgInfoEnum:  insert into database", p8);
            v1.close();
            return v2_1;
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public static long a(android.content.Context p5, ark>com.baidu.android.pushservice.c.aark>$g p6)
    {
        try {
            long v5_1 = ark>com.baidu.android.pushservice.c.aark>.e(p5);
        } catch (long v5_3) {
            throw v5_3;
        }
        if (v5_1 != 0) {
            android.content.ContentValues v1_1 = new android.content.ContentValues();
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.a.name(), p6.a);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.b.name(), p6.b);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.c.name(), p6.c);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.d.name(), p6.d);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.e.name(), p6.e);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.f.name(), p6.f);
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.g.name(), Integer.valueOf(p6.g));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.h.name(), Integer.valueOf(p6.h));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.i.name(), Integer.valueOf(p6.i));
            v1_1.put(ark>com.baidu.android.pushservice.c.aark>$f.j.name(), Long.valueOf(System.currentTimeMillis()));
            long v2_19 = v5_1.insert("FileDownloadingInfo", 0, v1_1);
            v5_1.close();
            return v2_19;
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.PushInfoProvider.update() calling method android.database.sqlite.SQLiteDatabase.insert()


    public int update(android.net.Uri p12, android.content.ContentValues p13, String p14, String[] p15)
    {
        com.baidu.android.pushservice.c.c.a();
        android.database.Cursor v0 = 0;
        long v1 = -1;
        try {
            int v12_1;
            if (this.b.match(p12) == 1) {
                v12_1 = com.baidu.android.pushservice.c.c.a(this.a);
                if (v12_1 == 0) {
                    if (v0 != null) {
                        v0.close();
                    }
                    if (v12_1 != 0) {
                        v12_1.close();
                    }
                } else {
                    try {
                        long v13_2;
                        android.database.Cursor v3_1 = v12_1.query("PushShareInfo", 0, 0, 0, 0, 0, 0);
                        try {
                            if ((v3_1 == null) || (v3_1.getCount() == 0)) {
                                v13_2 = v12_1.insert("PushShareInfo", 0, p13);
                            } else {
                                v13_2 = ((long) v12_1.update("PushShareInfo", p13, p14, 0));
                            }
                        } catch (long v13_4) {
                            v0 = v3_1;
                            if (v0 != null) {
                                v0.close();
                            }
                            if (v12_1 != 0) {
                                v12_1.close();
                            }
                            throw v13_4;
                        } catch (long v13_1) {
                            v0 = v3_1;
                            com.baidu.android.pushservice.g.o.a(this.a, v13_1);
                            if (v0 != null) {
                                v0.close();
                            }
                            if (v12_1 != 0) {
                            }
                        }
                        v1 = v13_2;
                        v0 = v3_1;
                    } catch (long v13_1) {
                    }
                }
            } else {
                v12_1 = 0;
            }
        } catch (long v13_4) {
            v12_1 = 0;
        } catch (long v13_1) {
            v12_1 = 0;
        }
        return ((int) v1);
    }

Method com.sophos.smsec.core.datastore.b.k() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public declared_synchronized void k()
    {
        try {
            android.content.Context v0_2 = this.a(1);
            try {
                v0_2.beginTransaction();
                v0_2.execSQL("delete from quarantine_allowlist");
                v0_2.setTransactionSuccessful();
            } catch (android.content.Intent v1_2) {
                v0_2.endTransaction();
                k>com.sophos.smsec.core.datastore.bk>.c().sendBroadcast(new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED"), "com.sophos.smsec.PERMISSION");
                throw v1_2;
            } catch (android.content.Intent v1_5) {
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "delete all rows in ignore list table failed", v1_5);
                v0_2.endTransaction();
                android.content.Context v0_1 = k>com.sophos.smsec.core.datastore.bk>.c();
                android.content.Intent v1_1 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
                String v2_1 = "com.sophos.smsec.PERMISSION";
                v0_1.sendBroadcast(v1_1, v2_1);
                return;
            }
            v0_2.endTransaction();
            v0_1 = k>com.sophos.smsec.core.datastore.bk>.c();
            v1_1 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
            v2_1 = "com.sophos.smsec.PERMISSION";
        } catch (android.content.Context v0_4) {
            throw v0_4;
        }
    }

Method com.sophos.smsec.core.statistics.b.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p2, int p3, int p4)
    {
        if ((p3 < 2) && (p4 >= 2)) {
            try {
                p2.beginTransaction();
                p2.execSQL("CREATE TABLE[permissionHistory] ([timestamp] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,[granted] INTEGER DEFAULT 0 CHECK(granted>=0) NOT NULL,[revoked] INTEGER DEFAULT 0 CHECK(revoked>=0) NOT NULL)");
                p2.setTransactionSuccessful();
            } catch (Throwable v3_2) {
                p2.endTransaction();
                throw v3_2;
            } catch (Exception) {
            }
            p2.endTransaction();
        }
        return;
    }

Method com.sophos.smsec.core.statistics.b.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        try {
            p2.beginTransaction();
            p2.execSQL("CREATE TABLE webfiltering (_id INTEGER PRIMARY KEY,timestamp TIMESTAMP DEFAULT CURRENT_DATE NOT NULL,type INTEGER NULL,alert INTEGER DEFAULT 0 CHECK(alert>=0) NOT NULL,malicious INTEGER DEFAULT 0 CHECK(malicious>=0) NOT NULL,blacklisted INTEGER DEFAULT 0 CHECK(blacklisted>=0) NOT NULL)");
            p2.execSQL("CREATE TABLE [scanCounter] ([timestamp] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,[scanType] INTEGER CHECK(scanType IN (1, 2)) NOT NULL)");
            p2.execSQL("CREATE TABLE[scanResult] ([timestamp] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,[clean] INTEGER DEFAULT 0 CHECK(clean>=0) NOT NULL,[lowRep] INTEGER DEFAULT 0 CHECK(lowRep>=0) NOT NULL,[pua] INTEGER DEFAULT 0 CHECK(pua>=0) NOT NULL,[malicious] INTEGER DEFAULT 0 CHECK(malicious>=0) NOT NULL)");
            p2.execSQL("CREATE TABLE[permissionHistory] ([timestamp] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,[granted] INTEGER DEFAULT 0 CHECK(granted>=0) NOT NULL,[revoked] INTEGER DEFAULT 0 CHECK(revoked>=0) NOT NULL)");
            p2.setTransactionSuccessful();
        } catch (Throwable v0_1) {
            p2.endTransaction();
            throw v0_1;
        } catch (Exception) {
        }
        p2.endTransaction();
        return;
    }

Method com.sophos.smsec.core.datastore.c.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public static void a(android.content.Context p5, String p6, android.database.sqlite.SQLiteDatabase p7)
    {
        try {
            Throwable v0_1 = new java.io.BufferedReader(new java.io.BufferedReader(new java.io.InputStreamReader(p5.getResources().getAssets().open(p6))));
            Throwable v5_1 = 0;
            try {
                String v1_2 = v0_1.readLine();
            } catch (Throwable v7_1) {
                if (v5_1 == null) {
                    v0_1.close();
                } else {
                    try {
                        v0_1.close();
                    } catch (Throwable v0_2) {
                        v5_1.addSuppressed(v0_2);
                    }
                }
                throw v7_1;
            } catch (Throwable v5_1) {
                throw v5_1;
            }
            while (v1_2 != null) {
                String v1_3 = v1_2.trim();
                if ((!v1_3.startsWith("--")) && (!"".equals(v1_3))) {
                    try {
                        p7.execSQL(v1_3);
                    } catch (android.database.SQLException v2_5) {
                        StringBuilder v3_1 = new StringBuilder();
                        v3_1.append("error executing SQL line [");
                        v3_1.append(v1_3);
                        v3_1.append("]. ");
                        com.sophos.smsec.core.smsectrace.d.c(v3_1.toString(), v2_5);
                    }
                }
                v1_2 = v0_1.readLine();
            }
            v0_1.close();
            return;
        } catch (java.io.FileNotFoundException) {
            Throwable v5_5 = new StringBuilder();
            v5_5.append("SqlFile: ");
            v5_5.append(p6);
            v5_5.append(" not found. (need not be found).");
            com.sophos.smsec.core.smsectrace.d.g(v5_5.toString());
            return;
        }
    }

Method com.sophos.smsec.core.datastore.DbHelper.c() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void c(android.database.sqlite.SQLiteDatabase p4)
    {
        try {
            p4.beginTransaction();
            p4.execSQL("delete from quarantine");
            p4.setTransactionSuccessful();
        } catch (android.database.SQLException v0_2) {
            p4.endTransaction();
            throw v0_2;
        } catch (android.database.SQLException v0_1) {
            com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBaseInit", "delete all quarantine entries", v0_1);
        }
        p4.endTransaction();
        return;
    }

Method com.sophos.smsec.core.datastore.DbHelper.b() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void b(android.database.sqlite.SQLiteDatabase p9)
    {
        try {
            Exception v0_3 = p9.query("scan_apk_ignore", new String[] {"fp_pkgname", "fp_flags"}), 0, 0, 0, 0, 0);
            String v1_1 = 0;
            try {
                p9.beginTransaction();
                Throwable v2_1 = new android.content.ContentValues();
            } catch (Throwable v2_4) {
                if (v0_3 != null) {
                    if (v1_1 == null) {
                        v0_3.close();
                    } else {
                        try {
                            v0_3.close();
                        } catch (Exception v0_9) {
                            v1_1.addSuppressed(v0_9);
                        }
                    }
                }
                throw v2_4;
            } catch (String v1_1) {
                throw v1_1;
            }
            while (v0_3.moveToNext()) {
                try {
                    v2_1.put("packagename", v0_3.getString(v0_3.getColumnIndex("fp_pkgname")));
                    v2_1.put("originator", v0_3.getString(v0_3.getColumnIndex("fp_flags")));
                } catch (String v3_11) {
                    v2_1.clear();
                    throw v3_11;
                } catch (String v3_10) {
                    String v4_12 = new StringBuilder();
                    v4_12.append("Transition for allowItem ");
                    v4_12.append(v2_1.get("packagename"));
                    v4_12.append(" failed.");
                    com.sophos.smsec.core.smsectrace.d.c(v4_12.toString(), v3_10);
                    v2_1.clear();
                }
                if (p9.insert("quarantine_allowlist", 0, v2_1) <= 0) {
                } else {
                    String v3_8 = new StringBuilder();
                    v3_8.append("Transition for allowItem ");
                    v3_8.append(v2_1.get("packagename"));
                    v3_8.append(" successful.");
                    com.sophos.smsec.core.smsectrace.d.f(v3_8.toString());
                }
            }
            p9.setTransactionSuccessful();
            if (v0_3 != null) {
                v0_3.close();
            }
            p9.endTransaction();
            try {
                p9.beginTransaction();
                p9.execSQL("DROP TRIGGER IF EXISTS scan_apk_ignore");
                p9.execSQL("DROP TABLE IF EXISTS quarantine_allow_fingerprints");
                p9.execSQL("DROP TABLE IF EXISTS scan_apk_ignore");
                p9.setTransactionSuccessful();
            } catch (Exception v0_8) {
                p9.endTransaction();
                throw v0_8;
            } catch (Exception v0_7) {
                com.sophos.smsec.core.smsectrace.d.c("Droping table during AllowList transition failed", v0_7);
            }
            p9.endTransaction();
            return;
        } catch (Exception v0_2) {
            p9.endTransaction();
            throw v0_2;
        }
    }

Method com.sophos.smsec.core.datastore.DataStore.w() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void w()
    {
        this.a(1).execSQL("DROP TABLE IF EXISTS pa_permission_history");
        return;
    }

Method com.sophos.nge.db.NgDataBase.e() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public declared_synchronized void e()
    {
        try {
            Throwable v0_1 = this.a(1);
            try {
                v0_1.beginTransaction();
                android.database.SQLException v1_3 = new StringBuilder();
                v1_3.append("DELETE FROM ");
                v1_3.append(com.sophos.nge.db.NgDataBase$Table.PERMISSION_HISTORY.toString());
                v0_1.execSQL(v1_3.toString());
                v0_1.setTransactionSuccessful();
            } catch (Throwable v0_2) {
                throw v0_2;
            } catch (android.database.SQLException v1_1) {
                com.sophos.smsec.core.smsectrace.d.c("SMSec: NgDataBase", "reseting database failed.", v1_1);
            }
            v0_1.endTransaction();
            this.d();
            return;
        } catch (Throwable v0_3) {
            throw v0_3;
        }
    }

Method com.sophos.mobile.msgbox.a.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p3)
    {
        try {
            com.sophos.smsec.core.smsectrace.d.b("MessageBox", "creating message database...");
            p3.execSQL("CREATE TABLE IF NOT EXISTS [messages](_id INTEGER PRIMARY KEY, [date] INTEGER, [title] TEXT, [body] TEXT);");
        } catch (Exception v3_1) {
            com.sophos.smsec.core.smsectrace.d.c("MessageBox", "failed to create database", v3_1);
        }
        return;
    }

Method com.sophos.mobile.msgbox.a.b() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void b()
    {
        android.database.sqlite.SQLiteDatabase v0 = this.getWritableDatabase();
        v0.execSQL("DROP TABLE [messages];");
        v0.execSQL("CREATE TABLE IF NOT EXISTS [messages](_id INTEGER PRIMARY KEY, [date] INTEGER, [title] TEXT, [body] TEXT);");
        v0.close();
        return;
    }

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


    final void a(java.util.List p5)
    {
        this.d();
        this.k();
        com.google.android.gms.common.internal.r.a(p5);
        com.google.android.gms.common.internal.r.a(p5.size());
        if (this.N()) {
            android.database.sqlite.SQLiteException v5_1 = android.text.TextUtils.join(",", p5);
            String v1_1 = new StringBuilder((String.valueOf(v5_1).length() + 2));
            v1_1.append("(");
            v1_1.append(v5_1);
            v1_1.append(")");
            android.database.sqlite.SQLiteException v5_3 = v1_1.toString();
            String v1_3 = new StringBuilder((String.valueOf(v5_3).length() + 80));
            v1_3.append("SELECT COUNT(1) FROM queue WHERE rowid IN ");
            v1_3.append(v5_3);
            v1_3.append(" AND retry_count =  2147483647 LIMIT 1");
            if (this.b(v1_3.toString(), 0) > 0) {
                this.r().i().a("The number of upload retries exceeds the limit. Will remain unchanged.");
            }
            try {
                com.google.android.gms.measurement.internal.t v0_15 = this.y();
                StringBuilder v2_2 = new StringBuilder((String.valueOf(v5_3).length() + 127));
                v2_2.append("UPDATE queue SET retry_count = IFNULL(retry_count, 0) + 1 WHERE rowid IN ");
                v2_2.append(v5_3);
                v2_2.append(" AND (retry_count IS NULL OR retry_count < 2147483647)");
                v0_15.execSQL(v2_2.toString());
                return;
            } catch (android.database.sqlite.SQLiteException v5_6) {
                this.r().c_().a("Error incrementing retry count. error", v5_6);
                return;
            }
        } else {
            return;
        }
    }

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


    final com.google.android.gms.internal.measurement.cy[] a(String p66, com.google.android.gms.internal.measurement.da[] p67, com.google.android.gms.internal.measurement.dg[] p68)
    {
        android.support.v4.util.ArrayMap v25_0;
        Integer v24_0;
        int v22_2;
        java.util.BitSet v21_2;
        boolean v15_0 = p66;
        long[] v13_1 = p67;
        com.google.android.gms.common.internal.r.a(p66);
        java.util.BitSet v11_12 = new java.util.HashSet();
        String v12_8 = new android.support.v4.util.ArrayMap();
        Integer v10_0 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v9_1 = new android.support.v4.util.ArrayMap();
        Integer v8_9 = new android.support.v4.util.ArrayMap();
        String v6_8 = new android.support.v4.util.ArrayMap();
        boolean v23 = this.t().k(p66);
        boolean v0_20 = this.i().e(p66);
        if (!v0_20) {
            v21_2 = v8_9;
            v24_0 = v9_1;
            v25_0 = v10_0;
            v22_2 = v11_12;
        } else {
            long v1_69 = v0_20.keySet().iterator();
            while (v1_69.hasNext()) {
                boolean v0_16;
                int v22_3;
                java.util.BitSet v21_3;
                java.util.Iterator v19_4;
                String v20_4;
                java.util.BitSet v2_55 = ((Integer) v1_69.next()).intValue();
                Integer v4_25 = ((com.google.android.gms.internal.measurement.de) v0_20.get(Integer.valueOf(v2_55)));
                String v5_11 = ((java.util.BitSet) v10_0.get(Integer.valueOf(v2_55)));
                com.google.android.gms.internal.measurement.dg[] v3_20 = ((java.util.BitSet) v9_1.get(Integer.valueOf(v2_55)));
                if (!v23) {
                    v19_4 = v0_20;
                    v20_4 = v1_69;
                    v21_3 = v3_20;
                    v22_3 = v11_12;
                    v0_16 = 0;
                } else {
                    v19_4 = v0_20;
                    v0_16 = new android.support.v4.util.ArrayMap();
                    if (v4_25 == null) {
                        v20_4 = v1_69;
                        v21_3 = v3_20;
                        v22_3 = v11_12;
                    } else {
                        v20_4 = v1_69;
                        if (v4_25.c != null) {
                            long v1_57 = v4_25.c;
                            v21_3 = v3_20;
                            com.google.android.gms.internal.measurement.dg[] v3_21 = v1_57.length;
                            v22_3 = v11_12;
                            java.util.BitSet v11_8 = 0;
                            while (v11_8 < v3_21) {
                                Integer v24_1 = v3_21;
                                com.google.android.gms.internal.measurement.dg[] v3_22 = v1_57[v11_8];
                                android.support.v4.util.ArrayMap v25_1 = v1_57;
                                if (v3_22.a != null) {
                                    v0_16.put(v3_22.a, v3_22.b);
                                }
                                v11_8++;
                                v3_21 = v24_1;
                                v1_57 = v25_1;
                            }
                        }
                    }
                    v8_9.put(Integer.valueOf(v2_55), v0_16);
                }
                com.google.android.gms.internal.measurement.dg[] v3_24;
                if (v5_11 != null) {
                    v3_24 = v21_3;
                } else {
                    v5_11 = new java.util.BitSet();
                    v10_0.put(Integer.valueOf(v2_55), v5_11);
                    v3_24 = new java.util.BitSet();
                    v9_1.put(Integer.valueOf(v2_55), v3_24);
                }
                long v1_63 = 0;
                while (v1_63 < (v4_25.a.length << 6)) {
                    Integer v8_24;
                    Integer v24_3;
                    android.support.v4.util.ArrayMap v25_3;
                    java.util.BitSet v21_5;
                    if (!com.google.android.gms.measurement.internal.ep.a(v4_25.a, v1_63)) {
                        v21_5 = v8_9;
                        v24_3 = v9_1;
                        v25_3 = v10_0;
                        v8_24 = 0;
                    } else {
                        v21_5 = v8_9;
                        v24_3 = v9_1;
                        v25_3 = v10_0;
                        this.r().x().a("Filter already evaluated. audience ID, filter ID", Integer.valueOf(v2_55), Integer.valueOf(v1_63));
                        v3_24.set(v1_63);
                        if (!com.google.android.gms.measurement.internal.ep.a(v4_25.b, v1_63)) {
                        } else {
                            v5_11.set(v1_63);
                            v8_24 = 1;
                        }
                    }
                    if ((v0_16) && (v8_24 == null)) {
                        v0_16.remove(Integer.valueOf(v1_63));
                    }
                    v1_63++;
                    v8_9 = v21_5;
                    v9_1 = v24_3;
                    v10_0 = v25_3;
                }
                java.util.BitSet v21_4 = v8_9;
                Integer v24_2 = v9_1;
                android.support.v4.util.ArrayMap v25_2 = v10_0;
                long v1_65 = new com.google.android.gms.internal.measurement.cy();
                v12_8.put(Integer.valueOf(v2_55), v1_65);
                v1_65.d = Boolean.valueOf(0);
                v1_65.c = v4_25;
                v1_65.b = new com.google.android.gms.internal.measurement.de();
                v1_65.b.b = com.google.android.gms.measurement.internal.ep.a(v5_11);
                v1_65.b.a = com.google.android.gms.measurement.internal.ep.a(v3_24);
                if (v23) {
                    v1_65.b.c = ark>com.google.android.gms.measurement.internal.exark>.a(v0_16);
                    v6_8.put(Integer.valueOf(v2_55), new android.support.v4.util.ArrayMap());
                }
                v0_20 = v19_4;
                v1_69 = v20_4;
                v8_9 = v21_4;
                v11_12 = v22_3;
                v9_1 = v24_2;
                v10_0 = v25_2;
            }
            v21_2 = v8_9;
            v24_0 = v9_1;
            v25_0 = v10_0;
            v22_2 = v11_12;
        }
        boolean v46_3;
        com.google.android.gms.internal.measurement.dg[] v14_3;
        long v1_71;
        Integer v42_4;
        String v63_4;
        int v34_0;
        java.util.Iterator v37_1;
        String v47_2;
        if (p67 == null) {
            v37_1 = v6_8;
            v46_3 = v12_8;
            v47_2 = v21_2;
            v14_3 = v22_2;
            v42_4 = v24_0;
            v63_4 = v25_0;
            v34_0 = 1;
            v1_71 = p68;
        } else {
            android.support.v4.util.ArrayMap v9_3 = new android.support.v4.util.ArrayMap();
            Integer v8_14 = p67.length;
            java.util.BitSet v2_0 = 0;
            boolean v0_0 = 0;
            long v1_7 = 0;
            Integer v4_22 = 0;
            while (v4_22 < v8_14) {
                int v34_1;
                com.google.android.gms.internal.measurement.db v28_1;
                Integer v41;
                boolean v32;
                com.google.android.gms.internal.measurement.db v35_0;
                boolean v0_4;
                boolean v46_0;
                Integer v42_0;
                com.google.android.gms.internal.measurement.dg[] v14_0;
                String v63_0;
                com.google.android.gms.internal.measurement.da v33_0;
                java.util.Iterator v37_0;
                String v47_0;
                long[] v13_13;
                Integer v43_0;
                com.google.android.gms.internal.measurement.db[] v29;
                String v5_47 = v13_1[v4_22];
                Integer v10_16 = v5_47.b;
                java.util.BitSet v11_24 = v5_47.a;
                com.google.android.gms.internal.measurement.db v28_0 = v2_0;
                if (!this.t().c(v15_0, com.google.android.gms.measurement.internal.h.W)) {
                    v32 = v4_22;
                    v13_13 = v5_47;
                    v37_0 = v6_8;
                    v34_1 = 1;
                    v33_0 = v1_7;
                    v35_0 = v28_0;
                    v28_1 = v0_0;
                    v0_4 = v10_16;
                    v29 = v11_24;
                    com.google.android.gms.internal.measurement.dg[] v45;
                    String v44_0;
                    long v1_118;
                    String v5_48;
                    Integer v43_2;
                    java.util.BitSet v2_15;
                    long v1_116 = this.i().a(v15_0, v13_13.b);
                    if (v1_116 != 0) {
                        v41 = v8_14;
                        v43_2 = v9_3;
                        v46_0 = v12_8;
                        v2_15 = v13_13;
                        v5_48 = v15_0;
                        v47_0 = v21_2;
                        v45 = v22_2;
                        v42_0 = v24_0;
                        v44_0 = v25_0;
                        Integer v4_48 = new com.google.android.gms.measurement.internal.d;
                        v4_48(v1_116.a, v1_116.b, (v1_116.c + 1), (v1_116.d + 1), v1_116.e, v1_116.f, v1_116.g, v1_116.h, v1_116.i, v1_116.j);
                        v1_118 = v4_48;
                    } else {
                        this.r().i().a("Event aggregate wasn\'t created during raw event logging. appId, event", com.google.android.gms.measurement.internal.r.a(p66), this.o().a(v0_4));
                        v1_118 = new com.google.android.gms.measurement.internal.d;
                        v41 = v8_14;
                        v43_2 = v9_3;
                        v42_0 = v24_0;
                        v44_0 = v25_0;
                        v47_0 = v21_2;
                        v46_0 = v12_8;
                        v45 = v22_2;
                        v2_15 = v13_13;
                        v5_48 = v15_0;
                        v1_118(p66, v13_13.b, 1, 1, v13_13.c.longValue(), 0, 0, 0, 0, 0);
                    }
                    java.util.BitSet v11_0;
                    this.i().a(v1_118);
                    Integer v8_0 = v1_118.c;
                    Integer v10_1 = v43_2;
                    long v1_1 = ((java.util.Map) v10_1.get(v0_4));
                    if (v1_1 != 0) {
                        v11_0 = v1_1;
                    } else {
                        long v1_3 = this.i().f(v5_48, v0_4);
                        if (v1_3 == 0) {
                            v1_3 = new android.support.v4.util.ArrayMap();
                        }
                        v10_1.put(v0_4, v1_3);
                        v11_0 = v1_3;
                    }
                    String v12_0 = v11_0.keySet().iterator();
                    while (v12_0.hasNext()) {
                        long[] v13_0 = ((Integer) v12_0.next()).intValue();
                        com.google.android.gms.internal.measurement.dg[] v14_1 = v45;
                        if (!v14_1.contains(Integer.valueOf(v13_0))) {
                            int v18_0;
                            String v7_0;
                            String v12_1;
                            java.util.BitSet v2_4;
                            boolean v17_0;
                            java.util.Iterator v19_1;
                            boolean v15_1 = v46_0;
                            String v6_0 = v44_0;
                            Integer v4_5 = ((java.util.BitSet) v6_0.get(Integer.valueOf(v13_0)));
                            boolean v16_0 = v2_15;
                            Integer v43_1 = v10_1;
                            Integer v10_2 = v42_0;
                            java.util.BitSet v2_3 = ((java.util.BitSet) v10_2.get(Integer.valueOf(v13_0)));
                            if (!v23) {
                                v17_0 = v2_3;
                                v18_0 = v12_0;
                                v7_0 = v37_0;
                                v12_1 = v47_0;
                                v2_4 = 0;
                                v19_1 = 0;
                            } else {
                                v17_0 = v2_3;
                                v18_0 = v12_0;
                                v12_1 = v47_0;
                                v19_1 = ((java.util.Map) v12_1.get(Integer.valueOf(v13_0)));
                                v7_0 = v37_0;
                                v2_4 = ((java.util.Map) v7_0.get(Integer.valueOf(v13_0)));
                            }
                            java.util.BitSet v2_10;
                            boolean v17_1;
                            String v7_1;
                            if (((com.google.android.gms.internal.measurement.cy) v15_1.get(Integer.valueOf(v13_0))) != null) {
                                v37_0 = v7_0;
                                v2_10 = v17_0;
                                v17_1 = v19_1;
                                v7_1 = v2_4;
                            } else {
                                long v1_16 = new com.google.android.gms.internal.measurement.cy();
                                v15_1.put(Integer.valueOf(v13_0), v1_16);
                                v1_16.d = Boolean.valueOf(v34_1);
                                v4_5 = new java.util.BitSet();
                                v6_0.put(Integer.valueOf(v13_0), v4_5);
                                long v1_19 = new java.util.BitSet();
                                String v20_2 = v2_4;
                                v10_2.put(Integer.valueOf(v13_0), v1_19);
                                if (!v23) {
                                    v37_0 = v7_0;
                                    v2_10 = v1_19;
                                    v17_1 = v19_1;
                                    v7_1 = v20_2;
                                } else {
                                    java.util.BitSet v2_13 = new android.support.v4.util.ArrayMap();
                                    boolean v17_3 = v1_19;
                                    v12_1.put(Integer.valueOf(v13_0), v2_13);
                                    long v1_22 = new android.support.v4.util.ArrayMap();
                                    java.util.Iterator v19_2 = v2_13;
                                    v7_0.put(Integer.valueOf(v13_0), v1_22);
                                    v37_0 = v7_0;
                                    v2_10 = v17_3;
                                    v17_1 = v19_2;
                                    v7_1 = v1_22;
                                }
                            }
                            java.util.Iterator v19_3 = ((java.util.List) v11_0.get(Integer.valueOf(v13_0))).iterator();
                            while (v19_3.hasNext()) {
                                String v44_1;
                                String v47_1;
                                long v1_28 = ((com.google.android.gms.internal.measurement.cq) v19_3.next());
                                String v20_3 = v2_10;
                                java.util.BitSet v21_1 = v11_0;
                                if (!this.r().a(2)) {
                                    v44_1 = v6_0;
                                    v47_1 = v12_1;
                                } else {
                                    v44_1 = v6_0;
                                    v47_1 = v12_1;
                                    this.r().x().a("Evaluating filter. audience, filter, event", Integer.valueOf(v13_0), v1_28.a, this.o().a(v1_28.b));
                                    this.r().x().a("Filter definition", this.g().a(v1_28));
                                }
                                if ((v1_28.a != null) && (v1_28.a.intValue() <= 256)) {
                                    if (!v23) {
                                        Integer v42_1 = v10_2;
                                        boolean v46_1 = v15_1;
                                        boolean v15_3 = v16_0;
                                        String v12_3 = v17_1;
                                        java.util.BitSet v11_4 = v20_3;
                                        String v63_1 = v44_1;
                                        boolean v16_1 = v0_4;
                                        boolean v0_1 = v1_28;
                                        Integer v10_3 = v4_5;
                                        if (!v10_3.get(v0_1.a.intValue())) {
                                            Integer v4_14;
                                            long v1_33 = this.a(v0_1, v16_1, v29, v8_0);
                                            com.google.android.gms.measurement.internal.t vtmp270 = this.r().x();
                                            if (v1_33 != 0) {
                                                v4_14 = v1_33;
                                            } else {
                                                v4_14 = "null";
                                            }
                                            vtmp270.a("Event filter result", v4_14);
                                            if (v1_33 != 0) {
                                                v11_4.set(v0_1.a.intValue());
                                                if (v1_33.booleanValue()) {
                                                    v10_3.set(v0_1.a.intValue());
                                                }
                                                v4_5 = v10_3;
                                                v2_10 = v11_4;
                                                v17_1 = v12_3;
                                                v0_4 = v16_1;
                                                v11_0 = v21_1;
                                                v10_2 = v42_1;
                                                v12_1 = v47_1;
                                                v6_0 = v63_1;
                                                String v5 = p66;
                                                v16_0 = v15_3;
                                                v15_1 = v46_1;
                                            } else {
                                                v14_1.add(Integer.valueOf(v13_0));
                                                v4_5 = v10_3;
                                                v2_10 = v11_4;
                                                v17_1 = v12_3;
                                                v0_4 = v16_1;
                                                v11_0 = v21_1;
                                                v10_2 = v42_1;
                                                v12_1 = v47_1;
                                                v6_0 = v63_1;
                                                v5 = p66;
                                                v16_0 = v15_3;
                                                v15_1 = v46_1;
                                            }
                                        } else {
                                            this.r().x().a("Event filter already evaluated true. audience ID, filter ID", Integer.valueOf(v13_0), v0_1.a);
                                            v4_5 = v10_3;
                                            v2_10 = v11_4;
                                            v17_1 = v12_3;
                                            v0_4 = v16_1;
                                            v11_0 = v21_1;
                                            v10_2 = v42_1;
                                            v12_1 = v47_1;
                                            v6_0 = v63_1;
                                            v5 = p66;
                                            v16_0 = v15_3;
                                            v15_1 = v46_1;
                                        }
                                    } else {
                                        if ((v1_28 == 0) || ((v1_28.e == null) || (!v1_28.e.booleanValue()))) {
                                            String v12_4 = 0;
                                        } else {
                                            v12_4 = 1;
                                        }
                                        if ((v1_28 == 0) || ((v1_28.f == null) || (!v1_28.f.booleanValue()))) {
                                            int v22_1 = 0;
                                        } else {
                                            v22_1 = 1;
                                        }
                                        if ((!v4_5.get(v1_28.a.intValue())) || ((v12_4 != null) || (v22_1 != 0))) {
                                            Integer v4_16;
                                            String v5_5 = v1_28;
                                            java.util.BitSet v11_5 = v20_3;
                                            Integer v42_2 = v10_2;
                                            boolean v46_2 = v15_1;
                                            boolean v15_4 = v16_0;
                                            Integer v10_4 = v4_5;
                                            boolean v16_2 = v0_4;
                                            boolean v0_7 = v5_5;
                                            boolean v64 = v17_1;
                                            String v63_2 = v44_1;
                                            long v1_38 = this.a(v5_5, v0_4, v29, v8_0);
                                            com.google.android.gms.measurement.internal.t vtmp295 = this.r().x();
                                            if (v1_38 != 0) {
                                                v4_16 = v1_38;
                                            } else {
                                                v4_16 = "null";
                                            }
                                            vtmp295.a("Event filter result", v4_16);
                                            if (v1_38 != 0) {
                                                v11_5.set(v0_7.a.intValue());
                                                if (!v1_38.booleanValue()) {
                                                    v4_5 = v10_4;
                                                    v2_10 = v11_5;
                                                    v0_4 = v16_2;
                                                    v11_0 = v21_1;
                                                    v10_2 = v42_2;
                                                    v12_1 = v47_1;
                                                    v6_0 = v63_2;
                                                    v17_1 = v64;
                                                    v5 = p66;
                                                    v16_0 = v15_4;
                                                    v15_1 = v46_2;
                                                } else {
                                                    v10_4.set(v0_7.a.intValue());
                                                    if (((v12_4 == null) && (v22_1 == 0)) || (v15_4.c == null)) {
                                                        v4_5 = v10_4;
                                                        v2_10 = v11_5;
                                                        v0_4 = v16_2;
                                                        v11_0 = v21_1;
                                                        v10_2 = v42_2;
                                                        v12_1 = v47_1;
                                                        v6_0 = v63_2;
                                                        v17_1 = v64;
                                                        v5 = p66;
                                                        v16_0 = v15_4;
                                                        v15_1 = v46_2;
                                                    } else {
                                                        if (v22_1 == 0) {
                                                            String v12_5 = v64;
                                                            ark>com.google.android.gms.measurement.internal.exark>.a(v12_5, v0_7.a.intValue(), v15_4.c.longValue());
                                                            v4_5 = v10_4;
                                                            v2_10 = v11_5;
                                                            v17_1 = v12_5;
                                                            v0_4 = v16_2;
                                                            v11_0 = v21_1;
                                                            v10_2 = v42_2;
                                                            v12_1 = v47_1;
                                                            v6_0 = v63_2;
                                                            v5 = p66;
                                                            v16_0 = v15_4;
                                                            v15_1 = v46_2;
                                                        } else {
                                                            ark>com.google.android.gms.measurement.internal.exark>.b(v7_1, v0_7.a.intValue(), v15_4.c.longValue());
                                                            v4_5 = v10_4;
                                                            v2_10 = v11_5;
                                                            v0_4 = v16_2;
                                                            v11_0 = v21_1;
                                                            v10_2 = v42_2;
                                                            v12_1 = v47_1;
                                                            v6_0 = v63_2;
                                                            v17_1 = v64;
                                                            v5 = p66;
                                                            v16_0 = v15_4;
                                                            v15_1 = v46_2;
                                                        }
                                                    }
                                                }
                                            } else {
                                                v14_1.add(Integer.valueOf(v13_0));
                                                v4_5 = v10_4;
                                                v2_10 = v11_5;
                                                v0_4 = v16_2;
                                                v11_0 = v21_1;
                                                v10_2 = v42_2;
                                                v12_1 = v47_1;
                                                v6_0 = v63_2;
                                                v17_1 = v64;
                                                v5 = p66;
                                                v16_0 = v15_4;
                                                v15_1 = v46_2;
                                            }
                                        } else {
                                            this.r().x().a("Event filter already evaluated true and it is not associated with a dynamic audience. audience ID, filter ID", Integer.valueOf(v13_0), v1_28.a);
                                            v2_10 = v20_3;
                                            v11_0 = v21_1;
                                            v6_0 = v44_1;
                                            v12_1 = v47_1;
                                            v5 = p66;
                                        }
                                    }
                                } else {
                                    Integer v42_3 = v10_2;
                                    boolean v46_4 = v15_1;
                                    boolean v15_5 = v16_0;
                                    String v12_7 = v17_1;
                                    java.util.BitSet v11_7 = v20_3;
                                    String v63_3 = v44_1;
                                    boolean v16_3 = v0_4;
                                    Integer v10_6 = v4_5;
                                    this.r().i().a("Invalid event filter ID. appId, id", com.google.android.gms.measurement.internal.r.a(p66), String.valueOf(v1_28.a));
                                    v4_5 = v10_6;
                                    v2_10 = v11_7;
                                    v17_1 = v12_7;
                                    v0_4 = v16_3;
                                    v11_0 = v21_1;
                                    v10_2 = v42_3;
                                    v12_1 = v47_1;
                                    v6_0 = v63_3;
                                    v5 = p66;
                                    v16_0 = v15_5;
                                    v15_1 = v46_4;
                                }
                            }
                            v46_0 = v15_1;
                            v44_0 = v6_0;
                            v42_0 = v10_2;
                            v47_0 = v12_1;
                            v45 = v14_1;
                            v2_15 = v16_0;
                            v12_0 = v18_0;
                            v10_1 = v43_1;
                            v5 = p66;
                        } else {
                            this.r().x().a("Skipping failed audience ID", Integer.valueOf(v13_0));
                            v45 = v14_1;
                        }
                    }
                    v43_0 = v10_1;
                    v63_0 = v44_0;
                    v14_0 = v45;
                    v0_0 = v28_1;
                    v1_7 = v33_0;
                    v2_0 = v35_0;
                } else {
                    java.util.BitSet v2_83;
                    this.g();
                    com.google.android.gms.internal.measurement.dg[] v3_38 = ((Long) com.google.android.gms.measurement.internal.ep.b(v5_47, "_eid"));
                    if (v3_38 == null) {
                        v2_83 = 0;
                    } else {
                        v2_83 = 1;
                    }
                    Integer v4_39;
                    if (v2_83 == null) {
                        v32 = v4_22;
                        v4_39 = 0;
                    } else {
                        v32 = v4_22;
                        if (!v10_16.equals("_ep")) {
                        } else {
                            v4_39 = 1;
                        }
                    }
                    if (v4_39 == null) {
                        v13_13 = v5_47;
                        v37_0 = v6_8;
                        v34_1 = 1;
                        if (v2_83 == null) {
                        } else {
                            this.g();
                            long v1_102 = Long.valueOf(0);
                            boolean v0_47 = com.google.android.gms.measurement.internal.ep.b(v13_13, "_epc");
                            if (!v0_47) {
                                v0_47 = v1_102;
                            }
                            boolean v0_50;
                            boolean v16_12 = ((Long) v0_47).longValue();
                            if (v16_12 > 0) {
                                v0_50 = v3_38;
                                this.i().a(p66, v3_38, v16_12, v13_13);
                            } else {
                                this.r().i().a("Complex event with zero extra param count. eventName", v10_16);
                                v0_50 = v3_38;
                            }
                            v33_0 = v0_50;
                            v0_4 = v10_16;
                            v29 = v11_24;
                            v28_1 = v13_13;
                            v35_0 = v16_12;
                        }
                    } else {
                        this.g();
                        Integer v10_18 = ((String) com.google.android.gms.measurement.internal.ep.b(v5_47, "_en"));
                        if (!android.text.TextUtils.isEmpty(v10_18)) {
                            if ((v0_0) && ((v1_7 != 0) && (v3_38.longValue() == v1_7.longValue()))) {
                                Integer v4_41 = v0_0;
                                v33_0 = v1_7;
                            } else {
                                java.util.BitSet v2_90 = this.i().a(v15_0, v3_38);
                                if ((v2_90 != null) && (v2_90.first != null)) {
                                    boolean v0_55 = ((com.google.android.gms.internal.measurement.da) v2_90.first);
                                    long v1_108 = ((Long) v2_90.second).longValue();
                                    this.g();
                                    v28_0 = v1_108;
                                    v33_0 = ((Long) com.google.android.gms.measurement.internal.ep.b(v0_55, "_eid"));
                                    v4_41 = v0_55;
                                } else {
                                    v37_0 = v6_8;
                                    this.r().c_().a("Extra parameter without existing main event. eventName, eventId", v10_18, v3_38);
                                    v41 = v8_14;
                                    v43_0 = v9_3;
                                    v46_0 = v12_8;
                                    v47_0 = v21_2;
                                    v14_0 = v22_2;
                                    v42_0 = v24_0;
                                    v63_0 = v25_0;
                                    v2_0 = v28_0;
                                    v4_22 = (v32 + 1);
                                    v13_1 = p67;
                                    v22_2 = v14_0;
                                    v6_8 = v37_0;
                                    v8_14 = v41;
                                    v24_0 = v42_0;
                                    v9_3 = v43_0;
                                    v12_8 = v46_0;
                                    v21_2 = v47_0;
                                    v25_0 = v63_0;
                                    v15_0 = p66;
                                }
                            }
                            long v1_55;
                            com.google.android.gms.internal.measurement.db v28_2 = (v28_0 - 1);
                            if (v28_2 > 0) {
                                boolean v17_7 = v4_41;
                                int v18 = 0;
                                v13_13 = v5_47;
                                v34_1 = 1;
                                v37_0 = v6_8;
                                this.i().a(p66, v3_38, v28_2, v17_7);
                                v1_55 = v17_7;
                            } else {
                                v1_55 = this.i();
                                v1_55.d();
                                v1_55.r().x().a("Clearing complex main event info. appId", v15_0);
                                try {
                                    boolean v0_60 = v1_55.y();
                                    boolean v17_8 = v4_41;
                                    try {
                                        Integer v4_47 = new String[1];
                                        try {
                                            v4_47[0] = v15_0;
                                            v0_60.execSQL("delete from main_event_params where app_id=?", v4_47);
                                            v13_13 = v5_47;
                                            v37_0 = v6_8;
                                            v1_55 = v17_8;
                                            v34_1 = 1;
                                        } catch (boolean v0_61) {
                                            v1_55.r().c_().a("Error clearing complex main event", v0_61);
                                            v13_13 = v5_47;
                                            v37_0 = v6_8;
                                            v1_55 = v17_8;
                                            v34_1 = 1;
                                        }
                                    } catch (boolean v0_61) {
                                    }
                                } catch (boolean v0_61) {
                                    v17_8 = v4_41;
                                }
                            }
                            boolean v0_66 = new com.google.android.gms.internal.measurement.db[(v1_55.a.length + v11_24.length)];
                            java.util.BitSet v2_96 = v1_55.a;
                            com.google.android.gms.internal.measurement.dg[] v3_40 = v2_96.length;
                            Integer v4_19 = 0;
                            String v5_8 = 0;
                            while (v4_19 < v3_40) {
                                String v6_7 = v2_96[v4_19];
                                this.g();
                                boolean v17_4 = v1_55;
                                if (com.google.android.gms.measurement.internal.ep.a(v13_13, v6_7.a) == null) {
                                    long v1_54 = (v5_8 + 1);
                                    v0_66[v5_8] = v6_7;
                                    v5_8 = v1_54;
                                }
                                v4_19++;
                                v1_55 = v17_4;
                            }
                            boolean v17_9 = v1_55;
                            if (v5_8 <= null) {
                                this.r().i().a("No unique parameters in main event. eventName", v10_18);
                                v0_4 = v10_18;
                                v35_0 = v28_2;
                                v29 = v11_24;
                                v28_1 = v17_9;
                            } else {
                                long v1_113 = v11_24.length;
                                java.util.BitSet v2_48 = 0;
                                while (v2_48 < v1_113) {
                                    Integer v4_18 = (v5_8 + 1);
                                    v0_66[v5_8] = v11_24[v2_48];
                                    v2_48++;
                                    v5_8 = v4_18;
                                }
                                if (v5_8 != v0_66.length) {
                                    v0_66 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v0_66, v5_8));
                                }
                                v35_0 = v28_2;
                                v29 = v0_66;
                                v0_4 = v10_18;
                                v28_1 = v17_9;
                            }
                        } else {
                            this.r().c_().a("Extra parameter without an event name. eventId", v3_38);
                            v37_0 = v6_8;
                        }
                    }
                }
            }
            v37_1 = v6_8;
            v46_3 = v12_8;
            v47_2 = v21_2;
            v14_3 = v22_2;
            v42_4 = v24_0;
            v63_4 = v25_0;
            v34_0 = 1;
            v1_71 = p68;
        }
        java.util.BitSet v21_7;
        String v44_2;
        if (v1_71 == 0) {
            v21_7 = v47_2;
            v44_2 = v63_4;
        } else {
            boolean v0_41 = new android.support.v4.util.ArrayMap();
            java.util.BitSet v2_70 = v1_71.length;
            com.google.android.gms.internal.measurement.dg[] v3_35 = 0;
            while (v3_35 < v2_70) {
                Integer v4_36 = v1_71[v3_35];
                String v5_24 = ((java.util.Map) v0_41.get(v4_36.b));
                if (v5_24 == null) {
                    v5_24 = this.i().g(p66, v4_36.b);
                    if (v5_24 == null) {
                        v5_24 = new android.support.v4.util.ArrayMap();
                    }
                    v0_41.put(v4_36.b, v5_24);
                }
                String v6_12 = v5_24.keySet().iterator();
                while (v6_12.hasNext()) {
                    Integer v8_31 = ((Integer) v6_12.next()).intValue();
                    if (!v14_3.contains(Integer.valueOf(v8_31))) {
                        java.util.BitSet v2_65;
                        com.google.android.gms.internal.measurement.df v67_3;
                        boolean v17_6;
                        boolean v16_7;
                        long v1_72;
                        boolean v0_31;
                        Integer v10_8 = v46_3;
                        String v12_9 = v63_4;
                        java.util.BitSet v11_19 = ((java.util.BitSet) v12_9.get(Integer.valueOf(v8_31)));
                        boolean v15_9 = v42_4;
                        long[] v13_11 = ((java.util.BitSet) v15_9.get(Integer.valueOf(v8_31)));
                        if (!v23) {
                            v67_3 = v0_41;
                            v17_6 = v2_70;
                            v2_65 = v37_1;
                            v1_72 = v47_2;
                            v0_31 = 0;
                            v16_7 = 0;
                        } else {
                            v67_3 = v0_41;
                            v1_72 = v47_2;
                            v16_7 = ((java.util.Map) v1_72.get(Integer.valueOf(v8_31)));
                            v17_6 = v2_70;
                            v2_65 = v37_1;
                            v0_31 = ((java.util.Map) v2_65.get(Integer.valueOf(v8_31)));
                        }
                        android.support.v4.util.ArrayMap v9_11;
                        boolean v0_37;
                        if (((com.google.android.gms.internal.measurement.cy) v10_8.get(Integer.valueOf(v8_31))) != null) {
                            v9_11 = v0_31;
                            v37_1 = v2_65;
                            v0_37 = v16_7;
                        } else {
                            android.support.v4.util.ArrayMap v9_13 = new com.google.android.gms.internal.measurement.cy();
                            v10_8.put(Integer.valueOf(v8_31), v9_13);
                            v9_13.d = Boolean.valueOf(v34_0);
                            v11_19 = new java.util.BitSet();
                            v12_9.put(Integer.valueOf(v8_31), v11_19);
                            v13_11 = new java.util.BitSet();
                            v15_9.put(Integer.valueOf(v8_31), v13_11);
                            if (!v23) {
                                v9_11 = v0_31;
                                v37_1 = v2_65;
                                v0_37 = v16_7;
                            } else {
                                boolean v0_39 = new android.support.v4.util.ArrayMap();
                                v1_72.put(Integer.valueOf(v8_31), v0_39);
                                v9_11 = new android.support.v4.util.ArrayMap();
                                boolean v16_8 = v0_39;
                                v2_65.put(Integer.valueOf(v8_31), v9_11);
                                v37_1 = v2_65;
                                v0_37 = v16_8;
                            }
                        }
                        java.util.BitSet v2_69 = ((java.util.List) v5_24.get(Integer.valueOf(v8_31))).iterator();
                        while (v2_69.hasNext()) {
                            java.util.BitSet v21_8;
                            int v18_4 = v2_69;
                            java.util.BitSet v2_72 = ((com.google.android.gms.internal.measurement.ct) v2_69.next());
                            boolean v16_11 = v5_24;
                            java.util.Iterator v19_8 = v6_12;
                            if (!this.r().a(2)) {
                                v21_8 = v1_72;
                                v46_3 = v10_8;
                                v42_4 = v15_9;
                            } else {
                                v21_8 = v1_72;
                                v42_4 = v15_9;
                                v46_3 = v10_8;
                                this.r().x().a("Evaluating filter. audience, filter, property", Integer.valueOf(v8_31), v2_72.a, this.o().c(v2_72.b));
                                this.r().x().a("Filter definition", this.g().a(v2_72));
                            }
                            if ((v2_72.a != null) && (v2_72.a.intValue() <= 256)) {
                                if (!v23) {
                                    String v44_3 = v12_9;
                                    if (!v11_19.get(v2_72.a.intValue())) {
                                        Integer v10_11;
                                        long v1_82 = this.a(v2_72, v4_36);
                                        String v5_34 = this.r().x();
                                        if (v1_82 != 0) {
                                            v10_11 = v1_82;
                                        } else {
                                            v10_11 = "null";
                                        }
                                        v5_34.a("Property filter result", v10_11);
                                        if (v1_82 != 0) {
                                            v13_11.set(v2_72.a.intValue());
                                            if (v1_82.booleanValue()) {
                                                v11_19.set(v2_72.a.intValue());
                                            }
                                            v5_24 = v16_11;
                                            v2_69 = v18_4;
                                            v6_12 = v19_8;
                                            v1_72 = v21_8;
                                            v15_9 = v42_4;
                                            v12_9 = v44_3;
                                            v10_8 = v46_3;
                                        } else {
                                            v14_3.add(Integer.valueOf(v8_31));
                                            v5_24 = v16_11;
                                            v2_69 = v18_4;
                                            v6_12 = v19_8;
                                            v1_72 = v21_8;
                                            v15_9 = v42_4;
                                            v12_9 = v44_3;
                                            v10_8 = v46_3;
                                        }
                                    } else {
                                        this.r().x().a("Property filter already evaluated true. audience ID, filter ID", Integer.valueOf(v8_31), v2_72.a);
                                        v5_24 = v16_11;
                                        v2_69 = v18_4;
                                        v6_12 = v19_8;
                                        v1_72 = v21_8;
                                        v15_9 = v42_4;
                                        v12_9 = v44_3;
                                        v10_8 = v46_3;
                                    }
                                } else {
                                    if ((v2_72 == null) || ((v2_72.d == null) || (!v2_72.d.booleanValue()))) {
                                        long v1_92 = 0;
                                    } else {
                                        v1_92 = 1;
                                    }
                                    if ((v2_72 == null) || ((v2_72.e == null) || (!v2_72.e.booleanValue()))) {
                                        String v6_22 = 0;
                                    } else {
                                        v6_22 = 1;
                                    }
                                    if ((!v11_19.get(v2_72.a.intValue())) || ((v1_92 != 0) || (v6_22 != null))) {
                                        String v44_4;
                                        String v12_10;
                                        Integer v10_12 = v37_1;
                                        boolean v15_11 = this.a(v2_72, v4_36);
                                        String v5_38 = this.r().x();
                                        v37_1 = v10_12;
                                        if (v15_11) {
                                            v44_4 = v12_9;
                                            v12_10 = v15_11;
                                        } else {
                                            v44_4 = v12_9;
                                            v12_10 = "null";
                                        }
                                        v5_38.a("Property filter result", v12_10);
                                        if (v15_11) {
                                            v13_11.set(v2_72.a.intValue());
                                            v11_19.set(v2_72.a.intValue(), v15_11.booleanValue());
                                            if (((!v15_11.booleanValue()) || ((v1_92 == 0) && (v6_22 == null))) || (v4_36.a == null)) {
                                                v5_24 = v16_11;
                                                v2_69 = v18_4;
                                                v6_12 = v19_8;
                                                v1_72 = v21_8;
                                                v15_9 = v42_4;
                                                v12_9 = v44_4;
                                                v10_8 = v46_3;
                                            } else {
                                                if (v6_22 == null) {
                                                    ark>com.google.android.gms.measurement.internal.exark>.a(v0_37, v2_72.a.intValue(), v4_36.a.longValue());
                                                    v5_24 = v16_11;
                                                    v2_69 = v18_4;
                                                    v6_12 = v19_8;
                                                    v1_72 = v21_8;
                                                    v15_9 = v42_4;
                                                    v12_9 = v44_4;
                                                    v10_8 = v46_3;
                                                } else {
                                                    ark>com.google.android.gms.measurement.internal.exark>.b(v9_11, v2_72.a.intValue(), v4_36.a.longValue());
                                                    v5_24 = v16_11;
                                                    v2_69 = v18_4;
                                                    v6_12 = v19_8;
                                                    v1_72 = v21_8;
                                                    v15_9 = v42_4;
                                                    v12_9 = v44_4;
                                                    v10_8 = v46_3;
                                                }
                                            }
                                        } else {
                                            v14_3.add(Integer.valueOf(v8_31));
                                            v5_24 = v16_11;
                                            v2_69 = v18_4;
                                            v6_12 = v19_8;
                                            v1_72 = v21_8;
                                            v15_9 = v42_4;
                                            v12_9 = v44_4;
                                            v10_8 = v46_3;
                                        }
                                    } else {
                                        this.r().x().a("Property filter already evaluated true and it is not associated with a dynamic audience. audience ID, filter ID", Integer.valueOf(v8_31), v2_72.a);
                                        v5_24 = v16_11;
                                        v2_69 = v18_4;
                                        v6_12 = v19_8;
                                        v1_72 = v21_8;
                                        v15_9 = v42_4;
                                        v10_8 = v46_3;
                                    }
                                }
                            } else {
                                String v44_5 = v12_9;
                                this.r().i().a("Invalid property filter ID. appId, id", com.google.android.gms.measurement.internal.r.a(p66), String.valueOf(v2_72.a));
                                v14_3.add(Integer.valueOf(v8_31));
                                v0_41 = v67_3;
                                v5_24 = v16_11;
                                v2_70 = v17_6;
                                v6_12 = v19_8;
                                v47_2 = v21_8;
                                v63_4 = v44_5;
                                String v7 = p66;
                            }
                        }
                        v0_41 = v67_3;
                        v47_2 = v1_72;
                        v46_3 = v10_8;
                        v63_4 = v12_9;
                        v42_4 = v15_9;
                        v2_70 = v17_6;
                        v7 = p66;
                    } else {
                        this.r().x().a("Skipping failed audience ID", Integer.valueOf(v8_31));
                    }
                }
                boolean v17 = v2_70;
                String v44 = v63_4;
                v3_35++;
                v1_71 = p68;
            }
            v21_7 = v47_2;
            v44_2 = v63_4;
        }
        long v1_105 = new com.google.android.gms.internal.measurement.cy[v44_2.size()];
        java.util.BitSet v2_58 = v44_2.keySet().iterator();
        com.google.android.gms.internal.measurement.dg[] v3_34 = 0;
        while (v2_58.hasNext()) {
            boolean v0_74 = ((Integer) v2_58.next()).intValue();
            if (!v14_3.contains(Integer.valueOf(v0_74))) {
                String v5_0 = v46_3;
                Integer v4_9 = ((com.google.android.gms.internal.measurement.cy) v5_0.get(Integer.valueOf(v0_74)));
                if (v4_9 == null) {
                    v4_9 = new com.google.android.gms.internal.measurement.cy();
                }
                java.util.BitSet v11_6;
                com.google.android.gms.internal.measurement.df v67_1;
                String v12_6;
                String v6_1 = (v3_34 + 1);
                v1_105[v3_34] = v4_9;
                v4_9.a = Integer.valueOf(v0_74);
                v4_9.b = new com.google.android.gms.internal.measurement.de();
                android.support.v4.util.ArrayMap v9_2 = v44_2;
                v4_9.b.b = com.google.android.gms.measurement.internal.ep.a(((java.util.BitSet) v9_2.get(Integer.valueOf(v0_74))));
                Integer v10_5 = v42_4;
                v4_9.b.a = com.google.android.gms.measurement.internal.ep.a(((java.util.BitSet) v10_5.get(Integer.valueOf(v0_74))));
                if (!v23) {
                    v67_1 = v2_58;
                    v46_3 = v5_0;
                    v11_6 = v21_7;
                    v12_6 = v37_1;
                } else {
                    boolean v15_7;
                    v11_6 = v21_7;
                    v4_9.b.c = ark>com.google.android.gms.measurement.internal.exark>.a(((java.util.Map) v11_6.get(Integer.valueOf(v0_74))));
                    com.google.android.gms.internal.measurement.dg[] v3_17 = v4_9.b;
                    v12_6 = v37_1;
                    Integer v8_18 = ((java.util.Map) v12_6.get(Integer.valueOf(v0_74)));
                    if (v8_18 != null) {
                        v15_7 = new com.google.android.gms.internal.measurement.df[v8_18.size()];
                        boolean v16_5 = v8_18.keySet().iterator();
                        boolean v17_5 = 0;
                        while (v16_5.hasNext()) {
                            boolean v46_5;
                            long[] v13_3 = ((Integer) v16_5.next());
                            com.google.android.gms.internal.measurement.df v67_2 = v2_58;
                            java.util.BitSet v2_57 = new com.google.android.gms.internal.measurement.df();
                            v2_57.a = v13_3;
                            long[] v13_5 = ((java.util.List) v8_18.get(v13_3));
                            if (v13_5 == null) {
                                v46_5 = v5_0;
                            } else {
                                java.util.Collections.sort(v13_5);
                                v46_5 = v5_0;
                                String v5_15 = new long[v13_5.size()];
                                long[] v13_6 = v13_5.iterator();
                                int v18_3 = 0;
                                while (v13_6.hasNext()) {
                                    String v20_5 = (v18_3 + 1);
                                    v5_15[v18_3] = ((Long) v13_6.next()).longValue();
                                    v18_3 = v20_5;
                                }
                                v2_57.b = v5_15;
                            }
                            String v5_16 = (v17_5 + 1);
                            v15_7[v17_5] = v2_57;
                            v2_58 = v67_2;
                            v17_5 = v5_16;
                            v5_0 = v46_5;
                        }
                        v67_1 = v2_58;
                        v46_3 = v5_0;
                    } else {
                        Integer v8_26 = new com.google.android.gms.internal.measurement.df[0];
                        v67_1 = v2_58;
                        v46_3 = v5_0;
                        v15_7 = v8_26;
                    }
                    v3_17.d = v15_7;
                }
                java.util.BitSet v2_59 = this.i();
                com.google.android.gms.internal.measurement.dg[] v3_27 = v4_9.b;
                v2_59.k();
                v2_59.d();
                com.google.android.gms.common.internal.r.a(p66);
                com.google.android.gms.common.internal.r.a(v3_27);
                try {
                    Integer v4_31 = new byte[v3_27.e()];
                    try {
                        String v5_18 = com.google.android.gms.internal.measurement.ix.a(v4_31, 0, v4_31.length);
                        v3_27.a(v5_18);
                        v5_18.a();
                        com.google.android.gms.internal.measurement.dg[] v3_29 = new android.content.ContentValues();
                        v3_29.put("app_id", p66);
                        v3_29.put("audience_id", Integer.valueOf(v0_74));
                        v3_29.put("current_results", v4_31);
                        try {
                            try {
                                if (v2_59.y().insertWithOnConflict("audience_filter_values", 0, v3_29, 5) != -1) {
                                    v2_58 = v67_1;
                                    v3_34 = v6_1;
                                    v44_2 = v9_2;
                                    v42_4 = v10_5;
                                    v21_7 = v11_6;
                                    v37_1 = v12_6;
                                } else {
                                    v2_59.r().c_().a("Failed to insert filter results (got -1). appId", com.google.android.gms.measurement.internal.r.a(p66));
                                }
                            } catch (boolean v0_27) {
                                v2_59.r().c_().a("Error storing filter results. appId", com.google.android.gms.measurement.internal.r.a(p66), v0_27);
                            }
                        } catch (boolean v0_27) {
                        }
                    } catch (boolean v0_23) {
                        boolean v15 = 0;
                        v2_59.r().c_().a("Configuration loss. Failed to serialize filter results. appId", com.google.android.gms.measurement.internal.r.a(p66), v0_23);
                    }
                } catch (boolean v0_23) {
                }
            }
        }
        return ((com.google.android.gms.internal.measurement.cy[]) java.util.Arrays.copyOf(v1_105, v3_34));
    }

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


    private final void b(com.google.android.gms.measurement.internal.zzag p25, com.google.android.gms.measurement.internal.zzk p26)
    {
        com.google.android.gms.common.internal.r.a(p26);
        com.google.android.gms.common.internal.r.a(p26.a);
        int v4_81 = System.nanoTime();
        void v24_1 = this.w();
        v24_1.j();
        int v15_0 = p26.a;
        if (v24_1.g().a(p25, p26)) {
            if (p26.h) {
                int v14_0 = 0;
                if (!v24_1.s().b(v15_0, p25.a)) {
                    if (this.j.r().a(2)) {
                        this.j.r().x().a("Logging event", this.j.k().a(p25));
                    }
                    v24_1.d().f();
                    try {
                        this.e(p26);
                    } catch (boolean v0_95) {
                        v24_1.d().x();
                        throw v0_95;
                    }
                    if (("_iap".equals(p25.a)) || ("ecommerce_purchase".equals(p25.a))) {
                        long v6_1;
                        boolean v0_2;
                        boolean v0_54 = p25.b.d("currency");
                        if (!"ecommerce_purchase".equals(p25.a)) {
                            v6_1 = p25.b.b("value").longValue();
                            if (!android.text.TextUtils.isEmpty(v0_54)) {
                                boolean v0_3 = v0_54.toUpperCase(java.util.Locale.US);
                                if (v0_3.matches("[A-Z]{3}")) {
                                    boolean v0_7;
                                    long v8_6 = String.valueOf("_ltv_");
                                    boolean v0_5 = String.valueOf(v0_3);
                                    if (v0_5.length() == 0) {
                                        v0_7 = new String(v8_6);
                                    } else {
                                        v0_7 = v8_6.concat(v0_5);
                                    }
                                    boolean v0_13;
                                    int v9_2 = v0_7;
                                    boolean v0_9 = v24_1.d().c(v15_0, v9_2);
                                    if (!v0_9) {
                                        long v8_10 = v24_1.d();
                                        boolean v0_18 = (this.j.b().b(v15_0, com.google.android.gms.measurement.internal.h.M) - 1);
                                        com.google.android.gms.common.internal.r.a(v15_0);
                                        v8_10.d();
                                        v8_10.k();
                                        try {
                                            long v10_4 = v8_10.y();
                                            Long v12_4 = new String[3];
                                            v12_4[0] = v15_0;
                                            v12_4[1] = v15_0;
                                            v12_4[2] = String.valueOf(v0_18);
                                            v10_4.execSQL("delete from user_attributes where app_id=? and name in (select name from user_attributes where app_id=? and name like \'_ltv_%\' order by set_timestamp desc limit ?,10);", v12_4);
                                        } catch (boolean v0_20) {
                                            v8_10.r().c_().a("Error pruning currencies. appId", com.google.android.gms.measurement.internal.r.a(v15_0), v0_20);
                                        }
                                        v0_13 = new com.google.android.gms.measurement.internal.er;
                                        v0_13(v15_0, p25.c, v9_2, this.j.m().a(), Long.valueOf(v6_1));
                                    } else {
                                        if ((v0_9.e instanceof Long)) {
                                            v0_13 = new com.google.android.gms.measurement.internal.er;
                                            v0_13(v15_0, p25.c, v9_2, this.j.m().a(), Long.valueOf((((Long) v0_9.e).longValue() + v6_1)));
                                        } else {
                                        }
                                    }
                                    if (!v24_1.d().a(v0_13)) {
                                        this.j.r().c_().a("Too many unique user properties are set. Ignoring user property. appId", com.google.android.gms.measurement.internal.r.a(v15_0), this.j.k().c(v0_13.c), v0_13.e);
                                        this.j.j().a(v15_0, 9, 0, 0, 0);
                                    }
                                }
                            }
                            v0_2 = 1;
                        } else {
                            long v6_91 = (p25.b.c("value").doubleValue() * 1000000.0);
                            if (v6_91 == 0) {
                                v6_91 = (((double) p25.b.b("value").longValue()) * 1000000.0);
                            }
                            if ((v6_91 > 9.223372036854776e+18) || (v6_91 < -9.223372036854776e+18)) {
                                this.j.r().i().a("Data lost. Currency value is too big. appId", com.google.android.gms.measurement.internal.r.a(v15_0), Double.valueOf(v6_91));
                                v0_2 = 0;
                            } else {
                                v6_1 = Math.round(v6_91);
                            }
                        }
                        if (!v0_2) {
                            v24_1.d().w();
                            v24_1.d().x();
                            return;
                        }
                    }
                    boolean v0_26 = com.google.android.gms.measurement.internal.es.a(p25.a);
                    int v16_1 = "_err".equals(p25.a);
                    Object v22 = v4_81;
                    long v5_0 = v24_1.d().a(v24_1.x(), v15_0, 1, v0_26, 0, v16_1, 0);
                    long v6_14 = (v5_0.b - ((long) ((Integer) com.google.android.gms.measurement.internal.h.s.b()).intValue()));
                    if (v6_14 <= 0) {
                        if (v0_26) {
                            int v17_1 = v5_0;
                            long v6_16 = (v5_0.a - ((long) ((Integer) com.google.android.gms.measurement.internal.h.u.b()).intValue()));
                            if (v6_16 <= 0) {
                                v5_0 = v17_1;
                            } else {
                                if ((v6_16 % 1000) == 1) {
                                    this.j.r().c_().a("Data loss. Too many public events logged. appId, count", com.google.android.gms.measurement.internal.r.a(v15_0), Long.valueOf(v17_1.a));
                                }
                                this.j.j().a(v15_0, 16, "_ev", p25.a, 0);
                                v24_1.d().w();
                                v24_1.d().x();
                                return;
                            }
                        }
                        if (v16_1 != 0) {
                            long v6_18 = (v5_0.d - ((long) Math.max(0, Math.min(1000000, this.j.b().b(p26.a, com.google.android.gms.measurement.internal.h.t)))));
                            if (v6_18 > 0) {
                                if (v6_18 == 1) {
                                    this.j.r().c_().a("Too many error events logged. appId, count", com.google.android.gms.measurement.internal.r.a(v15_0), Long.valueOf(v5_0.d));
                                }
                                v24_1.d().w();
                                v24_1.d().x();
                                return;
                            }
                        }
                        int v4_9 = p25.b.b();
                        this.j.j().a(v4_9, "_o", p25.c);
                        if (this.j.j().f(v15_0)) {
                            this.j.j().a(v4_9, "_dbg", Long.valueOf(1));
                            this.j.j().a(v4_9, "_r", Long.valueOf(1));
                        }
                        if ((this.j.b().q(p26.a)) && ("_s".equals(p25.a))) {
                            long v5_16 = v24_1.d().c(p26.a, "_sno");
                            if ((v5_16 != 0) && ((v5_16.e instanceof Long))) {
                                this.j.j().a(v4_9, "_sno", v5_16.e);
                            }
                        }
                        long v5_19 = v24_1.d().c(v15_0);
                        if (v5_19 > 0) {
                            this.j.r().i().a("Data lost. Too many events stored on disk, deleted. appId", com.google.android.gms.measurement.internal.r.a(v15_0), Long.valueOf(v5_19));
                        }
                        boolean v0_35;
                        long v5_21 = new com.google.android.gms.measurement.internal.c;
                        String v2_1 = v15_0;
                        v5_21(this.j, p25.c, v15_0, p25.a, p25.d, 0, v4_9);
                        int v4_11 = v24_1.d().a(v2_1, v5_21.b);
                        if (v4_11 != 0) {
                            v5_21 = v5_21.a(this.j, v4_11.e);
                            v0_35 = v4_11.a(v5_21.c);
                        } else {
                            if ((v24_1.d().f(v2_1) < 500) || (!v0_26)) {
                                v0_35 = new com.google.android.gms.measurement.internal.d;
                                v0_35(v2_1, v5_21.b, 0, 0, v5_21.c, 0, 0, 0, 0, 0);
                            } else {
                                this.j.r().c_().a("Too many event names used, ignoring event. appId, name, supported count", com.google.android.gms.measurement.internal.r.a(v2_1), this.j.k().a(v5_21.b), Integer.valueOf(500));
                                this.j.j().a(v2_1, 8, 0, 0, 0);
                                v24_1.d().x();
                                return;
                            }
                        }
                        int v4_16;
                        v24_1.d().a(v0_35);
                        v24_1 = v24_1.w();
                        v24_1.j();
                        com.google.android.gms.common.internal.r.a(v5_21);
                        com.google.android.gms.common.internal.r.a(p26);
                        com.google.android.gms.common.internal.r.a(v5_21.a);
                        com.google.android.gms.common.internal.r.b(v5_21.a.equals(p26.a));
                        String v2_5 = new com.google.android.gms.internal.measurement.dd();
                        v2_5.a = Integer.valueOf(1);
                        v2_5.i = "android";
                        v2_5.o = p26.a;
                        v2_5.n = p26.d;
                        v2_5.p = p26.c;
                        if (p26.j != -2147483648) {
                            v4_16 = Integer.valueOf(((int) p26.j));
                        } else {
                            v4_16 = 0;
                        }
                        int v4_21;
                        v2_5.C = v4_16;
                        v2_5.q = Long.valueOf(p26.e);
                        v2_5.y = p26.b;
                        v2_5.I = p26.r;
                        if (p26.f != 0) {
                            v4_21 = Long.valueOf(p26.f);
                        } else {
                            v4_21 = 0;
                        }
                        v2_5.v = v4_21;
                        if (this.j.b().d(p26.a, com.google.android.gms.measurement.internal.h.as)) {
                            v2_5.K = v24_1.g().f();
                        }
                        int v4_29 = this.j.c().a(p26.a);
                        if ((v4_29 == 0) || (android.text.TextUtils.isEmpty(((CharSequence) v4_29.first)))) {
                            if ((!this.j.y().a(this.j.n())) && (p26.p)) {
                                int v4_37 = android.provider.Settings$Secure.getString(this.j.n().getContentResolver(), "android_id");
                                if (v4_37 != 0) {
                                    if (v4_37.isEmpty()) {
                                        this.j.r().i().a("empty secure ID. appId", com.google.android.gms.measurement.internal.r.a(v2_5.o));
                                    }
                                } else {
                                    this.j.r().i().a("null secure ID. appId", com.google.android.gms.measurement.internal.r.a(v2_5.o));
                                    v4_37 = "null";
                                }
                                v2_5.D = v4_37;
                            }
                        } else {
                            if (p26.o) {
                                v2_5.s = ((String) v4_29.first);
                                v2_5.t = ((Boolean) v4_29.second);
                            }
                        }
                        this.j.y().A();
                        v2_5.k = android.os.Build.MODEL;
                        this.j.y().A();
                        v2_5.j = android.os.Build$VERSION.RELEASE;
                        v2_5.m = Integer.valueOf(((int) this.j.y().b_()));
                        v2_5.l = this.j.y().g();
                        v2_5.r = 0;
                        v2_5.d = 0;
                        v2_5.e = 0;
                        v2_5.f = 0;
                        v2_5.F = Long.valueOf(p26.l);
                        if ((this.j.C()) && (com.google.android.gms.measurement.internal.fa.w())) {
                            v2_5.G = 0;
                        }
                        boolean v0_52 = v24_1.d().b(p26.a);
                        if (!v0_52) {
                            v0_52 = new com.google.android.gms.measurement.internal.eu(this.j, p26.a);
                            v0_52.a(this.j.j().k());
                            v0_52.e(p26.k);
                            v0_52.b(p26.b);
                            v0_52.d(this.j.c().b(p26.a));
                            v0_52.f(0);
                            v0_52.a(0);
                            v0_52.b(0);
                            v0_52.f(p26.c);
                            v0_52.c(p26.j);
                            v0_52.g(p26.d);
                            v0_52.d(p26.e);
                            v0_52.e(p26.f);
                            v0_52.a(p26.h);
                            v0_52.o(p26.l);
                            v24_1.d().a(v0_52);
                        }
                        v2_5.u = v0_52.c();
                        v2_5.B = v0_52.g();
                        boolean v0_57 = v24_1.d().a(p26.a);
                        Long v3_3 = new com.google.android.gms.internal.measurement.dg[v0_57.size()];
                        v2_5.c = v3_3;
                        Long v3_4 = 0;
                        while (v3_4 < v0_57.size()) {
                            int v4_89 = new com.google.android.gms.internal.measurement.dg();
                            v2_5.c[v3_4] = v4_89;
                            v4_89.b = ((com.google.android.gms.measurement.internal.er) v0_57.get(v3_4)).c;
                            v4_89.a = Long.valueOf(((com.google.android.gms.measurement.internal.er) v0_57.get(v3_4)).d);
                            v24_1.g().a(v4_89, ((com.google.android.gms.measurement.internal.er) v0_57.get(v3_4)).e);
                            v3_4++;
                        }
                        String v2_6 = v24_1.d().a(v2_5);
                        int v4_87;
                        boolean v0_60 = v24_1.d();
                        if (v5_21.e == null) {
                            v4_87 = 0;
                        } else {
                            int v4_79 = v5_21.e.iterator();
                            while (v4_79.hasNext()) {
                                if ("_r".equals(((String) v4_79.next()))) {
                                    v4_87 = 1;
                                }
                            }
                            int v4_82 = v24_1.s().c(v5_21.a, v5_21.b);
                            com.google.android.gms.measurement.internal.fe vtmp241 = v24_1.d().a(v24_1.x(), v5_21.a, 0, 0, 0, 0, 0);
                            if ((v4_82 == 0) || (vtmp241.e >= ((long) this.j.b().a(v5_21.a)))) {
                            } else {
                                v4_87 = 1;
                            }
                        }
                        if (!v0_60.a(v5_21, v2_6, v4_87)) {
                            v24_1.d().w();
                            if (this.j.r().a(2)) {
                                this.j.r().x().a("Event recorded", this.j.k().a(v5_21));
                            }
                            v24_1.d().x();
                            v24_1.z();
                            this.j.r().x().a("Background event processing time, ms", Long.valueOf((((System.nanoTime() - v22) + 500000) / 1000000)));
                            return;
                        } else {
                            this.n = 0;
                        }
                    } else {
                        if ((v6_14 % 1000) == 1) {
                            this.j.r().c_().a("Data loss. Too many events logged. appId, count", com.google.android.gms.measurement.internal.r.a(v15_0), Long.valueOf(v5_0.b));
                        }
                        v24_1.d().w();
                        v24_1.d().x();
                        return;
                    }
                } else {
                    this.j.r().i().a("Dropping blacklisted event. appId", com.google.android.gms.measurement.internal.r.a(v15_0), this.j.k().a(p25.a));
                    if ((v24_1.s().f(v15_0)) || (v24_1.s().g(v15_0))) {
                        v14_0 = 1;
                    }
                    if ((v14_0 == 0) && (!"_err".equals(p25.a))) {
                        this.j.j().a(v15_0, 11, "_ev", p25.a, 0);
                    }
                    if (v14_0 != 0) {
                        boolean v0_111 = v24_1.d().b(v15_0);
                        if ((v0_111) && (Math.abs((this.j.m().a() - Math.max(v0_111.r(), v0_111.q()))) > ((Long) com.google.android.gms.measurement.internal.h.H.b()).longValue())) {
                            this.j.r().w().a("Fetching config for blacklisted app");
                            this.a(v0_111);
                        }
                    }
                    return;
                }
            } else {
                this.e(p26);
                return;
            }
        } else {
            return;
        }
    }

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


    private final boolean a(String p46, long p47)
    {
        String v1_0 = this;
        this.d().f();
        try {
            com.google.android.gms.measurement.internal.d v3_10 = 0;
            int v2_1 = new ark>com.google.android.gms.measurement.internal.ejark>$a(this, 0);
            Object v4_30 = this.d();
            String v5_62 = this.y;
            com.google.android.gms.common.internal.r.a(v2_1);
            v4_30.d();
            v4_30.k();
            try {
                String v23_1;
                int v7_2;
                Long v15_3 = v4_30.y();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        int v13_46;
                        com.google.android.gms.measurement.internal.d v3_79 = v5_62 cmp -1;
                        if (v3_79 == null) {
                            v13_46 = new String[] {0});
                        } else {
                            int v7_73 = new String[2];
                            v7_73[0] = 0;
                            v7_73[1] = String.valueOf(v5_62);
                            v13_46 = v7_73;
                        }
                        com.google.android.gms.measurement.internal.d v3_84;
                        if (v3_79 == null) {
                            v3_84 = "";
                        } else {
                            v3_84 = " and rowid <= ?";
                        }
                        boolean v14_16 = new StringBuilder((String.valueOf(v3_84).length() + 84));
                        v14_16.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_16.append(v3_84);
                        v14_16.append(" order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v14_16.toString(), v13_46);
                        if (v3_10.moveToFirst()) {
                            int v13_51 = v3_10.getString(0);
                            v3_10.close();
                            v23_1 = v3_10;
                            v7_2 = v13_51;
                            v3_10 = 0;
                            try {
                                int v13_14 = new String[2];
                                v13_14[0] = v3_10;
                                v13_14[1] = v7_2;
                                String v25_2 = v15_3;
                                Long v15_2 = v15_3.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v13_14, 0, 0, "rowid", "2");
                                try {
                                    if (v15_2.moveToFirst()) {
                                        int v13_28 = v15_2.getBlob(0);
                                        int v13_29 = com.google.android.gms.internal.measurement.iv.a(v13_28, 0, v13_28.length);
                                        boolean v14_10 = new com.google.android.gms.internal.measurement.dd();
                                        try {
                                            v14_10.a(v13_29);
                                        } catch (android.database.sqlite.SQLiteException v0_3) {
                                            long v6_3 = v15_2;
                                            v4_30.r().c_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.measurement.internal.r.a(v3_10), v0_3);
                                            if (v6_3 == 0) {
                                                com.google.android.gms.measurement.internal.d v3_83;
                                                if (v2_1.c == null) {
                                                    v3_83 = 1;
                                                } else {
                                                    if (!v2_1.c.isEmpty()) {
                                                        v3_83 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_83 != null) {
                                                    this.d().w();
                                                    this.d().x();
                                                    return 0;
                                                } else {
                                                    com.google.android.gms.measurement.internal.d v3_9 = v2_1.a;
                                                    Object v4_4 = new com.google.android.gms.internal.measurement.da[v2_1.c.size()];
                                                    v3_9.b = v4_4;
                                                    Object v4_7 = this.j.b().e(v3_9.o);
                                                    String v5_13 = this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.ao);
                                                    Boolean v8_14 = 0;
                                                    Object v9_7 = 0;
                                                    boolean v10_56 = 0;
                                                    Long v12_66 = 0;
                                                    int v13_34 = 0;
                                                    boolean v14_12 = 0;
                                                    while (v10_56 < v2_1.c.size()) {
                                                        int v18_0;
                                                        String v23_2;
                                                        long v6_17 = ((com.google.android.gms.internal.measurement.da) v2_1.c.get(v10_56));
                                                        boolean v21_0 = v12_66;
                                                        if (!this.s().b(v2_1.a.o, v6_17.b)) {
                                                            long v29_0;
                                                            int v26_1;
                                                            v23_2 = v10_56;
                                                            String v25_1 = v13_34;
                                                            int v7_22 = this.s().c(v2_1.a.o, v6_17.b);
                                                            if (v7_22 != 0) {
                                                                if (v6_17.a == null) {
                                                                    Long v12_20 = new com.google.android.gms.internal.measurement.db[0];
                                                                    v6_17.a = v12_20;
                                                                }
                                                                int v11_11 = v6_17.a;
                                                                Long v12_21 = v11_11.length;
                                                                int v13_9 = 0;
                                                                int v26_2 = 0;
                                                                long v27_1 = 0;
                                                                while (v13_9 < v12_21) {
                                                                    boolean v10_47 = v11_11[v13_9];
                                                                    long v29_4 = v11_11;
                                                                    com.google.android.gms.measurement.internal.d v30_2 = v12_21;
                                                                    if (!"_c".equals(v10_47.a)) {
                                                                        if ("_r".equals(v10_47.a)) {
                                                                            v10_47.c = Long.valueOf(1);
                                                                            v27_1 = 1;
                                                                        }
                                                                    } else {
                                                                        v10_47.c = Long.valueOf(1);
                                                                        v26_2 = 1;
                                                                    }
                                                                    v13_9++;
                                                                    v11_11 = v29_4;
                                                                    v12_21 = v30_2;
                                                                }
                                                                if ((v26_2 == 0) && (v7_22 != 0)) {
                                                                    this.j.r().x().a("Marking event as conversion", this.j.k().a(v6_17.b));
                                                                    boolean v10_9 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_17 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_17.a = "_c";
                                                                    v11_17.c = Long.valueOf(1);
                                                                    v10_9[(v10_9.length - 1)] = v11_17;
                                                                    v6_17.a = v10_9;
                                                                }
                                                                if (v27_1 == 0) {
                                                                    this.j.r().x().a("Marking event as real-time", this.j.k().a(v6_17.b));
                                                                    boolean v10_15 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_23 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_23.a = "_r";
                                                                    v11_23.c = Long.valueOf(1);
                                                                    v10_15[(v10_15.length - 1)] = v11_23;
                                                                    v6_17.a = v10_15;
                                                                }
                                                                Long v12_42;
                                                                if (this.d().a(this.x(), v2_1.a.o, 0, 0, 0, 0, 1).e <= ((long) this.j.b().a(v2_1.a.o))) {
                                                                    v26_1 = v3_9;
                                                                    v12_42 = 1;
                                                                } else {
                                                                    boolean v10_21 = 0;
                                                                    while (v10_21 < v6_17.a.length) {
                                                                        if (!"_r".equals(v6_17.a[v10_21].a)) {
                                                                            v10_21++;
                                                                        } else {
                                                                            int v11_31 = new com.google.android.gms.internal.measurement.db[(v6_17.a.length - 1)];
                                                                            if (v10_21) {
                                                                                System.arraycopy(v6_17.a, 0, v11_31, 0, v10_21);
                                                                            }
                                                                            if (v10_21 >= v11_31.length) {
                                                                                v26_1 = v3_9;
                                                                            } else {
                                                                                v26_1 = v3_9;
                                                                                System.arraycopy(v6_17.a, (v10_21 + 1), v11_31, v10_21, (v11_31.length - v10_21));
                                                                            }
                                                                            v6_17.a = v11_31;
                                                                        }
                                                                        v12_42 = v21_0;
                                                                    }
                                                                    v26_1 = v3_9;
                                                                }
                                                                if ((!com.google.android.gms.measurement.internal.es.a(v6_17.b)) || (v7_22 == 0)) {
                                                                    v18_0 = v12_42;
                                                                    v29_0 = v14_12;
                                                                } else {
                                                                    v18_0 = v12_42;
                                                                    if (this.d().a(this.x(), v2_1.a.o, 0, 0, 1, 0, 0).c <= ((long) this.j.b().b(v2_1.a.o, com.google.android.gms.measurement.internal.h.v))) {
                                                                        v29_0 = v14_12;
                                                                    } else {
                                                                        this.j.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                        com.google.android.gms.measurement.internal.d v3_25 = v6_17.a;
                                                                        boolean v10_25 = v3_25.length;
                                                                        int v11_35 = 0;
                                                                        Long v12_52 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_35 < v10_25) {
                                                                            boolean v10_44 = v3_25[v11_35];
                                                                            if (!"_c".equals(v10_44.a)) {
                                                                                if ("_err".equals(v10_44.a)) {
                                                                                    v12_52 = 1;
                                                                                }
                                                                            } else {
                                                                                v13_23 = v10_44;
                                                                            }
                                                                            v11_35++;
                                                                        }
                                                                        v29_0 = v14_12;
                                                                        if ((v12_52 == null) || (v13_23 == 0)) {
                                                                            if (v13_23 == 0) {
                                                                                this.j.r().c_().a("Did not find conversion parameter. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                            } else {
                                                                                v13_23.a = "_err";
                                                                                v13_23.c = Long.valueOf(10);
                                                                            }
                                                                        } else {
                                                                            com.google.android.gms.measurement.internal.d v3_31 = v6_17.a;
                                                                            int v11_39 = new com.google.android.gms.internal.measurement.db[1];
                                                                            v11_39[0] = v13_23;
                                                                            v6_17.a = ((com.google.android.gms.internal.measurement.db[]) com.google.android.gms.common.util.b.a(v3_31, v11_39));
                                                                        }
                                                                    }
                                                                }
                                                            } else {
                                                                int v11_5;
                                                                this.g();
                                                                int v11_3 = v6_17.b;
                                                                com.google.android.gms.common.internal.r.a(v11_3);
                                                                Long v12_16 = v11_3.hashCode();
                                                                if (v12_16 == 94660) {
                                                                    if (!v11_3.equals("_in")) {
                                                                        v11_5 = -1;
                                                                    } else {
                                                                        v11_5 = 0;
                                                                    }
                                                                } else {
                                                                    if (v12_16 == 95025) {
                                                                        if (!v11_3.equals("_ug")) {
                                                                        } else {
                                                                            v11_5 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v12_16 == 95027) {
                                                                            if (!v11_3.equals("_ui")) {
                                                                            } else {
                                                                                v11_5 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                int v11_8;
                                                                switch (v11_5) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v11_8 = 1;
                                                                    default:
                                                                        v11_8 = 0;
                                                                }
                                                                if (v11_8 == 0) {
                                                                    v26_1 = v3_9;
                                                                    v29_0 = v14_12;
                                                                    v18_0 = v21_0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((!this.j.b().m(v2_1.a.o)) || (v7_22 == 0)) {
                                                            } else {
                                                                com.google.android.gms.measurement.internal.d v3_37 = v6_17.a;
                                                                int v7_23 = 0;
                                                                boolean v10_32 = -1;
                                                                int v11_40 = -1;
                                                                while (v7_23 < v3_37.length) {
                                                                    if (!"value".equals(v3_37[v7_23].a)) {
                                                                        if ("currency".equals(v3_37[v7_23].a)) {
                                                                            v11_40 = v7_23;
                                                                        }
                                                                    } else {
                                                                        v10_32 = v7_23;
                                                                    }
                                                                    v7_23++;
                                                                }
                                                                if (v10_32 == -1) {
                                                                } else {
                                                                    if ((v3_37[v10_32].c != null) || (v3_37[v10_32].d != null)) {
                                                                        int v7_32;
                                                                        if (v11_40 != -1) {
                                                                            int v7_31 = v3_37[v11_40].b;
                                                                            if (v7_31 == 0) {
                                                                            } else {
                                                                                if (v7_31.length() == 3) {
                                                                                    int v11_43 = 0;
                                                                                    while (v11_43 < v7_31.length()) {
                                                                                        int v13_25 = v7_31.codePointAt(v11_43);
                                                                                        if (Character.isLetter(v13_25)) {
                                                                                            v11_43 += Character.charCount(v13_25);
                                                                                        } else {
                                                                                            v7_32 = 1;
                                                                                            if (v7_32 != 0) {
                                                                                                this.j.r().k().a("Value parameter discarded. You must also supply a 3-letter ISO_4217 currency code in the currency parameter.");
                                                                                                v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 19, "currency");
                                                                                            }
                                                                                            v6_17.a = v3_37;
                                                                                            if (this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.an)) {
                                                                                                if (!"_e".equals(v6_17.b)) {
                                                                                                    if ("_vs".equals(v6_17.b)) {
                                                                                                        this.g();
                                                                                                        if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_et") == null) {
                                                                                                            if ((v8_14 == null) || ((Math.abs((v8_14.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v8_14, v6_17)))) {
                                                                                                                v9_7 = v6_17;
                                                                                                            } else {
                                                                                                                v8_14 = 0;
                                                                                                                v9_7 = 0;
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                } else {
                                                                                                    this.g();
                                                                                                    if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_fr") == null) {
                                                                                                        if ((v9_7 == null) || ((Math.abs((v9_7.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v6_17, v9_7)))) {
                                                                                                            v8_14 = v6_17;
                                                                                                        } else {
                                                                                                            v8_14 = 0;
                                                                                                            v9_7 = 0;
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                            if ((v4_7 == null) || ((v5_13 != null) || (!"_e".equals(v6_17.b)))) {
                                                                                                v3_9 = v26_1;
                                                                                            } else {
                                                                                                if (v6_17.a != null) {
                                                                                                    if (v6_17.a.length != 0) {
                                                                                                        this.g();
                                                                                                        com.google.android.gms.measurement.internal.d v3_68 = ((Long) com.google.android.gms.measurement.internal.ep.b(v6_17, "_et"));
                                                                                                        if (v3_68 != null) {
                                                                                                            v29_0 += v3_68.longValue();
                                                                                                            v3_9 = v26_1;
                                                                                                            v13_34 = (v25_1 + 1);
                                                                                                            v3_9.b[v25_1] = v6_17;
                                                                                                            v14_12 = v29_0;
                                                                                                            v10_56 = (v23_2 + 1);
                                                                                                            v12_66 = v18_0;
                                                                                                        } else {
                                                                                                            this.j.r().i().a("Engagement event does not include duration. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                                        }
                                                                                                    } else {
                                                                                                    }
                                                                                                }
                                                                                                this.j.r().i().a("Engagement event does not contain any parameters. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    v7_32 = 0;
                                                                                } else {
                                                                                }
                                                                            }
                                                                            v7_32 = 1;
                                                                        } else {
                                                                            v7_32 = 1;
                                                                        }
                                                                    } else {
                                                                        this.j.r().k().a("Value must be specified with a numeric type.");
                                                                        v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 18, "value");
                                                                    }
                                                                }
                                                            }
                                                        } else {
                                                            int v7_63;
                                                            v23_2 = v10_56;
                                                            String v25_3 = v13_34;
                                                            this.j.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o), this.j.k().a(v6_17.b));
                                                            if (this.s().f(v2_1.a.o)) {
                                                                v7_63 = 1;
                                                            } else {
                                                                if (!this.s().g(v2_1.a.o)) {
                                                                    v7_63 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_63 == 0) && (!"_err".equals(v6_17.b))) {
                                                                this.j.j().a(v2_1.a.o, 11, "_ev", v6_17.b, 0);
                                                            }
                                                            v18_0 = v21_0;
                                                            v13_34 = v25_3;
                                                        }
                                                    }
                                                    int v13_5;
                                                    boolean v21_4 = v12_66;
                                                    String v25_4 = v13_34;
                                                    long v29_6 = v14_12;
                                                    if (v5_13 == null) {
                                                        v13_5 = v25_4;
                                                    } else {
                                                        v13_5 = v25_4;
                                                        boolean v14_5 = v29_6;
                                                        String v5_0 = 0;
                                                        while (v5_0 < v13_5) {
                                                            long v6_12;
                                                            long v6_9 = v3_9.b[v5_0];
                                                            if (!"_e".equals(v6_9.b)) {
                                                                if (v4_7 != null) {
                                                                    this.g();
                                                                    long v6_10 = com.google.android.gms.measurement.internal.ep.a(v6_9, "_et");
                                                                    if (v6_10 != 0) {
                                                                        long v6_11 = v6_10.c;
                                                                        if ((v6_11 != 0) && (v6_11.longValue() > 0)) {
                                                                            v14_5 += v6_11.longValue();
                                                                            v6_12 = 1;
                                                                            v5_0 += v6_12;
                                                                        }
                                                                    }
                                                                }
                                                                v6_12 = 1;
                                                            } else {
                                                                this.g();
                                                                if (com.google.android.gms.measurement.internal.ep.a(v6_9, "_fr") == null) {
                                                                } else {
                                                                    System.arraycopy(v3_9.b, (v5_0 + 1), v3_9.b, v5_0, ((v13_5 - v5_0) - 1));
                                                                    v13_5--;
                                                                    v5_0--;
                                                                    v6_12 = 1;
                                                                }
                                                            }
                                                        }
                                                        v29_6 = v14_5;
                                                    }
                                                    if (v13_5 < v2_1.c.size()) {
                                                        v3_9.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v3_9.b, v13_5));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_9.o, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.measurement.internal.er;
                                                            v4_12(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf(v29_6));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                String v5_21 = new com.google.android.gms.measurement.internal.er;
                                                                v5_21(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v29_6)));
                                                                v4_12 = v5_21;
                                                            } else {
                                                            }
                                                        }
                                                        String v5_24 = new com.google.android.gms.internal.measurement.dg();
                                                        v5_24.b = "_lte";
                                                        v5_24.a = Long.valueOf(this.j.m().a());
                                                        v5_24.d = ((Long) v4_12.e);
                                                        long v6_48 = 0;
                                                        while (v6_48 < v3_9.c.length) {
                                                            if (!"_lte".equals(v3_9.c[v6_48].b)) {
                                                                v6_48++;
                                                            } else {
                                                                v3_9.c[v6_48] = v5_24;
                                                                long v6_49 = 1;
                                                            }
                                                            String v5_25;
                                                            if (v6_49 != 0) {
                                                                v5_25 = 0;
                                                            } else {
                                                                v3_9.c = ((com.google.android.gms.internal.measurement.dg[]) java.util.Arrays.copyOf(v3_9.c, (v3_9.c.length + 1)));
                                                                v3_9.c[(v2_1.a.c.length - 1)] = v5_24;
                                                                v5_25 = 0;
                                                            }
                                                            if (v29_6 > v5_25) {
                                                                this.d().a(v4_12);
                                                                this.j.r().w().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_49 = 0;
                                                    }
                                                    Object v9_9;
                                                    String v1_7;
                                                    Object v4_14 = v3_9.o;
                                                    String v5_30 = v3_9.c;
                                                    long v6_55 = v3_9.b;
                                                    com.google.android.gms.common.internal.r.a(v4_14);
                                                    v3_9.A = this.e().a(v4_14, v6_55, v5_30);
                                                    try {
                                                        if (!this.j.b().d(v2_1.a.o)) {
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                        } else {
                                                            Object v4_20 = new java.util.HashMap();
                                                            String v5_35 = new com.google.android.gms.internal.measurement.da[v3_9.b.length];
                                                            long v6_7 = this.j.j().h();
                                                            int v7_10 = v3_9.b;
                                                            Boolean v8_10 = v7_10.length;
                                                            Object v9_3 = 0;
                                                            boolean v10_0 = 0;
                                                            while (v9_3 < v8_10) {
                                                                Object v9_1;
                                                                long v27_0;
                                                                String v25_0;
                                                                String v23_0;
                                                                int v26_0;
                                                                int v11_54 = v7_10[v9_3];
                                                                if (!v11_54.b.equals("_ep")) {
                                                                    com.google.android.gms.measurement.internal.d v3_122;
                                                                    long v28_1;
                                                                    Long v12_81 = this.s().e(v2_1.a.o);
                                                                    v1_0.j.j();
                                                                    boolean v14_21 = com.google.android.gms.measurement.internal.es.a(v11_54.c.longValue(), v12_81);
                                                                    v23_0 = v7_10;
                                                                    v25_0 = v8_10;
                                                                    Boolean v8_22 = Long.valueOf(1);
                                                                    if ((!android.text.TextUtils.isEmpty("_dbg")) && (v8_22 != null)) {
                                                                        v26_0 = v3_9;
                                                                        com.google.android.gms.measurement.internal.d v3_121 = v11_54.a;
                                                                        v27_0 = v9_3;
                                                                        Object v9_10 = v3_121.length;
                                                                        v28_1 = v12_81;
                                                                        Long v12_82 = 0;
                                                                        while (v12_82 < v9_10) {
                                                                            int v13_57 = v3_121[v12_82];
                                                                            if (!"_dbg".equals(v13_57.a)) {
                                                                                v12_82++;
                                                                            } else {
                                                                                if (((!(v8_22 instanceof Long)) || (!v8_22.equals(v13_57.c))) && (((!(v8_22 instanceof String)) || (!v8_22.equals(v13_57.b))) && ((!(v8_22 instanceof Double)) || (!v8_22.equals(v13_57.d))))) {
                                                                                    v3_122 = 0;
                                                                                } else {
                                                                                    v3_122 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                        v3_122 = 0;
                                                                    } else {
                                                                        v26_0 = v3_9;
                                                                        v27_0 = v9_3;
                                                                        v28_1 = v12_81;
                                                                        v3_122 = 0;
                                                                    }
                                                                    Long v12_83;
                                                                    if (v3_122 != null) {
                                                                        v12_83 = 1;
                                                                    } else {
                                                                        v12_83 = this.s().d(v2_1.a.o, v11_54.b);
                                                                    }
                                                                    if (v12_83 > null) {
                                                                        com.google.android.gms.measurement.internal.d v3_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v11_54.b));
                                                                        if (v3_1 == null) {
                                                                            v3_1 = this.d().a(v2_1.a.o, v11_54.b);
                                                                            if (v3_1 == null) {
                                                                                v1_0.j.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_1.a.o, v11_54.b);
                                                                                v3_1 = new com.google.android.gms.measurement.internal.d;
                                                                                v3_1(v2_1.a.o, v11_54.b, 1, 1, v11_54.c.longValue(), 0, 0, 0, 0, 0);
                                                                            }
                                                                        }
                                                                        Boolean v8_28;
                                                                        this.g();
                                                                        int v7_123 = ((Long) com.google.android.gms.measurement.internal.ep.b(v11_54, "_eid"));
                                                                        if (v7_123 == 0) {
                                                                            v8_28 = 0;
                                                                        } else {
                                                                            v8_28 = 1;
                                                                        }
                                                                        Boolean v8_29 = Boolean.valueOf(v8_28);
                                                                        if (v12_83 != 1) {
                                                                            if (v6_7.nextInt(v12_83) != 0) {
                                                                                p46 = v6_7;
                                                                                int v13_58;
                                                                                String v1_20;
                                                                                if (!v1_0.j.b().o(v2_1.a.o)) {
                                                                                    v9_1 = v2_1;
                                                                                    v13_58 = v7_123;
                                                                                    if (Math.abs((v11_54.c.longValue() - v3_1.f)) < 86400000) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                } else {
                                                                                    long v28_2;
                                                                                    if (v3_1.g == null) {
                                                                                        v1_0.j.j();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                        v28_2 = com.google.android.gms.measurement.internal.es.a(v11_54.d.longValue(), v28_1);
                                                                                    } else {
                                                                                        v28_2 = v3_1.g.longValue();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                    }
                                                                                    if (v28_2 == v14_21) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                }
                                                                                if (v1_20 == null) {
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v4_20.put(v11_54.b, v3_1.a(v13_58, 0, 0));
                                                                                    }
                                                                                } else {
                                                                                    this.g();
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                                    this.g();
                                                                                    long v6_89 = ((long) v12_83);
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v6_89));
                                                                                    String v1_29 = (v10_0 + 1);
                                                                                    v5_35[v10_0] = v11_54;
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v3_1 = v3_1.a(0, Long.valueOf(v6_89), Boolean.valueOf(1));
                                                                                    }
                                                                                    v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                    v10_0 = v1_29;
                                                                                }
                                                                            } else {
                                                                                this.g();
                                                                                Long v12_0 = ((long) v12_83);
                                                                                p46 = v6_7;
                                                                                v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v12_0));
                                                                                long v6_6 = (v10_0 + 1);
                                                                                v5_35[v10_0] = v11_54;
                                                                                if (v8_29.booleanValue()) {
                                                                                    v3_1 = v3_1.a(0, Long.valueOf(v12_0), 0);
                                                                                }
                                                                                v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                v9_1 = v2_1;
                                                                                v10_0 = v6_6;
                                                                            }
                                                                        } else {
                                                                            int v7_6 = (v10_0 + 1);
                                                                            v5_35[v10_0] = v11_54;
                                                                            if ((v8_29.booleanValue()) && ((v3_1.h != null) || ((v3_1.i != null) || (v3_1.j != null)))) {
                                                                                v4_20.put(v11_54.b, v3_1.a(0, 0, 0));
                                                                            }
                                                                            v9_1 = v2_1;
                                                                            p46 = v6_7;
                                                                            v10_0 = v7_6;
                                                                        }
                                                                    } else {
                                                                        v1_0.j.r().i().a("Sample rate must be positive. event, rate", v11_54.b, Integer.valueOf(v12_83));
                                                                        com.google.android.gms.measurement.internal.d v3_8 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v9_1 = v2_1;
                                                                        v10_0 = v3_8;
                                                                        p46 = v6_7;
                                                                    }
                                                                } else {
                                                                    this.g();
                                                                    Long v12_3 = ((String) com.google.android.gms.measurement.internal.ep.b(v11_54, "_en"));
                                                                    int v13_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v12_3));
                                                                    if (v13_1 == 0) {
                                                                        v13_1 = this.d().a(v2_1.a.o, v12_3);
                                                                        v4_20.put(v12_3, v13_1);
                                                                    }
                                                                    if (v13_1.h != null) {
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v9_1 = v2_1;
                                                                    } else {
                                                                        if (v13_1.i.longValue() > 1) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", v13_1.i);
                                                                        }
                                                                        if ((v13_1.j != null) && (v13_1.j.booleanValue())) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                        }
                                                                        Long v12_14 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v10_0 = v12_14;
                                                                        v9_1 = v2_1;
                                                                    }
                                                                }
                                                                v6_7 = p46;
                                                                v2_1 = v9_1;
                                                                v7_10 = v23_0;
                                                                v8_10 = v25_0;
                                                                v3_9 = v26_0;
                                                                v9_3 = (v27_0 + 1);
                                                                v1_0 = this;
                                                            }
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                            if (v10_0 < v1_7.b.length) {
                                                                v1_7.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v5_35, v10_0));
                                                            }
                                                            int v2_10 = v4_20.entrySet().iterator();
                                                            while (v2_10.hasNext()) {
                                                                this.d().a(((com.google.android.gms.measurement.internal.d) ((java.util.Map$Entry) v2_10.next()).getValue()));
                                                            }
                                                        }
                                                        try {
                                                            v1_7.e = Long.valueOf(nan);
                                                            v1_7.f = Long.valueOf(-0.0);
                                                            int v2_15 = 0;
                                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                                            String v1_2 = v0_4;
                                                            this.d().x();
                                                            throw v1_2;
                                                        }
                                                        while (v2_15 < v1_7.b.length) {
                                                            com.google.android.gms.measurement.internal.d v3_115 = v1_7.b[v2_15];
                                                            if (v3_115.c.longValue() < v1_7.e.longValue()) {
                                                                v1_7.e = v3_115.c;
                                                            }
                                                            if (v3_115.c.longValue() > v1_7.f.longValue()) {
                                                                v1_7.f = v3_115.c;
                                                            }
                                                            v2_15++;
                                                        }
                                                        Object v4_21;
                                                        int v2_17 = v9_9.a.o;
                                                        com.google.android.gms.measurement.internal.d v3_91 = this.d().b(v2_17);
                                                        if (v3_91 != null) {
                                                            v4_21 = this;
                                                            if (v1_7.b.length > 0) {
                                                                int v7_99;
                                                                String v5_38 = v3_91.i();
                                                                if (v5_38 == 0) {
                                                                    v7_99 = 0;
                                                                } else {
                                                                    v7_99 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.h = v7_99;
                                                                int v7_100 = v3_91.h();
                                                                if (v7_100 != 0) {
                                                                    v5_38 = v7_100;
                                                                } else {
                                                                }
                                                                String v5_39;
                                                                if (v5_38 == 0) {
                                                                    v5_39 = 0;
                                                                } else {
                                                                    v5_39 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.g = v5_39;
                                                                v3_91.s();
                                                                v1_7.w = Integer.valueOf(((int) v3_91.p()));
                                                                v3_91.a(v1_7.e.longValue());
                                                                v3_91.b(v1_7.f.longValue());
                                                                v1_7.x = v3_91.A();
                                                                this.d().a(v3_91);
                                                            }
                                                        } else {
                                                            v4_21 = this;
                                                            this.j.r().c_().a("Bundling raw events w/o app info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                        }
                                                        if (v1_7.b.length > 0) {
                                                            v4_21.j.u();
                                                            com.google.android.gms.measurement.internal.d v3_99 = this.s().a(v9_9.a.o);
                                                            if (v3_99 == null) {
                                                                if (!android.text.TextUtils.isEmpty(v9_9.a.y)) {
                                                                    v4_21.j.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                                } else {
                                                                    v1_7.E = Long.valueOf(-1);
                                                                }
                                                            } else {
                                                                if (v3_99.a != null) {
                                                                    v1_7.E = v3_99.a;
                                                                } else {
                                                                }
                                                            }
                                                            this.d().a(v1_7, v21_4);
                                                        }
                                                        String v1_8 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_109 = v9_9.b;
                                                        com.google.android.gms.common.internal.r.a(v3_109);
                                                        v1_8.d();
                                                        v1_8.k();
                                                        String v5_56 = new StringBuilder("rowid in (");
                                                        long v6_65 = 0;
                                                        while (v6_65 < v3_109.size()) {
                                                            if (v6_65 != 0) {
                                                                v5_56.append(",");
                                                            }
                                                            v5_56.append(((Long) v3_109.get(v6_65)).longValue());
                                                            v6_65++;
                                                        }
                                                        v5_56.append(")");
                                                        String v5_58 = v1_8.y().delete("raw_events", v5_56.toString(), 0);
                                                        if (v5_58 != v3_109.size()) {
                                                            v1_8.r().c_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_58), Integer.valueOf(v3_109.size()));
                                                        }
                                                        String v1_11 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_112 = v1_11.y();
                                                        try {
                                                            long v6_71 = new String[2];
                                                            v6_71[0] = v2_17;
                                                            v6_71[1] = v2_17;
                                                            v3_112.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_71);
                                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                                            v1_11.r().c_().a("Failed to remove unused event metadata. appId", com.google.android.gms.measurement.internal.r.a(v2_17), v0_7);
                                                        }
                                                        this.d().w();
                                                        this.d().x();
                                                        return 1;
                                                    } catch (android.database.sqlite.SQLiteException v0_2) {
                                                        v1_2 = v0_2;
                                                    }
                                                }
                                            } else {
                                                v6_3.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            com.google.android.gms.measurement.internal.d v3_0 = v0_1;
                                            try {
                                                v4_30.r().c_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.measurement.internal.r.a(v7_2), v3_0);
                                            } catch (android.database.sqlite.SQLiteException v0_6) {
                                                String v1_3 = v0_6;
                                                int v22 = v6_3;
                                                if (v22 != 0) {
                                                    v22.close();
                                                }
                                                throw v1_3;
                                            }
                                            if (v6_3 == 0) {
                                            } else {
                                                v6_3.close();
                                            }
                                        }
                                        if (v15_2.moveToNext()) {
                                            v4_30.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        }
                                        String v16_2;
                                        String[] v17_2;
                                        v15_2.close();
                                        v2_1.a(v14_10);
                                        if (v5_62 == -1) {
                                            boolean v10_59 = new String[2];
                                            v10_59[0] = v3_10;
                                            v10_59[1] = v7_2;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_2 = v10_59;
                                        } else {
                                            int v13_44 = new String[3];
                                            v13_44[0] = v3_10;
                                            v13_44[1] = v7_2;
                                            v13_44[2] = String.valueOf(v5_62);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_2 = v13_44;
                                        }
                                        v6_3 = v15_2;
                                        String v5_6 = v25_2.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v16_2, v17_2, 0, 0, "rowid", 0);
                                        try {
                                            if (!v5_6.moveToFirst()) {
                                                v4_30.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                            v22 = v5_6;
                                            v1_3 = v0_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            v6_3 = v5_6;
                                        }
                                        do {
                                            long v6_24 = v5_6.getLong(0);
                                            Long v12_70 = v5_6.getBlob(3);
                                            boolean v10_64 = com.google.android.gms.internal.measurement.iv.a(v12_70, 0, v12_70.length);
                                            Long v12_72 = new com.google.android.gms.internal.measurement.da();
                                            v12_72.a(v10_64);
                                            v12_72.b = v5_6.getString(1);
                                            v12_72.c = Long.valueOf(v5_6.getLong(2));
                                            if (v2_1.a(v6_24, v12_72)) {
                                            } else {
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } while(v5_6.moveToNext());
                                        if (v5_6 == null) {
                                        } else {
                                            v5_6.close();
                                        }
                                    } else {
                                        v4_30.r().c_().a("Raw event metadata record is missing. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        if (v15_2 == null) {
                                        } else {
                                            v15_2.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v22 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v7_2 = v3_10;
                                    v6_3 = v15_2;
                                }
                                v22 = v6_3;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v22 = v23_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v7_2 = v3_10;
                                v6_3 = v23_1;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    } else {
                        boolean v14_17;
                        int v13_52 = v5_62 cmp -1;
                        try {
                            if (v13_52 == 0) {
                                v14_17 = new String[1];
                                v14_17[0] = String.valueOf(p47);
                            } else {
                                v14_17 = new String[2];
                                v14_17[0] = String.valueOf(v5_62);
                                v14_17[1] = String.valueOf(p47);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v6_3 = 0;
                            v7_2 = 0;
                        }
                        int v13_53;
                        if (v13_52 == 0) {
                            v13_53 = "";
                        } else {
                            v13_53 = "rowid <= ? and ";
                        }
                        com.google.android.gms.measurement.internal.d v3_142 = new StringBuilder((String.valueOf(v13_53).length() + 148));
                        v3_142.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_142.append(v13_53);
                        v3_142.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v3_142.toString(), v14_17);
                        if (v3_10.moveToFirst()) {
                            int v7_9 = v3_10.getString(0);
                            try {
                                int v13_4 = v3_10.getString(1);
                                v3_10.close();
                                v23_1 = v3_10;
                                v3_10 = v7_9;
                                v7_2 = v13_4;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v6_3 = v3_10;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_0) {
                    v22 = v3_10;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v6_3 = v3_10;
                    v7_2 = 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v22 = 0;
            } catch (android.database.sqlite.SQLiteException v0_8) {
                v3_0 = v0_8;
                v6_3 = 0;
                v7_2 = 0;
            } catch (android.database.sqlite.SQLiteException v0_4) {
            }
        } catch (android.database.sqlite.SQLiteException v0_4) {
        }
    }

Method android.arch.persistence.a.a.a.c() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void c(String p2)
    {
        this.c.execSQL(p2);
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine$PersistentCacheOpenHelper.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p2, int p3, int p4)
    {
        if (p3 > 1) {
            String v3_7 = new StringBuilder();
            v3_7.append("We don\'t handle upgrading to ");
            v3_7.append(p4);
            throw new AssertionError(v3_7.toString());
        } else {
            this.dropTable(p2, "serverCache");
            p2.execSQL("CREATE TABLE serverCache (path TEXT PRIMARY KEY, value BLOB);");
            this.dropTable(p2, "complete");
            p2.execSQL("CREATE TABLE trackedKeys (id INTEGER, key TEXT);");
            p2.execSQL("CREATE TABLE trackedQueries (id INTEGER PRIMARY KEY, path TEXT, queryParams TEXT, lastUse INTEGER, complete INTEGER, active INTEGER);");
            return;
        }
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine$PersistentCacheOpenHelper.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        p2.execSQL("CREATE TABLE serverCache (path TEXT PRIMARY KEY, value BLOB);");
        p2.execSQL("CREATE TABLE writes (id INTEGER, path TEXT, type TEXT, part INTEGER, node BLOB, UNIQUE (id, part));");
        p2.execSQL("CREATE TABLE trackedQueries (id INTEGER PRIMARY KEY, path TEXT, queryParams TEXT, lastUse INTEGER, complete INTEGER, active INTEGER);");
        p2.execSQL("CREATE TABLE trackedKeys (id INTEGER, key TEXT);");
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine$PersistentCacheOpenHelper.dropTable() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void dropTable(android.database.sqlite.SQLiteDatabase p3, String p4)
    {
        StringBuilder v0_1 = new StringBuilder();
        v0_1.append("DROP TABLE IF EXISTS ");
        v0_1.append(p4);
        p3.execSQL(v0_1.toString());
        return;
    }

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


    static void a(com.google.android.gms.measurement.internal.r p5, android.database.sqlite.SQLiteDatabase p6, String p7, String p8, String p9, String[] p10)
    {
        if (p5 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            if (!ark>com.google.android.gms.measurement.internal.fhark>.a(p5, p6, p7)) {
                p6.execSQL(p8);
            }
            if (p5 == null) {
                throw new IllegalArgumentException("Monitor must not be null");
            } else {
                String v8_2 = ark>com.google.android.gms.measurement.internal.fhark>.a(p6, p7);
                String v9_1 = p9.split(",");
                int v1 = 0;
                int v2 = 0;
                while (v2 < v9_1.length) {
                    String v3 = v9_1[v2];
                    if (!v8_2.remove(v3)) {
                        String v9_11 = new StringBuilder(((String.valueOf(p7).length() + 35) + String.valueOf(v3).length()));
                        v9_11.append("Table ");
                        v9_11.append(p7);
                        v9_11.append(" is missing required column: ");
                        v9_11.append(v3);
                        throw new android.database.sqlite.SQLiteException(v9_11.toString());
                    } else {
                        v2++;
                    }
                }
                if (p10 != null) {
                    while (v1 < p10.length) {
                        if (!v8_2.remove(p10[v1])) {
                            p6.execSQL(p10[(v1 + 1)]);
                        }
                        v1 += 2;
                    }
                }
                if (!v8_2.isEmpty()) {
                    p5.i().a("Table has extra columns. table, columns", p7, android.text.TextUtils.join(", ", v8_2));
                }
                return;
            }
        }
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p9)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_13 = p9.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_13.moveToFirst();
                v0_13.close();
            } catch (android.database.sqlite.SQLiteException v9_10) {
                v0_13.close();
                throw v9_10;
            }
        }
        String v1_3 = 0;
        if (this.a(p9, "hits2")) {
            String v0_6 = com.google.android.gms.internal.measurement.af.b(p9, "hits2");
            boolean v3_1 = 0;
            while (v3_1 < 4) {
                String v4_2 = new String[] {"hit_id", "hit_string", "hit_time", "hit_url"})[v3_1];
                if (v0_6.remove(v4_2)) {
                    v3_1++;
                } else {
                    String v0_12;
                    String v1_5 = String.valueOf(v4_2);
                    if (v1_5.length() == 0) {
                        v0_12 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_12 = "Database hits2 is missing required column: ".concat(v1_5);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_12);
                }
            }
            int v2_5 = (v0_6.remove("hit_app_id") ^ 1);
            if (!v0_6.isEmpty()) {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            } else {
                if (v2_5 != 0) {
                    p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
                }
            }
        } else {
            p9.execSQL(com.google.android.gms.internal.measurement.ae.B());
        }
        if (this.a(p9, "properties")) {
            android.database.sqlite.SQLiteException v9_6 = com.google.android.gms.internal.measurement.af.b(p9, "properties");
            String v4 = "tid";
            String v6 = "adid";
            while (v1_3 < 6) {
                int v2_9 = new String[] {"app_uid", "hits_count"})[v1_3];
                if (v9_6.remove(v2_9)) {
                    v1_3++;
                } else {
                    String v0_1;
                    String v1_8 = String.valueOf(v2_9);
                    if (v1_8.length() == 0) {
                        v0_1 = new String("Database properties is missing required column: ");
                    } else {
                        v0_1 = "Database properties is missing required column: ".concat(v1_8);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_1);
                }
            }
            if (!v9_6.isEmpty()) {
                throw new android.database.sqlite.SQLiteException("Database properties table has extra columns");
            } else {
                return;
            }
        } else {
            p9.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
            return;
        }
    }

Method com.baidu.android.pushservice.c.c$c.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p1, int p2, int p3)
    {
        if (p2 > 1) {
            if (p2 != 2) {
                if (p2 != 3) {
                    if (p2 != 4) {
                        return;
                    }
                } else {
                    p1.execSQL(com.baidu.android.pushservice.c.c$c.d);
                }
            } else {
                p1.execSQL(com.baidu.android.pushservice.c.c$c.c);
            }
            p1.execSQL(com.baidu.android.pushservice.c.c$c.e);
        } else {
            this.a(p1);
            this.onCreate(p1);
        }
        return;
    }

Method com.baidu.android.pushservice.c.c$c.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        try {
            p2.execSQL(com.baidu.android.pushservice.c.c$c.a);
            p2.execSQL(com.baidu.android.pushservice.c.c$c.b);
            p2.execSQL(com.baidu.android.pushservice.c.c$c.c);
            p2.execSQL(com.baidu.android.pushservice.c.c$c.d);
        } catch (Exception) {
        }
        return;
    }

Method com.baidu.android.pushservice.c.c$c.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void a(android.database.sqlite.SQLiteDatabase p2)
    {
        try {
            p2.execSQL("DROP TABLE IF EXISTS PushShareInfo");
            p2.execSQL("DROP TABLE IF EXISTS PushVerifyInfo");
            p2.execSQL("DROP TABLE IF EXISTS PushMsgInfo");
        } catch (Exception) {
        }
        return;
    }

Method com.baidu.android.pushservice.c.a.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public static int a(android.content.Context p11, String p12, int p13)
    {
        int v1 = 0;
        try {
            int v11_1 = ark>com.baidu.android.pushservice.c.aark>.e(p11);
        } catch (int v11_2) {
            throw v11_2;
        }
        if (v11_1 != 0) {
            StringBuilder v2_5 = new StringBuilder();
            v2_5.append(ark>com.baidu.android.pushservice.c.aark>$a.b.name());
            v2_5.append(" = ");
            v2_5.append(p12);
            v2_5.append(";");
            android.database.Cursor v10 = v11_1.query("AlarmMsgInfo", 0, v2_5.toString(), 0, 0, 0, 0);
            if (v10 != null) {
                if (v10.getCount() > 0) {
                    StringBuilder v2_3 = new StringBuilder();
                    v2_3.append("UPDATE AlarmMsgInfo SET ");
                    v2_3.append(ark>com.baidu.android.pushservice.c.aark>$a.f.name());
                    v2_3.append(" = ");
                    v2_3.append(p13);
                    v2_3.append(" WHERE ");
                    v2_3.append(ark>com.baidu.android.pushservice.c.aark>$a.b);
                    v2_3.append(" = ");
                    v2_3.append(p12);
                    v11_1.execSQL(v2_3.toString());
                }
                if (v10 == null) {
                    v11_1.close();
                    return v1;
                } else {
                    v10.close();
                }
            } else {
                if (v10 != null) {
                    v10.close();
                }
                v11_1.close();
                return -2;
            }
        } else {
            return -1;
        }
    }

Method com.baidu.android.pushservice.c.a$e.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        try {
            p2.execSQL(com.baidu.android.pushservice.c.a$e.a);
            p2.execSQL(com.baidu.android.pushservice.c.a$e.b);
            p2.execSQL(com.baidu.android.pushservice.c.a$e.c);
            p2.execSQL(com.baidu.android.pushservice.c.a$e.d);
            p2.execSQL(com.baidu.android.pushservice.c.a$e.e);
            p2.execSQL(com.baidu.android.pushservice.c.a$e.f);
            p2.execSQL(com.baidu.android.pushservice.c.a$e.g);
        } catch (Exception) {
        }
        return;
    }

Method com.baidu.android.pushservice.c.a$e.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void a(android.database.sqlite.SQLiteDatabase p2)
    {
        try {
            p2.execSQL("DROP TABLE IF EXISTS StatisticsInfo");
            p2.execSQL("DROP TABLE IF EXISTS FileDownloadingInfo");
            p2.execSQL("DROP TABLE IF EXISTS PushBehavior");
            p2.execSQL("DROP TABLE IF EXISTS AppInfo");
            p2.execSQL("DROP TABLE IF EXISTS AlarmMsgInfo");
            p2.execSQL("DROP TABLE IF EXISTS NoDisturb");
            p2.execSQL("DROP TABLE IF EXISTS MsgArriveApp");
        } catch (Exception) {
        }
        return;
    }

Method com.sophos.smsec.core.datastore.b.r() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized boolean r()
    {
        try {
            int v0_4 = this.a(1);
            this.E();
            try {
                v0_4.delete(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE.toString(), 0, 0);
                int v0_1 = rk>com.sophos.smsec.core.datastore.brk>.a(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE);
            } catch (int v0_2) {
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "delete ignored URL table failed", v0_2);
                v0_1 = 0;
            }
            this.b(v0_1);
            return v0_1;
        } catch (int v0_3) {
            throw v0_3;
        }
    }

Method com.sophos.smsec.core.datastore.b.o() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized boolean o()
    {
        int v0_0 = 1;
        try {
            Throwable v1_2 = this.a(1);
            Throwable v2 = 0;
            try {
                this.E();
                String v5_1 = new String[0];
                Throwable v1_0 = v1_2.delete(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), "key IN (SELECT key FROM system_log)", v5_1);
            } catch (int v0_2) {
                this.b(v2);
                throw v0_2;
            } catch (int v0_1) {
                Throwable v1_1 = 0;
                try {
                    com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "delete all rows in log table failed", v0_1);
                } catch (int v0_2) {
                    v2 = v1_1;
                }
                this.b(0);
                v0_0 = 0;
                return v0_0;
            }
            if ((com.sophos.smsec.core.datastore.DataStore$Table.LOG.hasVerticalHash()) && (!com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG))) {
                v0_0 = 0;
            }
            try {
                String v4_1 = new StringBuilder();
                v4_1.append("deleted ");
                v4_1.append(v1_0);
                v4_1.append(" rows in log table.");
                com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v4_1.toString());
            } catch (Throwable v1_6) {
                v2 = v0_0;
                v0_2 = v1_6;
            } catch (Throwable v1_5) {
                v1_1 = v0_0;
                v0_1 = v1_5;
            }
            this.b(v0_0);
            return v0_0;
        } catch (int v0_3) {
            throw v0_3;
        }
    }

Method com.sophos.smsec.core.datastore.b.e() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized void e(String p6)
    {
        try {
            String v1_0 = this.a(1);
            try {
                v1_0.beginTransaction();
                android.content.Intent v0_6 = new String[1];
                v0_6[0] = p6;
                v1_0.delete("quarantine_allowlist", "packagename=?", v0_6);
                v1_0.setTransactionSuccessful();
            } catch (android.content.Context v6_4) {
                v1_0.endTransaction();
                com.sophos.smsec.core.datastore.b.c().sendBroadcast(new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED"), "com.sophos.smsec.PERMISSION");
                throw v6_4;
            } catch (android.content.Intent v0_1) {
                StringBuilder v3_1 = new StringBuilder();
                v3_1.append("delete entry \'");
                v3_1.append(p6);
                v3_1.append("\' from ignore list table failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v3_1.toString(), v0_1);
                v1_0.endTransaction();
                android.content.Context v6_3 = com.sophos.smsec.core.datastore.b.c();
                android.content.Intent v0_3 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
                String v1_2 = "com.sophos.smsec.PERMISSION";
                v6_3.sendBroadcast(v0_3, v1_2);
                return;
            }
            v1_0.endTransaction();
            v6_3 = com.sophos.smsec.core.datastore.b.c();
            v0_3 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
            v1_2 = "com.sophos.smsec.PERMISSION";
        } catch (android.content.Context v6_5) {
            throw v6_5;
        }
    }

Method com.sophos.smsec.core.datastore.b.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized boolean b(int p8)
    {
        int v0 = 1;
        try {
            android.database.SQLException v1_0 = this.a(1);
            try {
                String v3_2 = com.sophos.smsec.core.datastore.DataStore$Table.ALERT_ITEMS.toString();
                StringBuilder v4_4 = new StringBuilder();
                v4_4.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.ALERT_ID.toString());
                v4_4.append("=?");
                StringBuilder v4_0 = v4_4.toString();
                String v5_2 = new String[1];
                v5_2[0] = String.valueOf(p8);
                int v8_1 = v1_0.delete(v3_2, v4_0, v5_2);
            } catch (android.database.SQLException v1_1) {
                StringBuilder v4_2 = new StringBuilder();
                v4_2.append("delete entry \'");
                v4_2.append(v8_1);
                v4_2.append("\' from alert items table failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v4_2.toString(), v1_1);
                v8_1 = 0;
            }
            if (v8_1 <= 0) {
                v0 = 0;
            }
            return v0;
        } catch (int v8_4) {
            throw v8_4;
        }
    }

Method com.sophos.smsec.core.datastore.b.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized void b(String p7, com.sophos.smsec.core.datastore.DataStore$AllowListEntryOriginator p8)
    {
        try {
            String v1_0 = this.a(1);
            try {
                v1_0.beginTransaction();
                String[] v4_1 = new String[2];
                v4_1[0] = p7;
                v4_1[1] = String.valueOf(p8.mValue);
                v1_0.delete("quarantine_allowlist", "packagename=? and originator =?", v4_1);
                v1_0.setTransactionSuccessful();
            } catch (android.content.Context v7_4) {
                v1_0.endTransaction();
                com.sophos.smsec.core.datastore.b.c().sendBroadcast(new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED"), "com.sophos.smsec.PERMISSION");
                throw v7_4;
            } catch (android.content.Intent v8_3) {
                StringBuilder v2_1 = new StringBuilder();
                v2_1.append("delete entry \'");
                v2_1.append(p7);
                v2_1.append("\' from ignore list table failed.");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v2_1.toString(), v8_3);
                v1_0.endTransaction();
                android.content.Context v7_3 = com.sophos.smsec.core.datastore.b.c();
                android.content.Intent v8_5 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
                String v0_3 = "com.sophos.smsec.PERMISSION";
                v7_3.sendBroadcast(v8_5, v0_3);
                return;
            }
            v1_0.endTransaction();
            v7_3 = com.sophos.smsec.core.datastore.b.c();
            v8_5 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
            v0_3 = "com.sophos.smsec.PERMISSION";
        } catch (android.content.Context v7_5) {
            throw v7_5;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized boolean a(int p7)
    {
        int v0 = 1;
        try {
            android.database.sqlite.SQLiteDatabase v1 = this.a(1);
            try {
                v1.beginTransaction();
                com.sophos.smsec.core.datastore.DataStore$Table v3_4 = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.toString();
                String[] v5 = new String[1];
                v5[0] = String.valueOf(p7);
                Throwable v7_2 = v1.delete(v3_4, "key=?", v5);
            } catch (Throwable v7_3) {
                v1.endTransaction();
                throw v7_3;
            } catch (Exception) {
                v1.endTransaction();
                return 0;
            }
            if (com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE.hasVerticalHash()) {
                ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE);
            }
            v1.setTransactionSuccessful();
            if (v7_2 <= null) {
                v0 = 0;
            }
            v1.endTransaction();
            return v0;
        } catch (Throwable v7_4) {
            throw v7_4;
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized void a(java.util.List p8)
    {
        try {
            int v0_1 = this.a(1);
            int v1_1 = new java.util.ArrayList();
            int v3_5 = 0;
        } catch (java.util.List v8_2) {
            throw v8_2;
        }
        while ((v3_5 < p8.size()) && (v3_5 < 200)) {
            v1_1.add("?");
            v3_5++;
        }
        int v3_2 = p8.subList(0, Math.min(p8.size(), v1_1.size()));
        String v5_1 = new StringBuilder();
        v5_1.append("packagename IN (");
        v5_1.append(android.text.TextUtils.join(",", v1_1));
        v5_1.append(")");
        int v2_0 = new String[0];
        int v0_2 = v0_1.delete("rescan_list", v5_1.toString(), ((String[]) v3_2.toArray(v2_0)));
        int v3_4 = new StringBuilder();
        v3_4.append("Removed # from VirusRescanTable: ");
        v3_4.append(v0_2);
        android.util.Log.d("SMSEC_VIRUS_RESCAN", v3_4.toString());
        if (p8.size() > v1_1.size()) {
            this.a(p8.subList(v1_1.size(), p8.size()));
        }
        return;
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized void a(com.sophos.smsec.core.datastore.DataStore$AllowListEntryOriginator p6)
    {
        try {
            String v1_0 = this.a(1);
            android.content.Intent v0_2 = new String[1];
            v0_2[0] = String.valueOf(p6.mValue);
            try {
                v1_0.beginTransaction();
                v1_0.delete("quarantine_allowlist", "originator =? ", v0_2);
                v1_0.setTransactionSuccessful();
            } catch (android.content.Context v6_5) {
                v1_0.endTransaction();
                ark>com.sophos.smsec.core.datastore.bark>.c().sendBroadcast(new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED"), "com.sophos.smsec.PERMISSION");
                throw v6_5;
            } catch (android.content.Intent v0_1) {
                StringBuilder v3_2 = new StringBuilder();
                v3_2.append("delete all rows in ignore list table for origin: ");
                v3_2.append(p6.mValue);
                v3_2.append(" failed");
                com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", v3_2.toString(), v0_1);
                v1_0.endTransaction();
                android.content.Context v6_4 = ark>com.sophos.smsec.core.datastore.bark>.c();
                android.content.Intent v0_4 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
                String v1_2 = "com.sophos.smsec.PERMISSION";
                v6_4.sendBroadcast(v0_4, v1_2);
                return;
            }
            v1_0.endTransaction();
            v6_4 = ark>com.sophos.smsec.core.datastore.bark>.c();
            v0_4 = new android.content.Intent("com.sophos.smsec.action.SCANNER_QUARANTINE_UPDATED");
            v1_2 = "com.sophos.smsec.PERMISSION";
        } catch (android.content.Context v6_6) {
            throw v6_6;
        }
    }

Method com.sophos.smsec.core.datastore.b.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    private long b(android.database.sqlite.SQLiteDatabase p16)
    {
        long v10 = -1;
        android.database.Cursor v9_0 = 0;
        try {
            android.database.Cursor v12 = p16.query(com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString(), new String[] {"count(*)"}), 0, 0, 0, 0, 0);
            try {
                String v4_3;
                if (!v12.moveToFirst()) {
                    v4_3 = 0;
                } else {
                    v4_3 = v12.getLong(0);
                }
            } catch (long v0_2) {
                v9_0 = v12;
                if (v9_0 != null) {
                    if (!v9_0.isClosed()) {
                        v9_0.close();
                    }
                }
                throw v0_2;
            } catch (RuntimeException) {
                v9_0 = v12;
                if (v9_0 == null) {
                    return v10;
                } else {
                    if (v9_0.isClosed()) {
                        return v10;
                    } else {
                        v9_0.close();
                        return v10;
                    }
                }
                long v3_1 = com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString();
                String v4_1 = new StringBuilder();
                v4_1.append("key != ");
                v4_1.append(String v1_25);
                v4_1.append(" AND key IN (SELECT key FROM system_log ORDER BY timestamp asc LIMIT (select COUNT(*) FROM system_log)/");
                v4_1.append("5");
                v4_1.append(")");
                String v5_5 = new String[0];
                long v3_3 = ((long) p16.delete(v3_1, v4_1.toString(), v5_5));
                String v5_7 = com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString();
                StringBuilder v6_2 = new StringBuilder();
                v6_2.append("key != ");
                v6_2.append(v1_25);
                v6_2.append(" AND key IN (SELECT key FROM quarantine_log ORDER BY timestamp asc LIMIT (select COUNT(*) FROM quarantine_log)/");
                v6_2.append("5");
                v6_2.append(")");
                String[] v2_0 = new String[0];
                v10 = (v3_3 + ((long) p16.delete(v5_7, v6_2.toString(), v2_0)));
                if ((v9_0 == null) || (v9_0.isClosed())) {
                    return v10;
                } else {
                }
            }
            v12.close();
            if (v4_3 <= 1000) {
                v10 = 0;
                v9_0 = v12;
            } else {
                String[] v2_2 = com.sophos.smsec.core.datastore.DataStore$Table.LOG.toString();
                long v3_5 = new String[2];
                v3_5[0] = com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.toString();
                v3_5[1] = com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP.toString();
                String v1_16 = new StringBuilder();
                v1_16.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.TYPE.toString());
                v1_16.append(" = ?");
                String v5_11 = v1_16.toString();
                StringBuilder v6_4 = new String[1];
                v6_4[0] = String.valueOf(com.sophos.smsec.core.datastore.log.SMSecLog$LogType.LOGTYPE_SCAN_DONE.getId());
                String v1_22 = new StringBuilder();
                v1_22.append(com.sophos.smsec.core.datastore.DataStore$TableColumn.TIMESTAMP);
                v1_22.append(" desc");
                v9_0 = p16.query(v2_2, v3_5, v5_11, v6_4, 0, 0, v1_22.toString(), "1");
                if (!v9_0.moveToFirst()) {
                    v1_25 = -1;
                } else {
                    v1_25 = ((long) v9_0.getInt(v9_0.getColumnIndex(com.sophos.smsec.core.datastore.DataStore$TableColumn.KEY.toString())));
                }
            }
        } catch (long v0_2) {
        } catch (RuntimeException) {
        }
    }

Method com.sophos.smsec.core.datastore.b.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    static boolean a(com.sophos.smsec.core.datastore.DataStore$Table p9, android.database.sqlite.SQLiteDatabase p10)
    {
        ark>com.sophos.smsec.core.datastore.bark>.a(com.sophos.smsec.core.datastore.DataStore.c());
        int v1 = 1;
        try {
            if (p10 == null) {
                p10 = com.sophos.smsec.core.datastore.DataStore.a(com.sophos.smsec.core.datastore.DataStore.c()).a(1);
            }
            try {
                long v5_1 = com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString();
                String v7_0 = new String[1];
                v7_0[0] = p9.toString();
                long v5_2 = ((long) p10.delete(v5_1, "tablename=?", v7_0));
                try {
                    String v7_2 = new StringBuilder();
                    v7_2.append("removed vertical has for table. Name=");
                    v7_2.append(p9.toString());
                    com.sophos.smsec.core.smsectrace.d.e("SMSec: DataBase", v7_2.toString());
                } catch (long v9_1) {
                    com.sophos.smsec.core.smsectrace.d.c("SMSec: DataBase", "deleting row failed.", v9_1);
                }
                if (v5_2 < 0) {
                    v1 = 0;
                } else {
                }
                return v1;
            } catch (long v9_1) {
                v5_2 = 0;
            }
        } catch (long v9_5) {
            throw v9_5;
        }
    }

Method com.sophos.smsec.core.statistics.c.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private static void a(android.content.Context p3, android.content.ContentValues p4)
    {
        try {
            Exception v3_2 = com.sophos.smsec.core.statistics.ScanStatistics.a().a(p3);
            v3_2.delete("webfiltering", "timestamp < datetime(\'now\', \'-84 days\')", 0);
            v3_2.insert("webfiltering", 0, p4);
        } catch (Exception v3_1) {
            com.sophos.smsec.core.smsectrace.d.c("WebFilteringStatistics", "writing last web-filtering statistics failed.", v3_1);
        }
        return;
    }

Method com.sophos.smsec.core.statistics.a.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private static void a(android.content.Context p3, android.content.ContentValues p4)
    {
        try {
            Exception v3_2 = com.sophos.smsec.core.statistics.ScanStatistics.a().a(p3);
            v3_2.delete("permissionHistory", "timestamp < datetime(\'now\', \'-21 days\')", 0);
            v3_2.insert("permissionHistory", 0, p4);
        } catch (Exception v3_1) {
            android.util.Log.e("PermissionHistoryStats", "writing permission statistics failed.", v3_1);
        }
        return;
    }

Method com.sophos.smsec.core.statistics.ScanStatistics.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    declared_synchronized void a(android.content.Context p4, ark>com.sophos.smsec.core.statistics.ScanStatisticsark>$ScanType p5)
    {
        try {
            Exception v4_1 = this.a(p4);
            v4_1.delete("scanCounter", "timestamp < datetime(\'now\', \'-84 days\')", 0);
            String v0_3 = new android.content.ContentValues();
            v0_3.put("scanType", Integer.valueOf(p5.getValue()));
            v4_1.insert("scanCounter", 0, v0_3);
        } catch (Exception v4_3) {
            throw v4_3;
        } catch (Exception v4_2) {
            com.sophos.smsec.core.smsectrace.d.c("ScanStatistics", "writing last scan count failed.", v4_2);
        }
        return;
    }

Method com.sophos.smsec.core.statistics.ScanStatistics.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized void a(android.content.Context p4, int p5, int p6, int p7, int p8)
    {
        try {
            Exception v4_1 = this.a(p4);
            v4_1.delete("scanResult", "timestamp < datetime(\'now\', \'-84 days\')", 0);
            android.content.ContentValues v0_2 = new android.content.ContentValues();
            v0_2.put("clean", Integer.valueOf(p5));
            v0_2.put("lowRep", Integer.valueOf(p6));
            v0_2.put("pua", Integer.valueOf(p7));
            v0_2.put("malicious", Integer.valueOf(p8));
            v4_1.insert("scanResult", 0, v0_2);
        } catch (Exception v4_3) {
            throw v4_3;
        } catch (Exception v4_2) {
            com.sophos.smsec.core.smsectrace.d.c("ScanStatistics", "writing last scan result failed.", v4_2);
        }
        return;
    }

Method com.sophos.smsec.core.datastore.DbHelper.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p17, int p18, int p19)
    {
        void v0 = this;
        com.sophos.smsec.core.datastore.SmSecPreferences v5_4 = new StringBuilder();
        v5_4.append("Upgrade Database from ");
        v5_4.append(p18);
        v5_4.append(" to ");
        v5_4.append(p19);
        com.sophos.smsec.core.smsectrace.d.b("SMSec: DataBaseInit", v5_4.toString());
        if ((p18 != 0) && ((p18 < 12) && (!com.sophos.smsec.core.datastore.SmSecPreferences.c(this.c).c()))) {
            this = this.a();
        }
        if (p18 < p19) {
            int v8;
            com.sophos.smsec.core.datastore.SmSecPreferences$Preferences v4_29 = new java.util.ArrayList();
            com.sophos.smsec.core.datastore.SmSecPreferences v5_2 = com.sophos.smsec.core.datastore.SmSecPreferences.c(this.c);
            this.e = com.sophos.smsec.core.datastore.DbHelper$UPDATE_STATE.UPDATE_PENDIG;
            if (p18 != 0) {
                v8 = 0;
            } else {
                v8 = 1;
            }
            v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.DB_UPDATEPENDING_PREF, 1);
            v5_2.f(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_SCANNER_SELFTEST);
            v5_2.f(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_SCANNER_INITIAL);
            String v9_11 = (p18 + 1);
            while (v9_11 <= p19) {
                v4_29.add(com.sophos.smsec.core.datastore.c.a(v9_11));
                v9_11++;
            }
            String v9_15 = new String[0];
            v0 = this.a(p17, ((String[]) v4_29.toArray(v9_15)));
            if ((p18 < 4) && (p19 >= 4)) {
                if (p18 > 0) {
                    if (p18 > 1) {
                        com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES, 1, 1, p17);
                    }
                    String v9_18 = com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES.toString();
                    com.sophos.smsec.core.datastore.DataStore$Table[] v11_18 = new String[1];
                    v11_18[0] = com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_SCANNER_SELFTEST.getKey();
                    p17.delete(v9_18, "name=?", v11_18);
                    String v9_19 = com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.UNSECURED_PREFERENCES;
                    String v10_12 = v9_19.length;
                    com.sophos.smsec.core.datastore.DataStore$Table[] v11_17 = 0;
                    while (v11_17 < v10_12) {
                        String v12_2 = v9_19[v11_17];
                        int v13_11 = com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES.toString();
                        String[] v15_2 = new String[1];
                        v15_2[0] = v12_2.getKey();
                        p17.delete(v13_11, "name=?", v15_2);
                        v11_17++;
                    }
                    com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES, 1, p17);
                    if (p18 > 1) {
                        com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG, 1, 1, p17);
                    }
                }
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE, 1, p17);
                com.sophos.smsec.core.datastore.DbHelper.a(p17);
            }
            if (((p18 > 5) || (p19 < 5)) && (((p18 > 6) || (p19 < 6)) && (((p18 > 7) || (p19 < 7)) && (((p18 > 9) || (p19 < 9)) && ((p18 >= 11) || (p19 < 11)))))) {
                int v13_0 = 0;
            } else {
                v13_0 = 1;
            }
            if ((p18 < 6) && (p19 >= 6)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.CALL_QUARANTINE, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.VIP_NUMBERS, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.BLOCKED_NUMBERS, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS, 1, p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE, 1, p17);
            }
            if ((p18 < 9) && (p19 >= 9)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE, 0, p17);
                com.sophos.smsec.core.datastore.b.a(p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE, 1, p17);
            }
            if ((p18 < 13) && (p19 >= 13)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE, 1, p17);
                v13_0 = 1;
            }
            if ((p18 < 14) && (p19 >= 14)) {
                v13_0 = 1;
            }
            if ((p18 < 15) && (p19 >= 15)) {
                if ((v8 == 0) && (!v5_2.e(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED))) {
                    v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED, 0);
                }
                v13_0 = 1;
            }
            if ((p18 < 16) && (p19 >= 16)) {
                v13_0 = 1;
            }
            if ((p18 < 17) && (p19 >= 17)) {
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PDU_QUARANTINE, p17);
                com.sophos.smsec.core.datastore.DataStore$Table[] v11_12 = com.sophos.smsec.core.datastore.DataStore$Table.getAllTablesWithVerticalHashes();
                int v13_1 = v11_12.length;
                String v14_5 = 0;
                while (v14_5 < v13_1) {
                    String[] v15_1 = v11_12[v14_5];
                    if ((v15_1 != com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS) && (v15_1 != com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS)) {
                        com.sophos.smsec.core.datastore.b.a(v15_1, 0, p17);
                    }
                    v14_5++;
                }
                v13_0 = 1;
            }
            if ((p18 < 18) && (p19 >= 18)) {
                v13_0 = 1;
            }
            if ((p18 < 19) && (p19 >= 19)) {
                v13_0 = 1;
            }
            if ((p18 < 20) && (p19 >= 20)) {
                String v9_5 = new android.content.ContentValues();
                com.sophos.smsec.core.datastore.DataStore$Table[] v11_14 = com.sophos.smsec.core.datastore.DataStore$TableColumn.HASH.toString();
                int v13_2 = new byte[1];
                v13_2[0] = 0;
                v9_5.put(v11_14, v13_2);
                com.sophos.smsec.core.datastore.DataStore$Table[] v11_16 = new com.sophos.smsec.core.datastore.DataStore$Table[8];
                v11_16[0] = com.sophos.smsec.core.datastore.DataStore$Table.APK_FINGERPRINTS;
                v11_16[1] = com.sophos.smsec.core.datastore.DataStore$Table.APK_DELTA_FINGERPRINTS;
                v11_16[2] = com.sophos.smsec.core.datastore.DataStore$Table.APK_IGNORE;
                v11_16[3] = com.sophos.smsec.core.datastore.DataStore$Table.CALL_QUARANTINE;
                v11_16[4] = com.sophos.smsec.core.datastore.DataStore$Table.VIP_NUMBERS;
                v11_16[5] = com.sophos.smsec.core.datastore.DataStore$Table.BLOCKED_NUMBERS;
                v11_16[6] = com.sophos.smsec.core.datastore.DataStore$Table.URL_IGNORE;
                v11_16[7] = com.sophos.smsec.core.datastore.DataStore$Table.QUARANTINE;
                com.sophos.smsec.core.datastore.SmSecPreferences$Preferences v4_5 = v11_16.length;
                String v10_1 = 0;
                while (v10_1 < v4_5) {
                    String v12_0 = v11_16[v10_1];
                    com.sophos.smsec.core.datastore.b.a(v12_0, p17);
                    int v13_9 = com.sophos.smsec.core.datastore.DataStore$Table.HASHES.toString();
                    String[] v15_0 = new String[1];
                    v15_0[0] = v12_0.toString();
                    p17.update(v13_9, v9_5, "tablename=?", v15_0);
                    v10_1++;
                }
                v13_0 = 1;
            }
            if ((p18 < 21) && (p19 >= 21)) {
                v13_0 = 1;
            }
            if ((p18 < 22) && (p19 >= 22)) {
                String v9_7 = new StringBuilder();
                v9_7.append(android.os.Environment.getDataDirectory().getAbsolutePath());
                v9_7.append(java.io.File.separator);
                v9_7.append("data");
                v9_7.append(java.io.File.separator);
                v9_7.append("com.sophos.smsec");
                v9_7.append(java.io.File.separator);
                v9_7.append("app_savi");
                new java.io.File(v9_7.toString()).mkdir();
                this.b(p17).c(p17);
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.LOG, 1, p17);
                v13_0 = 1;
            }
            if ((p18 < 23) && (p19 >= 23)) {
                if ((v8 == 0) && (!v5_2.e(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED))) {
                    v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.PREF_APP_PROTECT_ONLY_TRUSTED, 1);
                }
                v13_0 = 1;
            }
            if ((p18 < 24) && (p19 >= 24)) {
                v13_0 = 1;
            }
            if ((p18 < 25) && (p19 >= 25)) {
                if ((v8 == 0) && (!v5_2.e(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.LT_ENABLE_LOCATE))) {
                    v5_2.b(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.LT_ENABLE_LOCATE, 0);
                }
                v13_0 = 1;
            }
            if ((p18 < 26) && (p19 >= 26)) {
                v13_0 = 1;
            }
            if (v13_0 != 0) {
                v5_2.l();
                com.sophos.smsec.core.datastore.b.a(com.sophos.smsec.core.datastore.DataStore$Table.PREFERENCES, 1, p17);
            }
            v5_2.f(com.sophos.smsec.core.datastore.SmSecPreferences$Preferences.DB_UPDATEPENDING_PREF);
        }
        v0.e = com.sophos.smsec.core.datastore.DbHelper$UPDATE_STATE.UPDATE_DONE;
        com.sophos.smsec.core.datastore.a.a(v0.c);
        com.sophos.smsec.core.smsectrace.d.b("SMSec: DataBaseInit", "Upgrade Database done.");
        return;
    }

Method com.sophos.nge.db.NgDataBase.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public declared_synchronized boolean a(int p7)
    {
        int v0 = 1;
        try {
            android.database.sqlite.SQLiteDatabase v1 = this.a(1);
            try {
                boolean v3_2 = ark>com.sophos.nge.db.NgDataBaseark>$Table.NGE_RESULTS.toString();
                String[] v5 = new String[1];
                v5[0] = String.valueOf(p7);
                int v7_2 = v1.delete(v3_2, "key=?", v5);
            } catch (Exception) {
                return 0;
            }
            if (v1.inTransaction()) {
                v1.setTransactionSuccessful();
            }
            if (v7_2 <= 0) {
                v0 = 0;
            }
            return v0;
        } catch (int v7_3) {
            throw v7_3;
        }
    }

Method com.sophos.mobile.msgbox.a.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void a(int p5)
    {
        android.database.sqlite.SQLiteDatabase v0 = this.getWritableDatabase();
        String[] v1_1 = new String[1];
        String v2_3 = new StringBuilder();
        v2_3.append("");
        v2_3.append(p5);
        v1_1[0] = v2_3.toString();
        v0.delete("messages", "_id = ?", v1_1);
        v0.close();
        return;
    }

Method com.google.android.gms.measurement.internal.n.x() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void x()
    {
        this.b();
        this.d();
        try {
            Integer v0_4 = (this.y().delete("messages", 0, 0) + 0);
        } catch (Integer v0_1) {
            this.r().c_().a("Error resetting local analytics data. error", v0_1);
            return;
        }
        if (v0_4 > null) {
            this.r().x().a("Reset local analytics data. records", Integer.valueOf(v0_4));
        }
        return;
    }

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

Couldn't retrieve source code

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


    private final boolean a(int p17, byte[] p18)
    {
        this.b();
        this.d();
        Long v2_5 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p17));
            v3_1.put("entry", p18);
            Long v4_4 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_4) {
                int v7 = 0;
                try {
                    int v9 = this.y();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_1 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            try {
                                if ((v12 != 0) && (v12.moveToFirst())) {
                                    v10_1 = v12.getLong(v2_5);
                                }
                                if (v10_1 >= 100000) {
                                    this.r().c_().a("Data loss, local db full");
                                    long v13_2 = ((100000 - v10_1) + 1);
                                    String[] v11 = new String[1];
                                    v11[v2_5] = Long.toString(v13_2);
                                    Long v10_4 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                    if (v10_4 != v13_2) {
                                        this.r().c_().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_4), Long.valueOf((v13_2 - v10_4)));
                                    }
                                }
                                v9.insertOrThrow("messages", 0, v3_1);
                                v9.setTransactionSuccessful();
                                v9.endTransaction();
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                return 1;
                            } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                v7 = v12;
                                android.os.SystemClock.sleep(((long) v6));
                                v6 += 20;
                                if (v7 != 0) {
                                    v7.close();
                                }
                                if (v9 == 0) {
                                    v5++;
                                    v2_5 = 0;
                                    v4_4 = 5;
                                } else {
                                    v9.close();
                                }
                            }
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_5;
                        }
                        v7 = v9;
                        if (v7 != 0) {
                            try {
                                if (v7.inTransaction()) {
                                    v7.endTransaction();
                                }
                            } catch (com.google.android.gms.measurement.internal.t v0_1) {
                                v9 = v7;
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                throw v0_1;
                            }
                        }
                        this.r().c_().a("Error writing entry to local database", com.google.android.gms.measurement.internal.t v0_0);
                        this.b = 1;
                        if (v12 != 0) {
                            v12.close();
                        }
                        if (v7 == 0) {
                        } else {
                            v7.close();
                        }
                    } catch (com.google.android.gms.measurement.internal.t v0_3) {
                        this.r().c_().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.measurement.internal.t v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.measurement.internal.t v0_1) {
                    v9 = 0;
                    v12 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_3) {
                    v9 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v9 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.measurement.internal.t v0_1) {
                    v12 = v7;
                }
            }
            this.r().i().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

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


    public final int e(String p7, String p8)
    {
        com.google.android.gms.common.internal.r.a(p7);
        com.google.android.gms.common.internal.r.a(p8);
        this.d();
        this.k();
        try {
            android.database.sqlite.SQLiteException v1_1 = this.y();
            com.google.android.gms.measurement.internal.p v4_0 = new String[2];
            v4_0[0] = p7;
            v4_0[1] = p8;
            Object v7_1 = v1_1.delete("conditional_properties", "app_id=? and name=?", v4_0);
            return v7_1;
        } catch (android.database.sqlite.SQLiteException v1_0) {
            this.r().c_().a("Error deleting conditional property", com.google.android.gms.measurement.internal.r.a(v7_1), this.o().c(p8), v1_0);
            return 0;
        }
    }

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


    public final long c(String p7)
    {
        com.google.android.gms.common.internal.r.a(p7);
        this.d();
        this.k();
        try {
            long v0_3 = this.y();
            com.google.android.gms.measurement.internal.t v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.t().b(p7, com.google.android.gms.measurement.internal.h.x))));
            String[] v5_1 = new String[2];
            v5_1[0] = p7;
            v5_1[1] = v1_2;
            Object v7_1 = v0_3.delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", v5_1);
            return ((long) v7_1);
        } catch (long v0_1) {
            this.r().c_().a("Error deleting over the limit events. appId", com.google.android.gms.measurement.internal.r.a(v7_1), v0_1);
            return 0;
        }
    }

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


    public final void b(String p6, String p7)
    {
        com.google.android.gms.common.internal.r.a(p6);
        com.google.android.gms.common.internal.r.a(p7);
        this.d();
        this.k();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.y();
            com.google.android.gms.measurement.internal.p v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.r().x().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.r().c_().a("Error deleting user attribute. appId", com.google.android.gms.measurement.internal.r.a(p6), this.o().c(p7), v0_2);
            return;
        }
    }

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


    final void a(String p13, com.google.android.gms.internal.measurement.cp[] p14)
    {
        this.k();
        this.d();
        com.google.android.gms.common.internal.r.a(p13);
        com.google.android.gms.common.internal.r.a(p14);
        android.database.sqlite.SQLiteDatabase v0 = this.y();
        v0.beginTransaction();
        try {
            this.k();
            this.d();
            com.google.android.gms.common.internal.r.a(p13);
            java.util.ArrayList v1_0 = this.y();
            String v5_6 = new String[1];
            int v6 = 0;
            v5_6[0] = p13;
            v1_0.delete("property_filters", "app_id=?", v5_6);
            String v5_7 = new String[1];
            v5_7[0] = p13;
            v1_0.delete("event_filters", "app_id=?", v5_7);
            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_8 = p14[v2_1];
            this.k();
            this.d();
            com.google.android.gms.common.internal.r.a(p13);
            com.google.android.gms.common.internal.r.a(v3_8);
            com.google.android.gms.common.internal.r.a(v3_8.c);
            com.google.android.gms.common.internal.r.a(v3_8.b);
            if (v3_8.a != null) {
                String v5_12 = v3_8.a.intValue();
                int v7_3 = v3_8.c;
                int v9_2 = 0;
                while (v9_2 < v7_3.length) {
                    if (v7_3[v9_2].a != null) {
                        v9_2++;
                    } else {
                        this.r().i().a("Event filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.measurement.internal.r.a(p13), v3_8.a);
                    }
                }
                int v7_4 = v3_8.b;
                int v9_1 = 0;
                while (v9_1 < v7_4.length) {
                    if (v7_4[v9_1].a != null) {
                        v9_1++;
                    } else {
                        this.r().i().a("Property filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.measurement.internal.r.a(p13), v3_8.a);
                    }
                }
                int v7_5 = v3_8.c;
                int v9_3 = 0;
                while (v9_3 < v7_5.length) {
                    if (this.a(p13, v5_12, v7_5[v9_3])) {
                        v9_3++;
                    } else {
                        int v7_6 = 0;
                    }
                    if (v7_6 != 0) {
                        android.database.sqlite.SQLiteDatabase v3_9 = v3_8.b;
                        int v9_4 = 0;
                        while (v9_4 < v3_9.length) {
                            if (this.a(p13, v5_12, v3_9[v9_4])) {
                                v9_4++;
                            } else {
                                v7_6 = 0;
                                break;
                            }
                        }
                    }
                    if (v7_6 == 0) {
                        this.k();
                        this.d();
                        com.google.android.gms.common.internal.r.a(p13);
                        android.database.sqlite.SQLiteDatabase v3_10 = this.y();
                        boolean v10_8 = new String[2];
                        v10_8[0] = p13;
                        v10_8[1] = String.valueOf(v5_12);
                        v3_10.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_12);
                        v3_10.delete("event_filters", "app_id=? and audience_id=?", v9_0);
                    }
                }
                v7_6 = 1;
            } else {
                this.r().i().a("Audience with no ID. appId", com.google.android.gms.measurement.internal.r.a(p13));
            }
            v2_1++;
        }
        java.util.ArrayList v1_3 = new java.util.ArrayList();
        int v2_3 = p14.length;
        while (v6 < v2_3) {
            v1_3.add(p14[v6].a);
            v6++;
        }
        this.a(p13, v1_3);
        v0.setTransactionSuccessful();
        v0.endTransaction();
        return;
    }

Method com.google.android.gms.measurement.internal.fd.B() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void B()
    {
        this.d();
        this.k();
        if (this.N()) {
            Integer v0_12 = this.s().f.a();
            String v2_1 = this.m().b();
            if (Math.abs((v2_1 - v0_12)) > ((Long) com.google.android.gms.measurement.internal.h.G.b()).longValue()) {
                this.s().f.a(v2_1);
                this.d();
                this.k();
                if (this.N()) {
                    Integer v0_7 = this.y();
                    com.google.android.gms.measurement.internal.t v1_1 = new String[2];
                    v1_1[0] = String.valueOf(this.m().a());
                    v1_1[1] = String.valueOf(com.google.android.gms.measurement.internal.fa.j());
                    Integer v0_8 = v0_7.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_1);
                    if (v0_8 > null) {
                        this.r().x().a("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_8));
                    }
                }
            }
            return;
        } else {
            return;
        }
    }

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


    private final boolean a(String p9, java.util.List p10)
    {
        com.google.android.gms.common.internal.r.a(p9);
        this.k();
        this.d();
        com.google.android.gms.measurement.internal.t v0_2 = this.y();
        try {
            String v4_9 = new String[1];
            v4_9[0] = p9;
            String v4_0 = this.b("select count(1) from audience_filter_values where app_id=?", v4_9);
            String v2_3 = Math.max(0, Math.min(2000, this.t().b(p9, com.google.android.gms.measurement.internal.h.N)));
        } catch (String v10_1) {
            this.r().c_().a("Database error querying filters. appId", com.google.android.gms.measurement.internal.r.a(p9), v10_1);
            return 0;
        }
        if (v4_0 > ((long) v2_3)) {
            String v4_3 = new java.util.ArrayList();
            int v5_0 = 0;
            while (v5_0 < p10.size()) {
                String v6_11 = ((Integer) p10.get(v5_0));
                if ((v6_11 != null) && ((v6_11 instanceof Integer))) {
                    v4_3.add(Integer.toString(v6_11.intValue()));
                    v5_0++;
                } else {
                    return 0;
                }
            }
            String v10_3 = android.text.TextUtils.join(",", v4_3);
            String v6_5 = new StringBuilder((String.valueOf(v10_3).length() + 2));
            v6_5.append("(");
            v6_5.append(v10_3);
            v6_5.append(")");
            String v10_5 = v6_5.toString();
            boolean v7_1 = new StringBuilder((String.valueOf(v10_5).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(v10_5);
            v7_1.append(" order by rowid desc limit -1 offset ?)");
            String v10_7 = v7_1.toString();
            int v5_2 = new String[2];
            v5_2[0] = p9;
            v5_2[1] = Integer.toString(v2_3);
            if (v0_2.delete("audience_filter_values", v10_7, v5_2) <= 0) {
                return 0;
            } else {
                return 1;
            }
        } else {
            return 0;
        }
    }

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


    public final void f()
    {
        com.google.android.gms.analytics.r.d();
        this.z();
        this.b("Delete all hits from local store");
        try {
            String v0_7 = this.b;
            com.google.android.gms.analytics.r.d();
            v0_7.z();
            v0_7.h().delete("hits2", 0, 0);
            String v0_0 = this.b;
            com.google.android.gms.analytics.r.d();
            v0_0.z();
            v0_0.h().delete("properties", 0, 0);
            this.h();
        } catch (String v0_3) {
            this.d("Failed to delete hits from store", v0_3);
        }
        this.D();
        if (this.e.c()) {
            this.b("Device service unavailable. Can\'t clear hits stored on the device service.");
        }
        return;
    }

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


    public final long a(com.google.android.gms.internal.measurement.y p13, boolean p14)
    {
        com.google.android.gms.common.internal.r.a(p13);
        this.z();
        com.google.android.gms.analytics.r.d();
        try {
            this.b.b();
            String v14_8 = this.b;
            String v2_5 = p13.a();
            long v4_0 = p13.b();
            com.google.android.gms.common.internal.r.a(v4_0);
            v14_8.z();
            com.google.android.gms.analytics.r.d();
            String v5_0 = v14_8.h();
            android.content.ContentValues v8_1 = new String[2];
            v8_1[0] = String.valueOf(v2_5);
            String v2_4 = 1;
            v8_1[1] = v4_0;
            long v4_1 = v5_0.delete("properties", "app_uid=? AND cid<>?", v8_1);
        } catch (android.database.sqlite.SQLiteException v13_11) {
            try {
                this.b.d();
            } catch (String v14_4) {
                this.e("Failed to end transaction", v14_4);
            }
            throw v13_11;
        } catch (android.database.sqlite.SQLiteException v13_8) {
            this.e("Failed to update Analytics property", v13_8);
            try {
                this.b.d();
            } catch (android.database.sqlite.SQLiteException v13_10) {
                this.e("Failed to end transaction", v13_10);
            }
            return -1;
        }
        if (v4_1 > 0) {
            v14_8.a("Deleted property records", Integer.valueOf(v4_1));
        }
        long v4_4 = this.b.a(p13.a(), p13.b(), p13.c());
        p13.a((1 + v4_4));
        String v14_7 = this.b;
        com.google.android.gms.common.internal.r.a(p13);
        v14_7.z();
        com.google.android.gms.analytics.r.d();
        android.database.sqlite.SQLiteDatabase v6_4 = v14_7.h();
        String v7_2 = p13.f();
        com.google.android.gms.common.internal.r.a(v7_2);
        android.content.ContentValues v8_3 = new android.net.Uri$Builder();
        String v7_4 = v7_2.entrySet().iterator();
        while (v7_4.hasNext()) {
            long v9_1 = ((java.util.Map$Entry) v7_4.next());
            v8_3.appendQueryParameter(((String) v9_1.getKey()), ((String) v9_1.getValue()));
        }
        String v7_6 = v8_3.build().getEncodedQuery();
        if (v7_6 == null) {
            v7_6 = "";
        }
        android.content.ContentValues v8_5 = new android.content.ContentValues();
        v8_5.put("app_uid", Long.valueOf(p13.a()));
        v8_5.put("cid", p13.b());
        v8_5.put("tid", p13.c());
        if (!p13.d()) {
            v2_4 = 0;
        } else {
        }
        v8_5.put("adid", Integer.valueOf(v2_4));
        v8_5.put("hits_count", Long.valueOf(p13.e()));
        v8_5.put("params", v7_6);
        try {
            if (v6_4.insertWithOnConflict("properties", 0, v8_5, 5) == -1) {
                v14_7.f("Failed to insert/update a property (got -1)");
            }
        } catch (android.database.sqlite.SQLiteException v13_3) {
            v14_7.e("Error storing a property", v13_3);
        }
        this.b.c();
        try {
            this.b.d();
        } catch (android.database.sqlite.SQLiteException v13_7) {
            this.e("Failed to end transaction", v13_7);
        }
        return v4_4;
    }

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


    public final int f()
    {
        com.google.android.gms.analytics.r.d();
        this.z();
        if (this.d.a(86400000)) {
            this.d.a();
            this.b("Deleting stale hits (if any)");
            int v0_1 = this.h();
            String[] v6_1 = new String[1];
            v6_1[0] = Long.toString((this.j().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.measurement.ae.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(java.util.List p8)
    {
        com.google.android.gms.common.internal.r.a(p8);
        com.google.android.gms.analytics.r.d();
        this.z();
        if (!p8.isEmpty()) {
            String v0_5 = new StringBuilder("hit_id");
            v0_5.append(" in (");
            int v1_0 = 0;
            while (v1_0 < p8.size()) {
                String v2_6 = ((Long) p8.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.h();
                this.a("Deleting dispatched hits. count", Integer.valueOf(p8.size()));
                int v1_3 = v1_2.delete("hits2", v0_0, 0);
            } catch (Integer v8_3) {
                this.e("Error deleting hits", v8_3);
                throw v8_3;
            }
            if (v1_3 != p8.size()) {
                this.b("Deleted fewer hits then expected", Integer.valueOf(p8.size()), Integer.valueOf(v1_3), v0_0);
            }
            return;
        } else {
            return;
        }
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.updateTrackedQueryKeys() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void updateTrackedQueryKeys(long p12, java.util.Set p14, java.util.Set p15)
    {
        this.verifyInsideTransaction();
        com.google.firebase.database.logging.LogWrapper v0_0 = System.currentTimeMillis();
        android.database.sqlite.SQLiteDatabase v3_1 = String.valueOf(p12);
        Object[] v4_4 = p15.iterator();
        while (v4_4.hasNext()) {
            String v5_4 = ((com.google.firebase.database.snapshot.ChildKey) v4_4.next());
            int v9_2 = this.database;
            String[] v7_1 = new String[2];
            v7_1[0] = v3_1;
            v7_1[1] = v5_4.asString();
            v9_2.delete("trackedKeys", "id = ? AND key = ?", v7_1);
        }
        long v2_0 = p14.iterator();
        while (v2_0.hasNext()) {
            android.database.sqlite.SQLiteDatabase v3_3 = ((com.google.firebase.database.snapshot.ChildKey) v2_0.next());
            Object[] v4_3 = new android.content.ContentValues();
            v4_3.put("id", Long.valueOf(p12));
            v4_3.put("key", v3_3.asString());
            this.database.insertWithOnConflict("trackedKeys", 0, v4_3, 5);
        }
        long v2_2 = (System.currentTimeMillis() - v0_0);
        if (this.logger.logsDebug()) {
            com.google.firebase.database.logging.LogWrapper v0_3 = this.logger;
            Object[] v4_1 = new Object[4];
            v4_1[0] = Integer.valueOf(p14.size());
            v4_1[1] = Integer.valueOf(p15.size());
            v4_1[2] = Long.valueOf(p12);
            v4_1[3] = Long.valueOf(v2_2);
            Object[] v13_1 = new Object[0];
            v0_3.debug(String.format("Updated tracked query keys (%d added, %d removed) for tracked query id %d in %dms", v4_1), v13_1);
        }
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.saveTrackedQueryKeys() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void saveTrackedQueryKeys(long p11, java.util.Set p13)
    {
        this.verifyInsideTransaction();
        com.google.firebase.database.logging.LogWrapper v0_0 = System.currentTimeMillis();
        Object[] v4_4 = this.database;
        int v7_2 = new String[1];
        v7_2[0] = String.valueOf(p11);
        v4_4.delete("trackedKeys", "id = ?", v7_2);
        long v2_0 = p13.iterator();
        while (v2_0.hasNext()) {
            android.database.sqlite.SQLiteDatabase v3_2 = ((com.google.firebase.database.snapshot.ChildKey) v2_0.next());
            Object[] v4_3 = new android.content.ContentValues();
            v4_3.put("id", Long.valueOf(p11));
            v4_3.put("key", v3_2.asString());
            this.database.insertWithOnConflict("trackedKeys", 0, v4_3, 5);
        }
        long v2_2 = (System.currentTimeMillis() - v0_0);
        if (this.logger.logsDebug()) {
            com.google.firebase.database.logging.LogWrapper v0_3 = this.logger;
            Object[] v4_1 = new Object[3];
            v4_1[0] = Integer.valueOf(p13.size());
            v4_1[1] = Long.valueOf(p11);
            v4_1[2] = Long.valueOf(v2_2);
            Object[] v12_1 = new Object[0];
            v0_3.debug(String.format("Set %d tracked query keys for tracked query %d in %dms", v4_1), v12_1);
        }
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.removeUserWrite() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void removeUserWrite(long p10)
    {
        this.verifyInsideTransaction();
        com.google.firebase.database.logging.LogWrapper v0_2 = System.currentTimeMillis();
        Integer v2_2 = this.database;
        Object[] v6_2 = new String[1];
        v6_2[0] = String.valueOf(p10);
        Integer v2_0 = v2_2.delete("writes", "id = ?", v6_2);
        long v3_1 = (System.currentTimeMillis() - v0_2);
        if (this.logger.logsDebug()) {
            com.google.firebase.database.logging.LogWrapper v0_3 = this.logger;
            Object[] v6_1 = new Object[3];
            v6_1[0] = Integer.valueOf(v2_0);
            v6_1[1] = Long.valueOf(p10);
            v6_1[2] = Long.valueOf(v3_1);
            Object[] v11_1 = new Object[0];
            v0_3.debug(String.format("Deleted %d write(s) with writeId %d in %dms", v6_1), v11_1);
        }
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.removeAllUserWrites() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void removeAllUserWrites()
    {
        this.verifyInsideTransaction();
        com.google.firebase.database.logging.LogWrapper v0_3 = System.currentTimeMillis();
        Object[] v2_4 = this.database.delete("writes", 0, 0);
        Long v3_0 = (System.currentTimeMillis() - v0_3);
        if (this.logger.logsDebug()) {
            com.google.firebase.database.logging.LogWrapper v0_2 = this.logger;
            Object[] v5_1 = new Object[2];
            v5_1[0] = Integer.valueOf(v2_4);
            v5_1[1] = Long.valueOf(v3_0);
            Object[] v2_2 = new Object[0];
            v0_2.debug(String.format("Deleted %d (all) write(s) in %dms", v5_1), v2_2);
        }
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.purgeCache() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void purgeCache()
    {
        this.verifyInsideTransaction();
        this.database.delete("serverCache", 0, 0);
        this.database.delete("writes", 0, 0);
        this.database.delete("trackedQueries", 0, 0);
        this.database.delete("trackedKeys", 0, 0);
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.pruneCache() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void pruneCache(com.google.firebase.database.core.Path p17, com.google.firebase.database.core.persistence.PruneForest p18)
    {
        if (p18.prunesAnything()) {
            void v16_1 = this.verifyInsideTransaction();
            long v9 = System.currentTimeMillis();
            String v0_1 = this.loadNestedQuery(p17, new String[] {"rowid", "path"}));
            com.google.firebase.database.core.utilities.ImmutableTree v12 = new com.google.firebase.database.core.utilities.ImmutableTree(0);
            com.google.firebase.database.logging.LogWrapper v4_0 = new com.google.firebase.database.core.utilities.ImmutableTree(0);
            while (v0_1.moveToNext()) {
                Object[] v1_1 = v0_1.getLong(0);
                com.google.firebase.database.core.Path v3_2 = new com.google.firebase.database.core.Path(v0_1.getString(1));
                if (p17.contains(v3_2)) {
                    Object[] v6_2 = com.google.firebase.database.core.Path.getRelative(p17, v3_2);
                    if (!p18.shouldPruneUnkeptDescendants(v6_2)) {
                        if (!p18.shouldKeep(v6_2)) {
                            Object[] v1_2 = this.logger;
                            com.google.firebase.database.snapshot.Node v2_3 = new StringBuilder();
                            v2_3.append("We are pruning at ");
                            v2_3.append(p17);
                            v2_3.append(" and have data at ");
                            v2_3.append(v3_2);
                            v2_3.append(" that isn\'t marked for pruning or keeping. Ignoring.");
                            v1_2.warn(v2_3.toString());
                        } else {
                            v4_0 = v4_0.set(v6_2, Long.valueOf(v1_1));
                        }
                    } else {
                        v12 = v12.set(v6_2, Long.valueOf(v1_1));
                    }
                } else {
                    Object[] v1_5 = this.logger;
                    com.google.firebase.database.snapshot.Node v2_6 = new StringBuilder();
                    v2_6.append("We are pruning at ");
                    v2_6.append(p17);
                    v2_6.append(" but we have data stored higher up at ");
                    v2_6.append(v3_2);
                    v2_6.append(". Ignoring.");
                    v1_5.warn(v2_6.toString());
                }
            }
            Object[] v1_9;
            String v0_3;
            if (v12.isEmpty()) {
                v0_3 = 0;
                v1_9 = 0;
            } else {
                java.util.ArrayList v15_1 = new java.util.ArrayList();
                v16_1.pruneTreeRecursive(p17, com.google.firebase.database.core.Path.getEmptyPath(), v12, v4_0, p18, v15_1);
                String v0_6 = v12.values();
                Object[] v1_12 = new StringBuilder();
                v1_12.append("rowid IN (");
                v1_12.append(this.commaSeparatedList(v0_6));
                v1_12.append(")");
                this.database.delete("serverCache", v1_12.toString(), 0);
                Object[] v1_14 = v15_1.iterator();
                while (v1_14.hasNext()) {
                    com.google.firebase.database.snapshot.Node v2_19 = ((com.google.firebase.database.core.utilities.Pair) v1_14.next());
                    this.saveNested(p17.child(((com.google.firebase.database.core.Path) v2_19.getFirst())), ((com.google.firebase.database.snapshot.Node) v2_19.getSecond()));
                }
                v0_3 = v0_6.size();
                v1_9 = v15_1.size();
            }
            com.google.firebase.database.snapshot.Node v2_17 = (System.currentTimeMillis() - v9);
            if (this.logger.logsDebug()) {
                com.google.firebase.database.logging.LogWrapper v4_3 = this.logger;
                Object[] v6_9 = new Object[3];
                v6_9[0] = Integer.valueOf(v0_3);
                v6_9[1] = Integer.valueOf(v1_9);
                v6_9[2] = Long.valueOf(v2_17);
                Object[] v1_16 = new Object[0];
                v4_3.debug(String.format("Pruned %d rows with %d nodes resaved in %dms", v6_9), v1_16);
            }
            return;
        } else {
            return;
        }
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.deleteTrackedQuery() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void deleteTrackedQuery(long p6)
    {
        this.verifyInsideTransaction();
        String v6_1 = String.valueOf(p6);
        android.database.sqlite.SQLiteDatabase v0_1 = this.database;
        String[] v3 = new String[1];
        v3[0] = v6_1;
        v0_1.delete("trackedQueries", "id = ?", v3);
        android.database.sqlite.SQLiteDatabase v0_0 = this.database;
        String[] v2_0 = new String[1];
        v2_0[0] = v6_1;
        v0_0.delete("trackedKeys", "id = ?", v2_0);
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.saveWrite() calling method android.database.sqlite.SQLiteDatabase.delete()


    private void saveWrite(com.google.firebase.database.core.Path p7, long p8, String p10, byte[] p11)
    {
        this.verifyInsideTransaction();
        android.content.ContentValues v0_0 = this.database;
        int v3_2 = new String[1];
        int v5 = 0;
        v3_2[0] = String.valueOf(p8);
        v0_0.delete("writes", "id = ?", v3_2);
        if (p11.length < 262144) {
            android.content.ContentValues v0_3 = new android.content.ContentValues();
            v0_3.put("id", Long.valueOf(p8));
            v0_3.put("path", com.google.firebase.database.android.SqlPersistenceStorageEngine.pathToKey(p7));
            v0_3.put("type", p10);
            v0_3.put("part", ((Integer) 0));
            v0_3.put("node", p11);
            this.database.insertWithOnConflict("writes", 0, v0_3, 5);
        } else {
            java.util.List v11_1 = com.google.firebase.database.android.SqlPersistenceStorageEngine.splitBytes(p11, 262144);
            while (v5 < v11_1.size()) {
                android.content.ContentValues v0_6 = new android.content.ContentValues();
                v0_6.put("id", Long.valueOf(p8));
                v0_6.put("path", com.google.firebase.database.android.SqlPersistenceStorageEngine.pathToKey(p7));
                v0_6.put("type", p10);
                v0_6.put("part", Integer.valueOf(v5));
                v0_6.put("node", ((byte[]) v11_1.get(v5)));
                this.database.insertWithOnConflict("writes", 0, v0_6, 5);
                v5++;
            }
        }
        return;
    }

Method com.google.firebase.database.android.SqlPersistenceStorageEngine.removeNested() calling method android.database.sqlite.SQLiteDatabase.delete()


    private int removeNested(String p6, com.google.firebase.database.core.Path p7)
    {
        int v7_2 = com.google.firebase.database.android.SqlPersistenceStorageEngine.pathToKey(p7);
        String v1 = com.google.firebase.database.android.SqlPersistenceStorageEngine.pathPrefixStartToPrefixEnd(v7_2);
        android.database.sqlite.SQLiteDatabase v2 = this.database;
        String[] v3_1 = new String[2];
        v3_1[0] = v7_2;
        v3_1[1] = v1;
        return v2.delete(p6, "path >= ? AND path < ?", v3_1);
    }

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


    final void c(com.google.android.gms.measurement.internal.zzk p19)
    {
        void v18_1 = this.w();
        v18_1.j();
        com.google.android.gms.common.internal.r.a(p19);
        com.google.android.gms.common.internal.r.a(p19.a);
        if ((!android.text.TextUtils.isEmpty(p19.b)) || (!android.text.TextUtils.isEmpty(p19.r))) {
            String v0_9 = v18_1.d().b(p19.a);
            if ((v0_9 != null) && ((android.text.TextUtils.isEmpty(v0_9.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_9.g(0);
                v18_1.d().a(v0_9);
                v18_1.s().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.j.m().a();
                }
                android.os.Bundle v15_3;
                String v0_76 = p19.n;
                if ((v0_76 == null) || (v0_76 == 1)) {
                    v15_3 = v0_76;
                } else {
                    this.j.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.measurement.internal.r.a(p19.a), Integer.valueOf(v0_76));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_8 = v18_1.d().b(p19.a);
                } catch (String v0_83) {
                    v18_1.d().x();
                    throw v0_83;
                }
                if (v0_8 != null) {
                    this.j.j();
                    if (com.google.android.gms.measurement.internal.es.a(p19.b, v0_8.d(), p19.r, v0_8.e())) {
                        this.j.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.measurement.internal.r.a(v0_8.b()));
                        com.google.android.gms.measurement.internal.zzfv v7_0 = v18_1.d();
                        String v8_0 = v0_8.b();
                        v7_0.k();
                        v7_0.d();
                        com.google.android.gms.common.internal.r.a(v8_0);
                        try {
                            String v0_0 = v7_0.y();
                            long v9_0 = new String[1];
                            v9_0[0] = v8_0;
                            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_0.r().c_().a("Error deleting application data. appId, error", com.google.android.gms.measurement.internal.r.a(v8_0), v0_4);
                            v0_8 = 0;
                        }
                        if (v10_10 <= null) {
                        } else {
                            v7_0.r().x().a("Deleted application data. app, records", v8_0, Integer.valueOf(v10_10));
                        }
                    }
                }
                if (v0_8 != null) {
                    if (v0_8.k() == -2147483648) {
                        if ((v0_8.j() != null) && (!v0_8.j().equals(p19.c))) {
                            com.google.android.gms.measurement.internal.zzfv v7_9 = new android.os.Bundle();
                            v7_9.putString("_pv", v0_8.j());
                            String v0_11 = new com.google.android.gms.measurement.internal.zzag;
                            v0_11("_au", new com.google.android.gms.measurement.internal.zzad(v7_9), "auto", v5_6);
                            this.a(v0_11, p19);
                        }
                    } else {
                        if (v0_8.k() != p19.j) {
                            com.google.android.gms.measurement.internal.zzfv v7_14 = new android.os.Bundle();
                            v7_14.putString("_pv", v0_8.j());
                            String v0_13 = new com.google.android.gms.measurement.internal.zzag;
                            v0_13("_au", new com.google.android.gms.measurement.internal.zzad(v7_14), "auto", v5_6);
                            this.a(v0_13, p19);
                        }
                    }
                }
                String v0_14;
                v18_1.e(p19);
                if (v15_3 != null) {
                    if (v15_3 != 1) {
                        v0_14 = 0;
                    } else {
                        v0_14 = v18_1.d().a(p19.a, "_v");
                    }
                } else {
                    v0_14 = v18_1.d().a(p19.a, "_f");
                }
                if (v0_14 != null) {
                    if (p19.i) {
                        com.google.android.gms.measurement.internal.zzfv v3_2 = new com.google.android.gms.measurement.internal.zzag;
                        v3_2("_cd", new com.google.android.gms.measurement.internal.zzad(new android.os.Bundle()), "auto", v5_6);
                        this.a(v3_2, p19);
                    }
                } else {
                    Long v13_0;
                    long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                    if (v15_3 != null) {
                        v13_0 = 1;
                        if (v15_3 == 1) {
                            String v0_20 = new com.google.android.gms.measurement.internal.zzfv;
                            v0_20("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                            this.a(v0_20, p19);
                            v18_1 = v18_1.w();
                            v18_1.j();
                            String v0_22 = new android.os.Bundle();
                            v0_22.putLong("_c", 1);
                            v0_22.putLong("_r", 1);
                            if (this.j.b().t(p19.a)) {
                                v0_22.putLong("_et", 1);
                            }
                            if ((this.j.b().j(p19.a)) && (p19.q)) {
                                v0_22.putLong("_dac", 1);
                            }
                            com.google.android.gms.measurement.internal.zzfv v3_15 = new com.google.android.gms.measurement.internal.zzag;
                            v3_15("_v", new com.google.android.gms.measurement.internal.zzad(v0_22), "auto", v5_6);
                            this.a(v3_15, p19);
                        }
                    } else {
                        String v0_23 = new com.google.android.gms.measurement.internal.zzfv;
                        v13_0 = 1;
                        v0_23("_fot", v5_6, Long.valueOf(v9_13), "auto");
                        this.a(v0_23, p19);
                        if (this.j.b().n(p19.b)) {
                            v18_1 = v18_1.w();
                            this.j.f().a(p19.a);
                        }
                        v18_1 = v18_1.w();
                        v18_1.j();
                        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.j.b().t(p19.a)) {
                            v15_2.putLong("_et", 1);
                        }
                        if ((this.j.b().j(p19.a)) && (p19.q)) {
                            v15_2.putLong("_dac", 1);
                        }
                        if (this.j.n().getPackageManager() != null) {
                            try {
                                String v0_51 = com.google.android.gms.common.c.c.a(this.j.n()).b(p19.a, 0);
                            } catch (String v0_52) {
                                this.j.r().c_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.measurement.internal.r.a(p19.a), v0_52);
                                v0_51 = 0;
                            }
                            if ((v0_51 != null) && (v0_51.firstInstallTime != 0)) {
                                String v0_55;
                                if (v0_51.firstInstallTime == v0_51.lastUpdateTime) {
                                    v0_55 = 1;
                                } else {
                                    v15_2.putLong("_uwa", 1);
                                    v0_55 = 0;
                                }
                                long v9_21;
                                String v12_10 = new com.google.android.gms.measurement.internal.zzfv;
                                if (v0_55 == null) {
                                    v9_21 = 0;
                                } else {
                                    v9_21 = 1;
                                }
                                com.google.android.gms.measurement.internal.zzfv v3_16 = v12_10;
                                v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                this.a(v3_16, p19);
                            }
                            try {
                                android.content.pm.ApplicationInfo v16_0 = com.google.android.gms.common.c.c.a(this.j.n()).a(p19.a, 0);
                                String v0_62 = v16_0;
                            } catch (String v0_63) {
                                this.j.r().c_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.measurement.internal.r.a(p19.a), v0_63);
                                v0_62 = v16_0;
                            }
                            if (v0_62 != null) {
                                if ((v0_62.flags & 1) != 0) {
                                    v15_2.putLong("_sys", 1);
                                }
                                if ((v0_62.flags & 128) != 0) {
                                    v15_2.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.j.r().c_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.measurement.internal.r.a(p19.a));
                        }
                        String v0_72 = v18_1.d();
                        com.google.android.gms.measurement.internal.zzfv v3_24 = p19.a;
                        com.google.android.gms.common.internal.r.a(v3_24);
                        v0_72.d();
                        v0_72.k();
                        com.google.android.gms.measurement.internal.zzfv v3_25 = v0_72.h(v3_24, "first_open_count");
                        if (v3_25 >= 0) {
                            v15_2.putLong("_pfo", v3_25);
                        }
                        String v0_75 = new com.google.android.gms.measurement.internal.zzag;
                        v0_75("_f", new com.google.android.gms.measurement.internal.zzad(v15_2), "auto", v5_6);
                        this.a(v0_75, p19);
                    }
                    if (!this.j.b().d(p19.a, com.google.android.gms.measurement.internal.h.ao)) {
                        String v0_82 = new android.os.Bundle();
                        v0_82.putLong("_et", v13_0);
                        if (this.j.b().t(p19.a)) {
                            v0_82.putLong("_fr", v13_0);
                        }
                        com.google.android.gms.measurement.internal.zzfv v3_32 = new com.google.android.gms.measurement.internal.zzag;
                        v3_32("_e", new com.google.android.gms.measurement.internal.zzad(v0_82), "auto", v5_6);
                        this.a(v3_32, p19);
                    }
                }
                v18_1.d().w();
                v18_1.d().x();
                return;
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

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


    final void b(com.google.android.gms.measurement.internal.zzk p12)
    {
        if (this.w != null) {
            this.x = new java.util.ArrayList();
            this.x.addAll(this.w);
        }
        com.google.android.gms.measurement.internal.zzk v0_7 = this.d();
        boolean v1_0 = p12.a;
        com.google.android.gms.common.internal.r.a(v1_0);
        v0_7.d();
        v0_7.k();
        try {
            String v2_0 = v0_7.y();
            String v3_1 = new String[1];
            v3_1[0] = v1_0;
            boolean v5_10 = (((((((((v2_0.delete("apps", "app_id=?", v3_1) + 0) + v2_0.delete("events", "app_id=?", v3_1)) + v2_0.delete("user_attributes", "app_id=?", v3_1)) + v2_0.delete("conditional_properties", "app_id=?", v3_1)) + v2_0.delete("raw_events", "app_id=?", v3_1)) + v2_0.delete("raw_events_metadata", "app_id=?", v3_1)) + v2_0.delete("queue", "app_id=?", v3_1)) + v2_0.delete("audience_filter_values", "app_id=?", v3_1)) + v2_0.delete("main_event_params", "app_id=?", v3_1));
        } catch (String v2_2) {
            v0_7.r().c_().a("Error resetting analytics data. appId, error", com.google.android.gms.measurement.internal.r.a(v1_0), v2_2);
            com.google.android.gms.measurement.internal.zzk v0_8 = this.a(this.j.n(), p12.a, p12.b, p12.h, p12.o, p12.p, p12.m, p12.r);
            if ((!this.j.b().j(p12.a)) || (p12.h)) {
                this.c(v0_8);
            }
            return;
        }
        if (v5_10) {
        } else {
            v0_7.r().x().a("Reset analytics data. app, records", v1_0, Integer.valueOf(v5_10));
        }
    }

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


    final void a(int p10, Throwable p11, byte[] p12, String p13)
    {
        this.w();
        this.j();
        try {
            if (p12 == null) {
                p12 = new byte[0];
            }
        } catch (long v10_14) {
            this.s = 0;
            this.A();
            throw v10_14;
        }
        String v1_3 = this.w;
        this.w = 0;
        int v4 = 1;
        if (((p10 != 200) && (p10 != 204)) || (p11)) {
            this.j.r().x().a("Network upload failed. Will retry later. code, error", Integer.valueOf(p10), p11);
            this.j.c().d.a(this.j.m().a());
            if (p10 != 503) {
                if (p10 != 429) {
                    v4 = 0;
                } else {
                }
            }
            if (v4 != 0) {
                this.j.c().e.a(this.j.m().a());
            }
            if (this.j.b().g(p13)) {
                this.d().a(v1_3);
            }
            this.z();
        } else {
            try {
                this.j.c().c.a(this.j.m().a());
                this.j.c().d.a(0);
                this.z();
                this.j.r().x().a("Successful upload. Got network response. code, size", Integer.valueOf(p10), Integer.valueOf(p12.length));
                this.d().f();
            } catch (long v10_7) {
                this.j.r().c_().a("Database error while trying to delete uploaded bundles", v10_7);
                this.n = this.j.m().b();
                this.j.r().x().a("Disable upload, time", Long.valueOf(this.n));
            }
            long v10_24 = v1_3.iterator();
            while (v10_24.hasNext()) {
                boolean v11_2 = ((Long) v10_24.next());
                try {
                    com.google.android.gms.measurement.internal.t v12_1 = this.d();
                    String v7_0 = v11_2.longValue();
                    v12_1.d();
                    v12_1.k();
                    java.util.List v13_1 = v12_1.y();
                    String v1_0 = new String[1];
                    v1_0[0] = String.valueOf(v7_0);
                    try {
                        if (v13_1.delete("queue", "rowid=?", v1_0) != 1) {
                            throw new android.database.sqlite.SQLiteException("Deleted fewer rows from queue than expected");
                        } else {
                        }
                    } catch (java.util.List v13_5) {
                        v12_1.r().c_().a("Failed to delete a bundle in a queue table", v13_5);
                        throw v13_5;
                    }
                } catch (com.google.android.gms.measurement.internal.t v12_5) {
                    if (this.x != null) {
                        if (this.x.contains(v11_2)) {
                        }
                    }
                    throw v12_5;
                }
            }
            this.d().w();
            this.d().x();
            this.x = 0;
            if ((!this.c().f()) || (!this.y())) {
                this.y = -1;
                this.z();
            } else {
                this.k();
            }
            this.n = 0;
        }
        this.s = 0;
        this.A();
        return;
    }

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


    private final boolean a(String p46, long p47)
    {
        String v1_0 = this;
        this.d().f();
        try {
            com.google.android.gms.measurement.internal.d v3_10 = 0;
            int v2_1 = new ark>com.google.android.gms.measurement.internal.ejark>$a(this, 0);
            Object v4_30 = this.d();
            String v5_62 = this.y;
            com.google.android.gms.common.internal.r.a(v2_1);
            v4_30.d();
            v4_30.k();
            try {
                String v23_1;
                int v7_2;
                Long v15_3 = v4_30.y();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        int v13_46;
                        com.google.android.gms.measurement.internal.d v3_79 = v5_62 cmp -1;
                        if (v3_79 == null) {
                            v13_46 = new String[] {0});
                        } else {
                            int v7_73 = new String[2];
                            v7_73[0] = 0;
                            v7_73[1] = String.valueOf(v5_62);
                            v13_46 = v7_73;
                        }
                        com.google.android.gms.measurement.internal.d v3_84;
                        if (v3_79 == null) {
                            v3_84 = "";
                        } else {
                            v3_84 = " and rowid <= ?";
                        }
                        boolean v14_16 = new StringBuilder((String.valueOf(v3_84).length() + 84));
                        v14_16.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_16.append(v3_84);
                        v14_16.append(" order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v14_16.toString(), v13_46);
                        if (v3_10.moveToFirst()) {
                            int v13_51 = v3_10.getString(0);
                            v3_10.close();
                            v23_1 = v3_10;
                            v7_2 = v13_51;
                            v3_10 = 0;
                            try {
                                int v13_14 = new String[2];
                                v13_14[0] = v3_10;
                                v13_14[1] = v7_2;
                                String v25_2 = v15_3;
                                Long v15_2 = v15_3.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v13_14, 0, 0, "rowid", "2");
                                try {
                                    if (v15_2.moveToFirst()) {
                                        int v13_28 = v15_2.getBlob(0);
                                        int v13_29 = com.google.android.gms.internal.measurement.iv.a(v13_28, 0, v13_28.length);
                                        boolean v14_10 = new com.google.android.gms.internal.measurement.dd();
                                        try {
                                            v14_10.a(v13_29);
                                        } catch (android.database.sqlite.SQLiteException v0_3) {
                                            long v6_3 = v15_2;
                                            v4_30.r().c_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.measurement.internal.r.a(v3_10), v0_3);
                                            if (v6_3 == 0) {
                                                com.google.android.gms.measurement.internal.d v3_83;
                                                if (v2_1.c == null) {
                                                    v3_83 = 1;
                                                } else {
                                                    if (!v2_1.c.isEmpty()) {
                                                        v3_83 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_83 != null) {
                                                    this.d().w();
                                                    this.d().x();
                                                    return 0;
                                                } else {
                                                    com.google.android.gms.measurement.internal.d v3_9 = v2_1.a;
                                                    Object v4_4 = new com.google.android.gms.internal.measurement.da[v2_1.c.size()];
                                                    v3_9.b = v4_4;
                                                    Object v4_7 = this.j.b().e(v3_9.o);
                                                    String v5_13 = this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.ao);
                                                    Boolean v8_14 = 0;
                                                    Object v9_7 = 0;
                                                    boolean v10_56 = 0;
                                                    Long v12_66 = 0;
                                                    int v13_34 = 0;
                                                    boolean v14_12 = 0;
                                                    while (v10_56 < v2_1.c.size()) {
                                                        int v18_0;
                                                        String v23_2;
                                                        long v6_17 = ((com.google.android.gms.internal.measurement.da) v2_1.c.get(v10_56));
                                                        boolean v21_0 = v12_66;
                                                        if (!this.s().b(v2_1.a.o, v6_17.b)) {
                                                            int v26_1;
                                                            long v29_0;
                                                            v23_2 = v10_56;
                                                            String v25_1 = v13_34;
                                                            int v7_22 = this.s().c(v2_1.a.o, v6_17.b);
                                                            if (v7_22 != 0) {
                                                                if (v6_17.a == null) {
                                                                    Long v12_20 = new com.google.android.gms.internal.measurement.db[0];
                                                                    v6_17.a = v12_20;
                                                                }
                                                                int v11_11 = v6_17.a;
                                                                Long v12_21 = v11_11.length;
                                                                int v13_9 = 0;
                                                                int v26_2 = 0;
                                                                long v27_1 = 0;
                                                                while (v13_9 < v12_21) {
                                                                    boolean v10_47 = v11_11[v13_9];
                                                                    long v29_4 = v11_11;
                                                                    com.google.android.gms.measurement.internal.d v30_2 = v12_21;
                                                                    if (!"_c".equals(v10_47.a)) {
                                                                        if ("_r".equals(v10_47.a)) {
                                                                            v10_47.c = Long.valueOf(1);
                                                                            v27_1 = 1;
                                                                        }
                                                                    } else {
                                                                        v10_47.c = Long.valueOf(1);
                                                                        v26_2 = 1;
                                                                    }
                                                                    v13_9++;
                                                                    v11_11 = v29_4;
                                                                    v12_21 = v30_2;
                                                                }
                                                                if ((v26_2 == 0) && (v7_22 != 0)) {
                                                                    this.j.r().x().a("Marking event as conversion", this.j.k().a(v6_17.b));
                                                                    boolean v10_9 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_17 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_17.a = "_c";
                                                                    v11_17.c = Long.valueOf(1);
                                                                    v10_9[(v10_9.length - 1)] = v11_17;
                                                                    v6_17.a = v10_9;
                                                                }
                                                                if (v27_1 == 0) {
                                                                    this.j.r().x().a("Marking event as real-time", this.j.k().a(v6_17.b));
                                                                    boolean v10_15 = ((com.google.android.gms.internal.measurement.db[]) java.util.Arrays.copyOf(v6_17.a, (v6_17.a.length + 1)));
                                                                    int v11_23 = new com.google.android.gms.internal.measurement.db();
                                                                    v11_23.a = "_r";
                                                                    v11_23.c = Long.valueOf(1);
                                                                    v10_15[(v10_15.length - 1)] = v11_23;
                                                                    v6_17.a = v10_15;
                                                                }
                                                                Long v12_42;
                                                                if (this.d().a(this.x(), v2_1.a.o, 0, 0, 0, 0, 1).e <= ((long) this.j.b().a(v2_1.a.o))) {
                                                                    v26_1 = v3_9;
                                                                    v12_42 = 1;
                                                                } else {
                                                                    boolean v10_21 = 0;
                                                                    while (v10_21 < v6_17.a.length) {
                                                                        if (!"_r".equals(v6_17.a[v10_21].a)) {
                                                                            v10_21++;
                                                                        } else {
                                                                            int v11_31 = new com.google.android.gms.internal.measurement.db[(v6_17.a.length - 1)];
                                                                            if (v10_21) {
                                                                                System.arraycopy(v6_17.a, 0, v11_31, 0, v10_21);
                                                                            }
                                                                            if (v10_21 >= v11_31.length) {
                                                                                v26_1 = v3_9;
                                                                            } else {
                                                                                v26_1 = v3_9;
                                                                                System.arraycopy(v6_17.a, (v10_21 + 1), v11_31, v10_21, (v11_31.length - v10_21));
                                                                            }
                                                                            v6_17.a = v11_31;
                                                                        }
                                                                        v12_42 = v21_0;
                                                                    }
                                                                    v26_1 = v3_9;
                                                                }
                                                                if ((!com.google.android.gms.measurement.internal.es.a(v6_17.b)) || (v7_22 == 0)) {
                                                                    v18_0 = v12_42;
                                                                    v29_0 = v14_12;
                                                                } else {
                                                                    v18_0 = v12_42;
                                                                    if (this.d().a(this.x(), v2_1.a.o, 0, 0, 1, 0, 0).c <= ((long) this.j.b().b(v2_1.a.o, com.google.android.gms.measurement.internal.h.v))) {
                                                                        v29_0 = v14_12;
                                                                    } else {
                                                                        this.j.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                        com.google.android.gms.measurement.internal.d v3_25 = v6_17.a;
                                                                        boolean v10_25 = v3_25.length;
                                                                        int v11_35 = 0;
                                                                        Long v12_52 = 0;
                                                                        int v13_23 = 0;
                                                                        while (v11_35 < v10_25) {
                                                                            boolean v10_44 = v3_25[v11_35];
                                                                            if (!"_c".equals(v10_44.a)) {
                                                                                if ("_err".equals(v10_44.a)) {
                                                                                    v12_52 = 1;
                                                                                }
                                                                            } else {
                                                                                v13_23 = v10_44;
                                                                            }
                                                                            v11_35++;
                                                                        }
                                                                        v29_0 = v14_12;
                                                                        if ((v12_52 == null) || (v13_23 == 0)) {
                                                                            if (v13_23 == 0) {
                                                                                this.j.r().c_().a("Did not find conversion parameter. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                            } else {
                                                                                v13_23.a = "_err";
                                                                                v13_23.c = Long.valueOf(10);
                                                                            }
                                                                        } else {
                                                                            com.google.android.gms.measurement.internal.d v3_31 = v6_17.a;
                                                                            int v11_39 = new com.google.android.gms.internal.measurement.db[1];
                                                                            v11_39[0] = v13_23;
                                                                            v6_17.a = ((com.google.android.gms.internal.measurement.db[]) com.google.android.gms.common.util.b.a(v3_31, v11_39));
                                                                        }
                                                                    }
                                                                }
                                                            } else {
                                                                int v11_5;
                                                                this.g();
                                                                int v11_3 = v6_17.b;
                                                                com.google.android.gms.common.internal.r.a(v11_3);
                                                                Long v12_16 = v11_3.hashCode();
                                                                if (v12_16 == 94660) {
                                                                    if (!v11_3.equals("_in")) {
                                                                        v11_5 = -1;
                                                                    } else {
                                                                        v11_5 = 0;
                                                                    }
                                                                } else {
                                                                    if (v12_16 == 95025) {
                                                                        if (!v11_3.equals("_ug")) {
                                                                        } else {
                                                                            v11_5 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v12_16 == 95027) {
                                                                            if (!v11_3.equals("_ui")) {
                                                                            } else {
                                                                                v11_5 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                int v11_8;
                                                                switch (v11_5) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v11_8 = 1;
                                                                    default:
                                                                        v11_8 = 0;
                                                                }
                                                                if (v11_8 == 0) {
                                                                    v26_1 = v3_9;
                                                                    v29_0 = v14_12;
                                                                    v18_0 = v21_0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((!this.j.b().m(v2_1.a.o)) || (v7_22 == 0)) {
                                                            } else {
                                                                com.google.android.gms.measurement.internal.d v3_37 = v6_17.a;
                                                                int v7_23 = 0;
                                                                boolean v10_32 = -1;
                                                                int v11_40 = -1;
                                                                while (v7_23 < v3_37.length) {
                                                                    if (!"value".equals(v3_37[v7_23].a)) {
                                                                        if ("currency".equals(v3_37[v7_23].a)) {
                                                                            v11_40 = v7_23;
                                                                        }
                                                                    } else {
                                                                        v10_32 = v7_23;
                                                                    }
                                                                    v7_23++;
                                                                }
                                                                if (v10_32 == -1) {
                                                                } else {
                                                                    if ((v3_37[v10_32].c != null) || (v3_37[v10_32].d != null)) {
                                                                        int v7_32;
                                                                        if (v11_40 != -1) {
                                                                            int v7_31 = v3_37[v11_40].b;
                                                                            if (v7_31 == 0) {
                                                                            } else {
                                                                                if (v7_31.length() == 3) {
                                                                                    int v11_43 = 0;
                                                                                    while (v11_43 < v7_31.length()) {
                                                                                        int v13_25 = v7_31.codePointAt(v11_43);
                                                                                        if (Character.isLetter(v13_25)) {
                                                                                            v11_43 += Character.charCount(v13_25);
                                                                                        } else {
                                                                                            v7_32 = 1;
                                                                                            if (v7_32 != 0) {
                                                                                                this.j.r().k().a("Value parameter discarded. You must also supply a 3-letter ISO_4217 currency code in the currency parameter.");
                                                                                                v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 19, "currency");
                                                                                            }
                                                                                            v6_17.a = v3_37;
                                                                                            if (this.j.b().d(v2_1.a.o, com.google.android.gms.measurement.internal.h.an)) {
                                                                                                if (!"_e".equals(v6_17.b)) {
                                                                                                    if ("_vs".equals(v6_17.b)) {
                                                                                                        this.g();
                                                                                                        if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_et") == null) {
                                                                                                            if ((v8_14 == null) || ((Math.abs((v8_14.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v8_14, v6_17)))) {
                                                                                                                v9_7 = v6_17;
                                                                                                            } else {
                                                                                                                v8_14 = 0;
                                                                                                                v9_7 = 0;
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                } else {
                                                                                                    this.g();
                                                                                                    if (com.google.android.gms.measurement.internal.ep.a(v6_17, "_fr") == null) {
                                                                                                        if ((v9_7 == null) || ((Math.abs((v9_7.c.longValue() - v6_17.c.longValue())) > 1000) || (!this.a(v6_17, v9_7)))) {
                                                                                                            v8_14 = v6_17;
                                                                                                        } else {
                                                                                                            v8_14 = 0;
                                                                                                            v9_7 = 0;
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                            if ((v4_7 == null) || ((v5_13 != null) || (!"_e".equals(v6_17.b)))) {
                                                                                                v3_9 = v26_1;
                                                                                            } else {
                                                                                                if (v6_17.a != null) {
                                                                                                    if (v6_17.a.length != 0) {
                                                                                                        this.g();
                                                                                                        com.google.android.gms.measurement.internal.d v3_68 = ((Long) com.google.android.gms.measurement.internal.ep.b(v6_17, "_et"));
                                                                                                        if (v3_68 != null) {
                                                                                                            v29_0 += v3_68.longValue();
                                                                                                            v3_9 = v26_1;
                                                                                                            v13_34 = (v25_1 + 1);
                                                                                                            v3_9.b[v25_1] = v6_17;
                                                                                                            v14_12 = v29_0;
                                                                                                            v10_56 = (v23_2 + 1);
                                                                                                            v12_66 = v18_0;
                                                                                                        } else {
                                                                                                            this.j.r().i().a("Engagement event does not include duration. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                                        }
                                                                                                    } else {
                                                                                                    }
                                                                                                }
                                                                                                this.j.r().i().a("Engagement event does not contain any parameters. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o));
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    v7_32 = 0;
                                                                                } else {
                                                                                }
                                                                            }
                                                                            v7_32 = 1;
                                                                        } else {
                                                                            v7_32 = 1;
                                                                        }
                                                                    } else {
                                                                        this.j.r().k().a("Value must be specified with a numeric type.");
                                                                        v3_37 = ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(ark>com.google.android.gms.measurement.internal.ejark>.a(v3_37, v10_32), "_c"), 18, "value");
                                                                    }
                                                                }
                                                            }
                                                        } else {
                                                            int v7_63;
                                                            v23_2 = v10_56;
                                                            String v25_3 = v13_34;
                                                            this.j.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.measurement.internal.r.a(v2_1.a.o), this.j.k().a(v6_17.b));
                                                            if (this.s().f(v2_1.a.o)) {
                                                                v7_63 = 1;
                                                            } else {
                                                                if (!this.s().g(v2_1.a.o)) {
                                                                    v7_63 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v7_63 == 0) && (!"_err".equals(v6_17.b))) {
                                                                this.j.j().a(v2_1.a.o, 11, "_ev", v6_17.b, 0);
                                                            }
                                                            v18_0 = v21_0;
                                                            v13_34 = v25_3;
                                                        }
                                                    }
                                                    int v13_5;
                                                    boolean v21_4 = v12_66;
                                                    String v25_4 = v13_34;
                                                    long v29_6 = v14_12;
                                                    if (v5_13 == null) {
                                                        v13_5 = v25_4;
                                                    } else {
                                                        v13_5 = v25_4;
                                                        boolean v14_5 = v29_6;
                                                        String v5_0 = 0;
                                                        while (v5_0 < v13_5) {
                                                            long v6_12;
                                                            long v6_9 = v3_9.b[v5_0];
                                                            if (!"_e".equals(v6_9.b)) {
                                                                if (v4_7 != null) {
                                                                    this.g();
                                                                    long v6_10 = com.google.android.gms.measurement.internal.ep.a(v6_9, "_et");
                                                                    if (v6_10 != 0) {
                                                                        long v6_11 = v6_10.c;
                                                                        if ((v6_11 != 0) && (v6_11.longValue() > 0)) {
                                                                            v14_5 += v6_11.longValue();
                                                                            v6_12 = 1;
                                                                            v5_0 += v6_12;
                                                                        }
                                                                    }
                                                                }
                                                                v6_12 = 1;
                                                            } else {
                                                                this.g();
                                                                if (com.google.android.gms.measurement.internal.ep.a(v6_9, "_fr") == null) {
                                                                } else {
                                                                    System.arraycopy(v3_9.b, (v5_0 + 1), v3_9.b, v5_0, ((v13_5 - v5_0) - 1));
                                                                    v13_5--;
                                                                    v5_0--;
                                                                    v6_12 = 1;
                                                                }
                                                            }
                                                        }
                                                        v29_6 = v14_5;
                                                    }
                                                    if (v13_5 < v2_1.c.size()) {
                                                        v3_9.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v3_9.b, v13_5));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_9.o, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.measurement.internal.er;
                                                            v4_12(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf(v29_6));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                String v5_21 = new com.google.android.gms.measurement.internal.er;
                                                                v5_21(v3_9.o, "auto", "_lte", this.j.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v29_6)));
                                                                v4_12 = v5_21;
                                                            } else {
                                                            }
                                                        }
                                                        String v5_24 = new com.google.android.gms.internal.measurement.dg();
                                                        v5_24.b = "_lte";
                                                        v5_24.a = Long.valueOf(this.j.m().a());
                                                        v5_24.d = ((Long) v4_12.e);
                                                        long v6_48 = 0;
                                                        while (v6_48 < v3_9.c.length) {
                                                            if (!"_lte".equals(v3_9.c[v6_48].b)) {
                                                                v6_48++;
                                                            } else {
                                                                v3_9.c[v6_48] = v5_24;
                                                                long v6_49 = 1;
                                                            }
                                                            String v5_25;
                                                            if (v6_49 != 0) {
                                                                v5_25 = 0;
                                                            } else {
                                                                v3_9.c = ((com.google.android.gms.internal.measurement.dg[]) java.util.Arrays.copyOf(v3_9.c, (v3_9.c.length + 1)));
                                                                v3_9.c[(v2_1.a.c.length - 1)] = v5_24;
                                                                v5_25 = 0;
                                                            }
                                                            if (v29_6 > v5_25) {
                                                                this.d().a(v4_12);
                                                                this.j.r().w().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_49 = 0;
                                                    }
                                                    Object v9_9;
                                                    String v1_7;
                                                    Object v4_14 = v3_9.o;
                                                    String v5_30 = v3_9.c;
                                                    long v6_55 = v3_9.b;
                                                    com.google.android.gms.common.internal.r.a(v4_14);
                                                    v3_9.A = this.e().a(v4_14, v6_55, v5_30);
                                                    try {
                                                        if (!this.j.b().d(v2_1.a.o)) {
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                        } else {
                                                            Object v4_20 = new java.util.HashMap();
                                                            String v5_35 = new com.google.android.gms.internal.measurement.da[v3_9.b.length];
                                                            long v6_7 = this.j.j().h();
                                                            int v7_10 = v3_9.b;
                                                            Boolean v8_10 = v7_10.length;
                                                            Object v9_3 = 0;
                                                            boolean v10_0 = 0;
                                                            while (v9_3 < v8_10) {
                                                                Object v9_1;
                                                                long v27_0;
                                                                int v26_0;
                                                                String v23_0;
                                                                String v25_0;
                                                                int v11_54 = v7_10[v9_3];
                                                                if (!v11_54.b.equals("_ep")) {
                                                                    long v28_1;
                                                                    com.google.android.gms.measurement.internal.d v3_122;
                                                                    Long v12_81 = this.s().e(v2_1.a.o);
                                                                    v1_0.j.j();
                                                                    boolean v14_21 = com.google.android.gms.measurement.internal.es.a(v11_54.c.longValue(), v12_81);
                                                                    v23_0 = v7_10;
                                                                    v25_0 = v8_10;
                                                                    Boolean v8_22 = Long.valueOf(1);
                                                                    if ((!android.text.TextUtils.isEmpty("_dbg")) && (v8_22 != null)) {
                                                                        v26_0 = v3_9;
                                                                        com.google.android.gms.measurement.internal.d v3_121 = v11_54.a;
                                                                        v27_0 = v9_3;
                                                                        Object v9_10 = v3_121.length;
                                                                        v28_1 = v12_81;
                                                                        Long v12_82 = 0;
                                                                        while (v12_82 < v9_10) {
                                                                            int v13_57 = v3_121[v12_82];
                                                                            if (!"_dbg".equals(v13_57.a)) {
                                                                                v12_82++;
                                                                            } else {
                                                                                if (((!(v8_22 instanceof Long)) || (!v8_22.equals(v13_57.c))) && (((!(v8_22 instanceof String)) || (!v8_22.equals(v13_57.b))) && ((!(v8_22 instanceof Double)) || (!v8_22.equals(v13_57.d))))) {
                                                                                    v3_122 = 0;
                                                                                } else {
                                                                                    v3_122 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                        v3_122 = 0;
                                                                    } else {
                                                                        v26_0 = v3_9;
                                                                        v27_0 = v9_3;
                                                                        v28_1 = v12_81;
                                                                        v3_122 = 0;
                                                                    }
                                                                    Long v12_83;
                                                                    if (v3_122 != null) {
                                                                        v12_83 = 1;
                                                                    } else {
                                                                        v12_83 = this.s().d(v2_1.a.o, v11_54.b);
                                                                    }
                                                                    if (v12_83 > null) {
                                                                        com.google.android.gms.measurement.internal.d v3_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v11_54.b));
                                                                        if (v3_1 == null) {
                                                                            v3_1 = this.d().a(v2_1.a.o, v11_54.b);
                                                                            if (v3_1 == null) {
                                                                                v1_0.j.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_1.a.o, v11_54.b);
                                                                                v3_1 = new com.google.android.gms.measurement.internal.d;
                                                                                v3_1(v2_1.a.o, v11_54.b, 1, 1, v11_54.c.longValue(), 0, 0, 0, 0, 0);
                                                                            }
                                                                        }
                                                                        Boolean v8_28;
                                                                        this.g();
                                                                        int v7_123 = ((Long) com.google.android.gms.measurement.internal.ep.b(v11_54, "_eid"));
                                                                        if (v7_123 == 0) {
                                                                            v8_28 = 0;
                                                                        } else {
                                                                            v8_28 = 1;
                                                                        }
                                                                        Boolean v8_29 = Boolean.valueOf(v8_28);
                                                                        if (v12_83 != 1) {
                                                                            if (v6_7.nextInt(v12_83) != 0) {
                                                                                p46 = v6_7;
                                                                                int v13_58;
                                                                                String v1_20;
                                                                                if (!v1_0.j.b().o(v2_1.a.o)) {
                                                                                    v9_1 = v2_1;
                                                                                    v13_58 = v7_123;
                                                                                    if (Math.abs((v11_54.c.longValue() - v3_1.f)) < 86400000) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                } else {
                                                                                    long v28_2;
                                                                                    if (v3_1.g == null) {
                                                                                        v1_0.j.j();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                        v28_2 = com.google.android.gms.measurement.internal.es.a(v11_54.d.longValue(), v28_1);
                                                                                    } else {
                                                                                        v28_2 = v3_1.g.longValue();
                                                                                        v9_1 = v2_1;
                                                                                        v13_58 = v7_123;
                                                                                    }
                                                                                    if (v28_2 == v14_21) {
                                                                                        v1_20 = 0;
                                                                                    } else {
                                                                                        v1_20 = 1;
                                                                                    }
                                                                                }
                                                                                if (v1_20 == null) {
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v4_20.put(v11_54.b, v3_1.a(v13_58, 0, 0));
                                                                                    }
                                                                                } else {
                                                                                    this.g();
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                                    this.g();
                                                                                    long v6_89 = ((long) v12_83);
                                                                                    v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v6_89));
                                                                                    String v1_29 = (v10_0 + 1);
                                                                                    v5_35[v10_0] = v11_54;
                                                                                    if (v8_29.booleanValue()) {
                                                                                        v3_1 = v3_1.a(0, Long.valueOf(v6_89), Boolean.valueOf(1));
                                                                                    }
                                                                                    v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                    v10_0 = v1_29;
                                                                                }
                                                                            } else {
                                                                                this.g();
                                                                                Long v12_0 = ((long) v12_83);
                                                                                p46 = v6_7;
                                                                                v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", Long.valueOf(v12_0));
                                                                                long v6_6 = (v10_0 + 1);
                                                                                v5_35[v10_0] = v11_54;
                                                                                if (v8_29.booleanValue()) {
                                                                                    v3_1 = v3_1.a(0, Long.valueOf(v12_0), 0);
                                                                                }
                                                                                v4_20.put(v11_54.b, v3_1.a(v11_54.c.longValue(), v14_21));
                                                                                v9_1 = v2_1;
                                                                                v10_0 = v6_6;
                                                                            }
                                                                        } else {
                                                                            int v7_6 = (v10_0 + 1);
                                                                            v5_35[v10_0] = v11_54;
                                                                            if ((v8_29.booleanValue()) && ((v3_1.h != null) || ((v3_1.i != null) || (v3_1.j != null)))) {
                                                                                v4_20.put(v11_54.b, v3_1.a(0, 0, 0));
                                                                            }
                                                                            v9_1 = v2_1;
                                                                            p46 = v6_7;
                                                                            v10_0 = v7_6;
                                                                        }
                                                                    } else {
                                                                        v1_0.j.r().i().a("Sample rate must be positive. event, rate", v11_54.b, Integer.valueOf(v12_83));
                                                                        com.google.android.gms.measurement.internal.d v3_8 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v9_1 = v2_1;
                                                                        v10_0 = v3_8;
                                                                        p46 = v6_7;
                                                                    }
                                                                } else {
                                                                    this.g();
                                                                    Long v12_3 = ((String) com.google.android.gms.measurement.internal.ep.b(v11_54, "_en"));
                                                                    int v13_1 = ((com.google.android.gms.measurement.internal.d) v4_20.get(v12_3));
                                                                    if (v13_1 == 0) {
                                                                        v13_1 = this.d().a(v2_1.a.o, v12_3);
                                                                        v4_20.put(v12_3, v13_1);
                                                                    }
                                                                    if (v13_1.h != null) {
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v9_1 = v2_1;
                                                                    } else {
                                                                        if (v13_1.i.longValue() > 1) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_sr", v13_1.i);
                                                                        }
                                                                        if ((v13_1.j != null) && (v13_1.j.booleanValue())) {
                                                                            this.g();
                                                                            v11_54.a = com.google.android.gms.measurement.internal.ep.a(v11_54.a, "_efs", Long.valueOf(1));
                                                                        }
                                                                        Long v12_14 = (v10_0 + 1);
                                                                        v5_35[v10_0] = v11_54;
                                                                        v26_0 = v3_9;
                                                                        p46 = v6_7;
                                                                        v23_0 = v7_10;
                                                                        v25_0 = v8_10;
                                                                        v27_0 = v9_3;
                                                                        v10_0 = v12_14;
                                                                        v9_1 = v2_1;
                                                                    }
                                                                }
                                                                v6_7 = p46;
                                                                v2_1 = v9_1;
                                                                v7_10 = v23_0;
                                                                v8_10 = v25_0;
                                                                v3_9 = v26_0;
                                                                v9_3 = (v27_0 + 1);
                                                                v1_0 = this;
                                                            }
                                                            v9_9 = v2_1;
                                                            v1_7 = v3_9;
                                                            if (v10_0 < v1_7.b.length) {
                                                                v1_7.b = ((com.google.android.gms.internal.measurement.da[]) java.util.Arrays.copyOf(v5_35, v10_0));
                                                            }
                                                            int v2_10 = v4_20.entrySet().iterator();
                                                            while (v2_10.hasNext()) {
                                                                this.d().a(((com.google.android.gms.measurement.internal.d) ((java.util.Map$Entry) v2_10.next()).getValue()));
                                                            }
                                                        }
                                                        try {
                                                            v1_7.e = Long.valueOf(nan);
                                                            v1_7.f = Long.valueOf(-0.0);
                                                            int v2_15 = 0;
                                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                                            String v1_2 = v0_4;
                                                            this.d().x();
                                                            throw v1_2;
                                                        }
                                                        while (v2_15 < v1_7.b.length) {
                                                            com.google.android.gms.measurement.internal.d v3_115 = v1_7.b[v2_15];
                                                            if (v3_115.c.longValue() < v1_7.e.longValue()) {
                                                                v1_7.e = v3_115.c;
                                                            }
                                                            if (v3_115.c.longValue() > v1_7.f.longValue()) {
                                                                v1_7.f = v3_115.c;
                                                            }
                                                            v2_15++;
                                                        }
                                                        Object v4_21;
                                                        int v2_17 = v9_9.a.o;
                                                        com.google.android.gms.measurement.internal.d v3_91 = this.d().b(v2_17);
                                                        if (v3_91 != null) {
                                                            v4_21 = this;
                                                            if (v1_7.b.length > 0) {
                                                                int v7_99;
                                                                String v5_38 = v3_91.i();
                                                                if (v5_38 == 0) {
                                                                    v7_99 = 0;
                                                                } else {
                                                                    v7_99 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.h = v7_99;
                                                                int v7_100 = v3_91.h();
                                                                if (v7_100 != 0) {
                                                                    v5_38 = v7_100;
                                                                } else {
                                                                }
                                                                String v5_39;
                                                                if (v5_38 == 0) {
                                                                    v5_39 = 0;
                                                                } else {
                                                                    v5_39 = Long.valueOf(v5_38);
                                                                }
                                                                v1_7.g = v5_39;
                                                                v3_91.s();
                                                                v1_7.w = Integer.valueOf(((int) v3_91.p()));
                                                                v3_91.a(v1_7.e.longValue());
                                                                v3_91.b(v1_7.f.longValue());
                                                                v1_7.x = v3_91.A();
                                                                this.d().a(v3_91);
                                                            }
                                                        } else {
                                                            v4_21 = this;
                                                            this.j.r().c_().a("Bundling raw events w/o app info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                        }
                                                        if (v1_7.b.length > 0) {
                                                            v4_21.j.u();
                                                            com.google.android.gms.measurement.internal.d v3_99 = this.s().a(v9_9.a.o);
                                                            if (v3_99 == null) {
                                                                if (!android.text.TextUtils.isEmpty(v9_9.a.y)) {
                                                                    v4_21.j.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.measurement.internal.r.a(v9_9.a.o));
                                                                } else {
                                                                    v1_7.E = Long.valueOf(-1);
                                                                }
                                                            } else {
                                                                if (v3_99.a != null) {
                                                                    v1_7.E = v3_99.a;
                                                                } else {
                                                                }
                                                            }
                                                            this.d().a(v1_7, v21_4);
                                                        }
                                                        String v1_8 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_109 = v9_9.b;
                                                        com.google.android.gms.common.internal.r.a(v3_109);
                                                        v1_8.d();
                                                        v1_8.k();
                                                        String v5_56 = new StringBuilder("rowid in (");
                                                        long v6_65 = 0;
                                                        while (v6_65 < v3_109.size()) {
                                                            if (v6_65 != 0) {
                                                                v5_56.append(",");
                                                            }
                                                            v5_56.append(((Long) v3_109.get(v6_65)).longValue());
                                                            v6_65++;
                                                        }
                                                        v5_56.append(")");
                                                        String v5_58 = v1_8.y().delete("raw_events", v5_56.toString(), 0);
                                                        if (v5_58 != v3_109.size()) {
                                                            v1_8.r().c_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_58), Integer.valueOf(v3_109.size()));
                                                        }
                                                        String v1_11 = this.d();
                                                        com.google.android.gms.measurement.internal.d v3_112 = v1_11.y();
                                                        try {
                                                            long v6_71 = new String[2];
                                                            v6_71[0] = v2_17;
                                                            v6_71[1] = v2_17;
                                                            v3_112.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_71);
                                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                                            v1_11.r().c_().a("Failed to remove unused event metadata. appId", com.google.android.gms.measurement.internal.r.a(v2_17), v0_7);
                                                        }
                                                        this.d().w();
                                                        this.d().x();
                                                        return 1;
                                                    } catch (android.database.sqlite.SQLiteException v0_2) {
                                                        v1_2 = v0_2;
                                                    }
                                                }
                                            } else {
                                                v6_3.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            com.google.android.gms.measurement.internal.d v3_0 = v0_1;
                                            try {
                                                v4_30.r().c_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.measurement.internal.r.a(v7_2), v3_0);
                                            } catch (android.database.sqlite.SQLiteException v0_6) {
                                                String v1_3 = v0_6;
                                                int v22 = v6_3;
                                                if (v22 != 0) {
                                                    v22.close();
                                                }
                                                throw v1_3;
                                            }
                                            if (v6_3 == 0) {
                                            } else {
                                                v6_3.close();
                                            }
                                        }
                                        if (v15_2.moveToNext()) {
                                            v4_30.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        }
                                        String[] v17_2;
                                        String v16_2;
                                        v15_2.close();
                                        v2_1.a(v14_10);
                                        if (v5_62 == -1) {
                                            boolean v10_59 = new String[2];
                                            v10_59[0] = v3_10;
                                            v10_59[1] = v7_2;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_2 = v10_59;
                                        } else {
                                            int v13_44 = new String[3];
                                            v13_44[0] = v3_10;
                                            v13_44[1] = v7_2;
                                            v13_44[2] = String.valueOf(v5_62);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_2 = v13_44;
                                        }
                                        v6_3 = v15_2;
                                        String v5_6 = v25_2.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v16_2, v17_2, 0, 0, "rowid", 0);
                                        try {
                                            if (!v5_6.moveToFirst()) {
                                                v4_30.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_0) {
                                            v22 = v5_6;
                                            v1_3 = v0_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            v7_2 = v3_10;
                                            v6_3 = v5_6;
                                        }
                                        do {
                                            long v6_24 = v5_6.getLong(0);
                                            Long v12_70 = v5_6.getBlob(3);
                                            boolean v10_64 = com.google.android.gms.internal.measurement.iv.a(v12_70, 0, v12_70.length);
                                            Long v12_72 = new com.google.android.gms.internal.measurement.da();
                                            v12_72.a(v10_64);
                                            v12_72.b = v5_6.getString(1);
                                            v12_72.c = Long.valueOf(v5_6.getLong(2));
                                            if (v2_1.a(v6_24, v12_72)) {
                                            } else {
                                                if (v5_6 == null) {
                                                } else {
                                                    v5_6.close();
                                                }
                                            }
                                        } while(v5_6.moveToNext());
                                        if (v5_6 == null) {
                                        } else {
                                            v5_6.close();
                                        }
                                    } else {
                                        v4_30.r().c_().a("Raw event metadata record is missing. appId", com.google.android.gms.measurement.internal.r.a(v3_10));
                                        if (v15_2 == null) {
                                        } else {
                                            v15_2.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v6_3 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_0) {
                                    v22 = v15_2;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v7_2 = v3_10;
                                    v6_3 = v15_2;
                                }
                                v22 = v6_3;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v22 = v23_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v7_2 = v3_10;
                                v6_3 = v23_1;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    } else {
                        boolean v14_17;
                        int v13_52 = v5_62 cmp -1;
                        try {
                            if (v13_52 == 0) {
                                v14_17 = new String[1];
                                v14_17[0] = String.valueOf(p47);
                            } else {
                                v14_17 = new String[2];
                                v14_17[0] = String.valueOf(v5_62);
                                v14_17[1] = String.valueOf(p47);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v6_3 = 0;
                            v7_2 = 0;
                        }
                        int v13_53;
                        if (v13_52 == 0) {
                            v13_53 = "";
                        } else {
                            v13_53 = "rowid <= ? and ";
                        }
                        com.google.android.gms.measurement.internal.d v3_142 = new StringBuilder((String.valueOf(v13_53).length() + 148));
                        v3_142.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_142.append(v13_53);
                        v3_142.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_10 = v15_3.rawQuery(v3_142.toString(), v14_17);
                        if (v3_10.moveToFirst()) {
                            int v7_9 = v3_10.getString(0);
                            try {
                                int v13_4 = v3_10.getString(1);
                                v3_10.close();
                                v23_1 = v3_10;
                                v3_10 = v7_9;
                                v7_2 = v13_4;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v6_3 = v3_10;
                            }
                        } else {
                            if (v3_10 == null) {
                            } else {
                                v3_10.close();
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_0) {
                    v22 = v3_10;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v6_3 = v3_10;
                    v7_2 = 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v22 = 0;
            } catch (android.database.sqlite.SQLiteException v0_8) {
                v3_0 = v0_8;
                v6_3 = 0;
                v7_2 = 0;
            } catch (android.database.sqlite.SQLiteException v0_4) {
            }
        } catch (android.database.sqlite.SQLiteException v0_4) {
        }
    }

Method com.baidu.android.pushservice.c.c.h() calling method android.database.sqlite.SQLiteDatabase.delete()


    private static com.baidu.android.pushservice.c.c$c h(android.content.Context p8)
    {
        if (com.baidu.android.pushservice.c.c.a == null) {
            String v2_10 = new StringBuilder();
            v2_10.append(android.os.Environment.getDataDirectory().getAbsolutePath());
            v2_10.append("/data");
            v2_10.append(java.io.File.separator);
            v2_10.append(p8.getPackageName());
            v2_10.append("/database");
            Throwable v1_1 = new java.io.File(v2_10.toString());
            if (!v1_1.exists()) {
                v1_1.mkdirs();
            }
            String v2_3 = new StringBuilder();
            v2_3.append(v1_1.getAbsolutePath());
            v2_3.append(java.io.File.separator);
            v2_3.append("pushinfo.db");
            Throwable v1_6 = v2_3.toString();
            if (android.os.Build$VERSION.SDK_INT < 11) {
                com.baidu.android.pushservice.c.c.a = new com.baidu.android.pushservice.c.c$c(p8, v1_6, 0, 5);
            } else {
                com.baidu.android.pushservice.c.c.a = new com.baidu.android.pushservice.c.c$c(p8, v1_6, 5, new com.baidu.android.pushservice.c.c$b(0));
            }
            int v8_2 = com.baidu.android.pushservice.c.c.a.getWritableDatabase();
            Throwable v1_9 = new StringBuilder();
            v1_9.append(com.baidu.android.pushservice.c.c$d.e.name());
            v1_9.append(" < ");
            v1_9.append((System.currentTimeMillis() - 259200000));
            v8_2.delete("PushMsgInfos", v1_9.toString(), 0);
            if (v8_2 != 0) {
                v8_2.close();
            }
        }
        return com.baidu.android.pushservice.c.c.a;
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public static declared_synchronized boolean a(android.content.Context p12, com.baidu.android.pushservice.c.e p13)
    {
        try {
        } catch (long v12_4) {
            throw v12_4;
        }
        long v12_1 = ark>com.baidu.android.pushservice.c.cark>.a(p12);
        int v2_0 = 0;
        if (v12_1 != 0) {
            String v3_5 = new android.content.ContentValues();
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.b.name(), p13.a);
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.c.name(), p13.b);
            v3_5.put(ark>com.baidu.android.pushservice.c.cark>$f.d.name(), p13.d);
            int v4_6 = ark>com.baidu.android.pushservice.c.cark>$f.e.name();
            long v5_4 = new StringBuilder();
            v5_4.append(System.currentTimeMillis());
            v5_4.append("");
            v3_5.put(v4_6, v5_4.toString());
            android.database.Cursor v7 = 0;
            long v8_1 = v12_1.insert("PushVerifInfo", 0, v3_5);
            v7 = v12_1.rawQuery("SELECT COUNT(*) FROM PushVerifInfo;", 0);
            if ((v7.moveToFirst()) && (v7.getInt(0) > 200)) {
                String[] v11 = new String[1];
                v11[0] = p13.a;
                v12_1.delete("PushVerifInfo", " msgId IS NOT ?", v11);
            }
            if ((v7 == null) || (v7.isClosed())) {
                v12_1.close();
                if (v8_1 != -1) {
                    v2_0 = 1;
                }
                return v2_0;
            } else {
                v7.close();
            }
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.c.c.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public static declared_synchronized void a(android.content.Context p8, java.util.List p9)
    {
        try {
        } catch (Throwable v8_3) {
            throw v8_3;
        }
        Throwable v8_1 = ark>com.baidu.android.pushservice.c.cark>.a(p8);
        if (v8_1 != null) {
            v8_1.beginTransaction();
            v8_1.delete("PushAppStatus", 0, 0);
            Throwable v9_1 = p9.iterator();
            while (v9_1.hasNext()) {
                String v2_2 = ((com.baidu.android.pushservice.g.g) v9_1.next());
                android.content.ContentValues v4_1 = new android.content.ContentValues();
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.b.name(), v2_2.d);
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.e.name(), v2_2.j);
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.c.name(), Long.valueOf(v2_2.e));
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.f.name(), Integer.valueOf(v2_2.b));
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.g.name(), v2_2.a);
                v4_1.put(ark>com.baidu.android.pushservice.c.cark>$a.h.name(), Integer.valueOf(v2_2.c));
                v8_1.insert("PushAppStatus", 0, v4_1);
            }
            v8_1.setTransactionSuccessful();
            v8_1.endTransaction();
            v8_1.close();
            return;
        } else {
            return;
        }
    }

Method com.baidu.android.pushservice.c.a.e() calling method android.database.sqlite.SQLiteDatabase.delete()


    public static boolean e(android.content.Context p16, String p17)
    {
        try {
            android.database.sqlite.SQLiteDatabase v10 = com.baidu.android.pushservice.c.a.e(p16);
        } catch (boolean v0_2) {
            throw v0_2;
        }
        if (v10 != null) {
            android.database.Cursor v12 = 0;
            try {
                android.content.ContentValues v14_1 = new android.content.ContentValues();
                v14_1.clear();
                v14_1.put(com.baidu.android.pushservice.c.a$h.b.name(), p17);
                v14_1.put(com.baidu.android.pushservice.c.a$h.c.name(), Long.valueOf(System.currentTimeMillis()));
                boolean v2_5 = new StringBuilder();
                v2_5.append(com.baidu.android.pushservice.c.a$h.b.name());
                v2_5.append(" =? ");
                String v15 = v2_5.toString();
                String[] v4_1 = new String[1];
                v4_1[0] = com.baidu.android.pushservice.c.a$h.b.name();
                String[] v6 = new String[1];
                v6[0] = p17;
                boolean v2_9 = v10.query("MsgArriveApp", v4_1, v15, v6, 0, 0, 0);
                try {
                    if ((!v2_9) || (v2_9.getCount() <= 0)) {
                        v2_9 = v10.rawQuery("SELECT COUNT(*) FROM MsgArriveApp;", 0);
                        v2_9.moveToFirst();
                        if (v2_9.getInt(0) > com.baidu.android.pushservice.c.a.c) {
                            v10.delete("MsgArriveApp", 0, 0);
                        }
                        v10.insert("MsgArriveApp", 0, v14_1);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 1;
                    } else {
                        String[] v4_0 = new String[1];
                        v4_0[0] = p17;
                        v10.update("MsgArriveApp", v14_1, v15, v4_0);
                        if ((v2_9) && (!v2_9.isClosed())) {
                            v2_9.close();
                        }
                        v10.close();
                        return 0;
                    }
                } catch (boolean v0_7) {
                    v12 = v2_9;
                    if (v12 != null) {
                        if (!v12.isClosed()) {
                            v12.close();
                        }
                    }
                    v10.close();
                    throw v0_7;
                } catch (Exception) {
                    v12 = v2_9;
                    if (!com.baidu.android.pushservice.a.d(p16)) {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 1;
                    } else {
                        if (v12 != null) {
                            if (!v12.isClosed()) {
                                v12.close();
                            }
                        }
                        v10.close();
                        return 0;
                    }
                }
            } catch (boolean v0_7) {
            }
        } else {
            return 1;
        }
    }

Method com.baidu.android.pushservice.c.a.d() calling method android.database.sqlite.SQLiteDatabase.delete()


    public static void d(android.content.Context p10, String p11)
    {
        try {
            Throwable v10_1 = com.baidu.android.pushservice.c.a.e(p10);
        } catch (Throwable v10_2) {
            throw v10_2;
        }
        if (v10_1 != null) {
            String v1_3 = new StringBuilder();
            v1_3.append(com.baidu.android.pushservice.c.a$a.b.name());
            v1_3.append(" = ");
            v1_3.append(p11);
            v1_3.append(";");
            android.database.Cursor v9 = v10_1.query("AlarmMsgInfo", 0, v1_3.toString(), 0, 0, 0, 0);
            if (v9 != null) {
                String v2_4 = new StringBuilder();
                v2_4.append(com.baidu.android.pushservice.c.a$a.b.name());
                v2_4.append("= ?");
                String v2_5 = v2_4.toString();
                String[] v3_5 = new String[1];
                v3_5[0] = p11;
                v10_1.delete("AlarmMsgInfo", v2_5, v3_5);
            } else {
            }
            if