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.db.framework.FrameworkSQLiteDatabase$2.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.bB.a(new android.arch.persistence.db.framework.FrameworkSQLiteProgram(p5));
        return new android.database.sqlite.SQLiteCursor(p3, p4, p5);
    }

Method android.arch.persistence.db.framework.FrameworkSQLiteDatabase$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.bB.a(new android.arch.persistence.db.framework.FrameworkSQLiteProgram(p5));
        return new android.database.sqlite.SQLiteCursor(p3, p4, p5);
    }

Method com.adobe.mobile.AnalyticsWorker.a() calling method android.database.sqlite.SQLiteDatabase.update()


    protected void a(com.adobe.mobile.AbstractHitDatabase$Hit p9)
    {
        try {
            String v3_3 = new android.content.ContentValues();
            v3_3.put("URL", p9.kw);
            android.database.sqlite.SQLiteDatabase v4_1 = this.kf;
            int v6_1 = new StringBuilder();
            v6_1.append("id=");
            v6_1.append(p9.identifier);
            v4_1.update("HITS", v3_3, v6_1.toString(), 0);
        } catch (String v9_7) {
            throw v9_7;
        } catch (String v9_3) {
            Object[] v2_1 = new Object[1];
            v2_1[0] = v9_3.getMessage();
            com.adobe.mobile.StaticMethods.b("Analytics - Unknown error updating url in database (%s)", v2_1);
        }
        return;
    }

Method android.arch.persistence.db.framework.FrameworkSQLiteDatabase.query() calling method android.database.sqlite.SQLiteDatabase.rawQueryWithFactory()


    public android.database.Cursor query(android.arch.persistence.db.SupportSQLiteQuery p5)
    {
        return this.bA.rawQueryWithFactory(new android.arch.persistence.db.framework.FrameworkSQLiteDatabase$1(this, p5), p5.E(), android.arch.persistence.db.framework.FrameworkSQLiteDatabase.EMPTY_STRING_ARRAY, 0);
    }

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


    public android.database.Cursor a(android.arch.persistence.db.SupportSQLiteQuery p7, android.os.CancellationSignal p8)
    {
        return this.bA.rawQueryWithFactory(new ark>android.arch.persistence.db.framework.FrameworkSQLiteDatabaseark>$2(this, p7), p7.E(), ark>android.arch.persistence.db.framework.FrameworkSQLiteDatabaseark>.EMPTY_STRING_ARRAY, 0, p8);
    }

Method com.adobe.mobile.AnalyticsTrackTimedAction.an() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected boolean an(String p8)
    {
        if ((p8 != null) && (p8.trim().length() != 0)) {
            try {
                if (this.kf != null) {
                    try {
                        int v4_2;
                        int v4_0 = this.kf;
                        String v5_0 = this.lH;
                        String v6_0 = new String[1];
                        v6_0[0] = p8;
                        Exception v8_1 = v4_0.rawQuery(v5_0, v6_0);
                    } catch (Exception v8_2) {
                        v4_2 = 0;
                        Object[] v3_1 = new Object[2];
                        v3_1[0] = this.kk;
                        v3_1[1] = v8_2.getMessage();
                        com.adobe.mobile.StaticMethods.b("%s - Unknown error checking for timed action (%s)", v3_1);
                        return v4_2;
                    }
                    if ((!v8_1.moveToFirst()) || (v8_1.getInt(0) <= 0)) {
                        v4_2 = 0;
                    } else {
                        v4_2 = 1;
                    }
                    try {
                        v8_1.close();
                    } catch (Exception v8_3) {
                        Object[] v3_2 = new Object[2];
                        v3_2[0] = this.kk;
                        v3_2[1] = v8_3.getMessage();
                        com.adobe.mobile.StaticMethods.b("%s - Unable to query timed actions database (%s)", v3_2);
                    } catch (Exception v8_2) {
                    }
                    return v4_2;
                } else {
                    return 0;
                }
            } catch (Exception v8_6) {
                throw v8_6;
            }
        } else {
            Object[] v0_1 = new Object[1];
            v0_1[0] = this.kk;
            com.adobe.mobile.StaticMethods.c("%s - Unable to verify the existence of timed action (timed action name was null or empty)", v0_1);
            return 0;
        }
    }

Method com.adobe.mobile.AnalyticsTrackTimedAction.g() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private void g(String p13, java.util.Map p14)
    {
        if ((p13 != null) && (p13.trim().length() != 0)) {
            if ((p14 != null) && (!p14.isEmpty())) {
                if (this.kf != null) {
                    android.database.sqlite.SQLiteStatement v3_5 = this.kf;
                    int v4_0 = this.lF;
                    android.database.Cursor v5_0 = new String[1];
                    v5_0[0] = p13;
                    android.database.sqlite.SQLiteStatement v3_6 = v3_5.rawQuery(v4_0, v5_0);
                    if (!v3_6.moveToFirst()) {
                        v3_6.close();
                        android.database.sqlite.SQLiteStatement v3_7 = new Object[1];
                        v3_7[0] = p13;
                        com.adobe.mobile.StaticMethods.c("Analytics - Unable to save context data (no timed action was found matching the name %s)", v3_7);
                        return;
                    } else {
                        int v4_2 = v3_6.getInt(0);
                        v3_6.close();
                        String v14_8 = p14.entrySet().iterator();
                        while (v14_8.hasNext()) {
                            android.database.sqlite.SQLiteStatement v3_10 = ((java.util.Map$Entry) v14_8.next());
                            android.database.Cursor v5_2 = ((String) v3_10.getKey());
                            Object[] v6_2 = v3_10.getValue();
                            if (v5_2 != null) {
                                if (v5_2.length() > 0) {
                                    Object[] v6_3;
                                    android.database.Cursor v5_4 = this.kf;
                                    android.database.sqlite.SQLiteStatement v7_0 = this.lM;
                                    int v9_0 = new String[2];
                                    v9_0[0] = String.valueOf(v4_2);
                                    v9_0[1] = ((String) v3_10.getKey());
                                    android.database.Cursor v5_5 = v5_4.rawQuery(v7_0, v9_0);
                                    if (v6_2 != null) {
                                        v6_3 = v6_2.toString();
                                    } else {
                                        v6_3 = "";
                                    }
                                    if ((!v5_5.moveToFirst()) || (v5_5.getInt(0) <= 0)) {
                                        this.lI.bindLong(1, ((long) v4_2));
                                        this.lI.bindString(2, ((String) v3_10.getKey()));
                                        this.lI.bindString(3, v6_3);
                                        if (this.lI.executeInsert() == -1) {
                                            Object[] v6_5 = new Object[1];
                                            v6_5[0] = p13;
                                            com.adobe.mobile.StaticMethods.c("Analytics - Unable to insert the timed action\'s context data (%s)", v6_5);
                                        }
                                        this.lI.clearBindings();
                                    } else {
                                        this.lJ.bindString(1, v6_3);
                                        this.lJ.bindLong(2, ((long) v4_2));
                                        this.lJ.bindString(3, ((String) v3_10.getKey()));
                                        this.lJ.execute();
                                        this.lJ.clearBindings();
                                    }
                                    v5_5.close();
                                } else {
                                }
                            }
                        }
                    }
                } else {
                    String v14_1 = new Object[0];
                    com.adobe.mobile.StaticMethods.b("Analytics - Null Database Object, unable to save context data for timed action", v14_1);
                    return;
                }
                return;
            } else {
                String v14_4 = new Object[0];
                com.adobe.mobile.StaticMethods.c("Analytics - Unable to save context data (context data was null or empty)", v14_4);
                return;
            }
        } else {
            String v14_5 = new Object[0];
            com.adobe.mobile.StaticMethods.c("Analytics - Unable to save context data (timed action name was null or empty)", v14_5);
            return;
        }
    }

Method com.adobe.mobile.AnalyticsTrackTimedAction.ao() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private com.adobe.mobile.AnalyticsTimedAction ao(String p13)
    {
        String v0_0 = 0;
        if ((p13 != null) && (p13.trim().length() != 0)) {
            try {
                if (this.kf != null) {
                    try {
                        String v4_0 = this.kf;
                        boolean v5_0 = this.lF;
                        String v6_0 = new String[1];
                        v6_0[0] = p13;
                        Exception v13_1 = v4_0.rawQuery(v5_0, v6_0);
                    } catch (Exception v13_2) {
                        Object[] v3_1 = new Object[1];
                        v3_1[0] = v13_2.getMessage();
                        com.adobe.mobile.StaticMethods.b("Analytics - Unknown error reading from timed actions database (%s)", v3_1);
                        return v0_0;
                    }
                    if (v13_1.moveToFirst()) {
                        String v4_2 = new com.adobe.mobile.AnalyticsTimedAction;
                        v4_2(0, v13_1.getLong(1), v13_1.getLong(2), v13_1.getInt(0));
                        try {
                            String v0_1 = this.kf;
                            boolean v5_3 = this.lK;
                            String v6_2 = new String[1];
                            v6_2[0] = String.valueOf(v4_2.kX);
                            String v0_2 = v0_1.rawQuery(v5_3, v6_2);
                        } catch (Exception v13_3) {
                            v0_0 = v4_2;
                            Object[] v3_2 = new Object[1];
                            v3_2[0] = v13_3.getMessage();
                            com.adobe.mobile.StaticMethods.b("Analytics - Unable to read from timed actions database (%s)", v3_2);
                            this.a(v13_3);
                            return v0_0;
                        } catch (Exception v13_2) {
                            v0_0 = v4_2;
                        }
                        if (v0_2.moveToFirst()) {
                            v4_2.kW = new java.util.HashMap();
                            do {
                                v4_2.kW.put(v0_2.getString(0), v0_2.getString(1));
                            } while(v0_2.moveToNext());
                        }
                        v0_2.close();
                        v0_0 = v4_2;
                    }
                    v13_1.close();
                    return v0_0;
                } else {
                    return 0;
                }
            } catch (Exception v13_5) {
                throw v13_5;
            }
        } else {
            Object[] v1_1 = new Object[0];
            com.adobe.mobile.StaticMethods.c("Analytics - Unable to get timed action (timed action name was null or empty)", v1_1);
            return 0;
        }
    }

Method io.fabric.sdk.android.FabricContext.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.FabricContext.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.adobe.mobile.AbstractDatabaseBacking.dd() calling method android.database.sqlite.SQLiteDatabase.openDatabase()


    private void dd()
    {
        try {
            this.de();
            this.kf = android.database.sqlite.SQLiteDatabase.openDatabase(this.kg.getPath(), 0, 268435472);
            this.kh = com.adobe.mobile.AbstractDatabaseBacking$DatabaseStatus.kl;
        } catch (String v0_1) {
            this.kh = com.adobe.mobile.AbstractDatabaseBacking$DatabaseStatus.km;
            Object[] v2_1 = new Object[2];
            v2_1[0] = this.kk;
            v2_1[1] = v0_1.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to open database (%s).", v2_1);
        }
        return;
    }

Method com.adobe.mobile.AnalyticsTrackTimedAction.cY() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    protected void cY()
    {
        try {
            this.kf.execSQL("CREATE TABLE IF NOT EXISTS TIMEDACTIONS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, STARTTIME INTEGER, ADJSTARTTIME INTEGER)");
            this.kf.execSQL("CREATE TABLE IF NOT EXISTS CONTEXTDATA (ID INTEGER PRIMARY KEY AUTOINCREMENT, ACTIONID INTEGER, KEY TEXT, VALUE TEXT, FOREIGN KEY(ACTIONID) REFERENCES TIMEDACTIONS(ID))");
        } catch (Exception v3_0) {
            Object[] v2_2 = new Object[2];
            v2_2[0] = this.kk;
            v2_2[1] = v3_0.getMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to open or create timed actions database (%s)", v2_2);
        } catch (Exception v3_3) {
            Object[] v2_0 = new Object[2];
            v2_0[0] = this.kk;
            v2_0[1] = v3_3.getMessage();
            com.adobe.mobile.StaticMethods.b("%s - Uknown error creating timed actions database (%s)", v2_0);
        }
        return;
    }

Method com.adobe.mobile.AbstractHitDatabase.cY() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    protected void cY()
    {
        try {
            this.kf.execSQL(this.kq);
        } catch (Exception v3_1) {
            Object[] v2_2 = new Object[2];
            v2_2[0] = this.kk;
            v2_2[1] = v3_1.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to create database due to an invalid path (%s)", v2_2);
        } catch (Exception v3_0) {
            Object[] v2_0 = new Object[2];
            v2_0[0] = this.kk;
            v2_0[1] = v3_0.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to create database due to a sql error (%s)", v2_0);
        } catch (Exception v3_3) {
            Object[] v2_3 = new Object[2];
            v2_3[0] = this.kk;
            v2_3[1] = v3_3.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to create database due to an unexpected error (%s)", v2_3);
        }
        return;
    }

Method android.arch.persistence.db.framework.FrameworkSQLiteDatabase.execSQL() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void execSQL(String p2, Object[] p3)
    {
        this.bA.execSQL(p2, p3);
        return;
    }

Method android.arch.persistence.db.framework.FrameworkSQLiteDatabase.execSQL() calling method android.database.sqlite.SQLiteDatabase.execSQL()


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

Method com.google.android.gms.common.util.DbUtils.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private static varargs void a(android.database.sqlite.SQLiteDatabase p11, String p12, String[] p13)
    {
        if ((!"table".equals(p12)) && ((!"view".equals(p12)) && (!"trigger".equals(p12)))) {
            int v0_3 = 0;
        } else {
            v0_3 = 1;
        }
        com.google.android.gms.common.internal.Preconditions.checkArgument(v0_3);
        String[] v7 = new String[1];
        v7[0] = p12;
        int v0_6 = p11.query("SQLITE_MASTER", new String[] {"name"}), "type == ?", v7, 0, 0, 0);
        Throwable v1_1 = 0;
        try {
            java.util.Set v13_1 = com.google.android.gms.common.util.CollectionUtils.g(p13);
        } catch (Throwable v11_2) {
            if (v0_6 != 0) {
                if (v1_1 == null) {
                    v0_6.close();
                } else {
                    try {
                        v0_6.close();
                    } catch (Throwable v12_1) {
                        com.google.android.gms.internal.stable.zzk.a(v1_1, v12_1);
                    }
                }
            }
            throw v11_2;
        } catch (Throwable v11_1) {
            v1_1 = v11_1;
            throw v1_1;
        }
        while (v0_6.moveToNext()) {
            String v3_2 = v0_6.getString(0);
            if (!v13_1.contains(v3_2)) {
                StringBuilder v5_4 = new StringBuilder(((String.valueOf(p12).length() + 8) + String.valueOf(v3_2).length()));
                v5_4.append("DROP ");
                v5_4.append(p12);
                v5_4.append(" \'");
                v5_4.append(v3_2);
                v5_4.append("\'");
                p11.execSQL(v5_4.toString());
            }
        }
        if (v0_6 != 0) {
            v0_6.close();
        }
        return;
    }

Method com.adobe.mobile.AbstractHitDatabase.dh() calling method android.database.sqlite.SQLiteDatabase.delete()


    protected void dh()
    {
        try {
            this.kf.delete("HITS", 0, 0);
            this.ko = 0;
        } catch (Throwable v1_1) {
            throw v1_1;
        } catch (Exception v4_0) {
            Object[] v3_0 = new Object[2];
            v3_0[0] = this.kk;
            v3_0[1] = v4_0.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to clear tracking queue due to an unexpected error (%s)", v3_0);
        }
        return;
    }

Method com.adobe.mobile.AbstractHitDatabase.al() calling method android.database.sqlite.SQLiteDatabase.delete()


    protected void al(String p11)
    {
        if ((p11 != null) && (p11.trim().length() != 0)) {
            try {
                String v4_0 = this.kf;
                String[] v7 = new String[1];
                v7[0] = p11;
                v4_0.delete("HITS", "ID = ?", v7);
                this.ko = (this.ko - 1);
            } catch (String v11_11) {
                throw v11_11;
            } catch (String v11_1) {
                String v3_0 = new Object[2];
                v3_0[0] = this.kk;
                v3_0[1] = v11_1.getLocalizedMessage();
                com.adobe.mobile.StaticMethods.b("%s - Unable to delete hit due to an unexpected error (%s)", v3_0);
                StringBuilder v1_2 = new StringBuilder();
                v1_2.append("Unexpected exception, database probably corrupted (");
                v1_2.append(v11_1.getLocalizedMessage());
                v1_2.append(")");
                throw new com.adobe.mobile.AbstractDatabaseBacking$CorruptedDatabaseException(v1_2.toString());
            }
            return;
        } else {
            StringBuilder v1_5 = new Object[1];
            v1_5[0] = this.kk;
            com.adobe.mobile.StaticMethods.d("%s - Unable to delete hit due to an invalid parameter", v1_5);
            return;
        }
    }

Method com.adobe.mobile.ThirdPartyQueue.cZ() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    protected void cZ()
    {
        try {
            this.lV = this.kf.compileStatement("INSERT INTO HITS (URL, POSTBODY, POSTTYPE, TIMESTAMP, TIMEOUT) VALUES (?, ?, ?, ?, ?)");
        } catch (Exception v3_1) {
            Object[] v2_3 = new Object[2];
            v2_3[0] = this.kk;
            v2_3[1] = v3_1.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to create database due to an invalid path (%s)", v2_3);
        } catch (Exception v3_0) {
            Object[] v2_1 = new Object[2];
            v2_1[0] = this.kk;
            v2_1[1] = v3_0.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to create database due to a sql error (%s)", v2_1);
        } catch (Exception v3_4) {
            Object[] v2_0 = new Object[2];
            v2_0[0] = this.kk;
            v2_0[1] = v3_4.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("%s - Unable to create database due to an unexpected error (%s)", v2_0);
        }
        return;
    }

Method com.adobe.mobile.AnalyticsWorker.cZ() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    protected void cZ()
    {
        try {
            this.lV = this.kf.compileStatement("INSERT INTO HITS (URL, TIMESTAMP) VALUES (?, ?)");
        } catch (String v2_4) {
            Object[] v1_2 = new Object[1];
            v1_2[0] = v2_4.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("Analytics - Unable to create database due to an invalid path (%s)", v1_2);
        } catch (String v2_1) {
            Object[] v1_1 = new Object[1];
            v1_1[0] = v2_1.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("Analytics - Unable to create database due to a sql error (%s)", v1_1);
        } catch (String v2_7) {
            Object[] v1_3 = new Object[1];
            v1_3[0] = v2_7.getLocalizedMessage();
            com.adobe.mobile.StaticMethods.b("Analytics - Unable to create database due to an unexpected error (%s)", v1_3);
        }
        return;
    }

Method com.adobe.mobile.AnalyticsTrackTimedAction.cZ() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    protected void cZ()
    {
        this.lF = "SELECT ID, STARTTIME, ADJSTARTTIME FROM TIMEDACTIONS WHERE NAME=?";
        this.lH = "SELECT COUNT(*) FROM TIMEDACTIONS WHERE NAME=?";
        this.lK = "SELECT KEY, VALUE FROM CONTEXTDATA WHERE ACTIONID=?";
        this.lM = "SELECT COUNT(*) FROM CONTEXTDATA WHERE ACTIONID=? AND KEY=?";
        try {
            this.lC = this.kf.compileStatement("INSERT INTO TIMEDACTIONS (NAME, STARTTIME, ADJSTARTTIME) VALUES (@NAME, @START, @START)");
            this.lD = this.kf.compileStatement("UPDATE TIMEDACTIONS SET ADJSTARTTIME=ADJSTARTTIME+@DELTA WHERE ADJSTARTTIME!=0");
            this.lE = this.kf.compileStatement("UPDATE TIMEDACTIONS SET ADJSTARTTIME=0");
            this.lG = this.kf.compileStatement("DELETE FROM TIMEDACTIONS WHERE ID=@ID");
            this.lI = this.kf.compileStatement("INSERT INTO CONTEXTDATA(ACTIONID, KEY, VALUE) VALUES (@ACTIONID, @KEY, @VALUE)");
            this.lJ = this.kf.compileStatement("UPDATE CONTEXTDATA SET VALUE=@VALUE WHERE ACTIONID=@ACTIONID AND KEY=@KEY");
            this.lL = this.kf.compileStatement("DELETE FROM CONTEXTDATA WHERE ACTIONID=@ACTIONID");
        } catch (String v2_16) {
            Object[] v1_1 = new Object[1];
            v1_1[0] = v2_16.getMessage();
            com.adobe.mobile.StaticMethods.b("Analytics - unable to prepare the needed SQL statements for interacting with the timed actions database (%s)", v1_1);
        } catch (String v2_14) {
            Object[] v1_0 = new Object[1];
            v1_0[0] = v2_14.getMessage();
            com.adobe.mobile.StaticMethods.b("Analytics - Unknown error preparing sql statements (%s)", v1_0);
        }
        return;
    }

Method android.arch.persistence.db.framework.FrameworkSQLiteDatabase.compileStatement() calling method android.database.sqlite.SQLiteDatabase.compileStatement()


    public android.arch.persistence.db.SupportSQLiteStatement compileStatement(String p3)
    {
        return new android.arch.persistence.db.framework.FrameworkSQLiteStatement(this.bA.compileStatement(p3));
    }

Method com.adobe.mobile.ThirdPartyQueue.df() calling method android.database.sqlite.SQLiteDatabase.query()


    protected com.adobe.mobile.AbstractHitDatabase$Hit df()
    {
        Exception v1_0 = 0;
        try {
            android.database.SQLException v5_0 = this.kf.query("HITS", com.adobe.mobile.ThirdPartyQueue.yK, 0, 0, 0, 0, "ID ASC", "1");
            try {
                com.adobe.mobile.AbstractHitDatabase$Hit v6_0;
                if (v5_0.moveToFirst()) {
                    v6_0 = new com.adobe.mobile.AbstractHitDatabase$Hit();
                    try {
                        v6_0.identifier = v5_0.getString(0);
                        v6_0.kw = v5_0.getString(1);
                        v6_0.kx = v5_0.getString(2);
                        v6_0.ky = v5_0.getString(3);
                        v6_0.timestamp = v5_0.getLong(4);
                        v6_0.kz = v5_0.getInt(5);
                        v1_0 = v6_0;
                    } catch (Exception v1_2) {
                        Object[] v2_3 = new Object[2];
                        v2_3[0] = this.kk;
                        v2_3[1] = v1_2.getMessage();
                        com.adobe.mobile.StaticMethods.b("%s - Unable to read from database (%s)", v2_3);
                        if (v5_0 == null) {
                            return v6_0;
                        } else {
                            v5_0.close();
                            return v6_0;
                        }
                    } catch (Exception v1_1) {
                        Object[] v2_2 = new Object[2];
                        v2_2[0] = this.kk;
                        v2_2[1] = v1_1.getMessage();
                        com.adobe.mobile.StaticMethods.b("%s - Unknown error reading from database (%s)", v2_2);
                        if (v5_0 == null) {
                            return v6_0;
                        }
                    }
                }
            } catch (com.adobe.mobile.AbstractHitDatabase$Hit v6_4) {
                v6_0 = 0;
                v1_2 = v6_4;
            } catch (com.adobe.mobile.AbstractHitDatabase$Hit v6_3) {
                v6_0 = 0;
                v1_1 = v6_3;
            }
            if (v5_0 != null) {
                v5_0.close();
            }
            v6_0 = v1_0;
            return v6_0;
        } catch (Object[] v2_1) {
            v5_0 = 0;
            Exception v1_3 = v2_1;
            if (v5_0 != null) {
                v5_0.close();
            }
            throw v1_3;
        } catch (android.database.SQLException v5_2) {
            v6_0 = 0;
            v1_2 = v5_2;
            v5_0 = 0;
        } catch (android.database.SQLException v5_1) {
            v6_0 = 0;
            v1_1 = v5_1;
            v5_0 = 0;
        }
    }

Method com.adobe.mobile.AnalyticsWorker.df() calling method android.database.sqlite.SQLiteDatabase.query()


    protected com.adobe.mobile.AbstractHitDatabase$Hit df()
    {
        android.database.SQLException v1_0 = 0;
        try {
            Exception v4_0 = this.kf.query("HITS", new String[] {"ID", "URL", "TIMESTAMP"}), 0, 0, 0, 0, "ID ASC", "1");
            try {
                com.adobe.mobile.AbstractHitDatabase$Hit v5_0;
                if (v4_0.moveToFirst()) {
                    v5_0 = new com.adobe.mobile.AbstractHitDatabase$Hit();
                    try {
                        v5_0.identifier = v4_0.getString(0);
                        v5_0.kw = v4_0.getString(1);
                        v5_0.timestamp = v4_0.getLong(2);
                        v1_0 = v5_0;
                    } catch (android.database.SQLException v1_5) {
                        Exception v4_2 = v1_5;
                        v1_0 = v4_0;
                        Throwable v2_2 = new Object[1];
                        v2_2[0] = v4_2.getMessage();
                        com.adobe.mobile.StaticMethods.b("Analytics - Unable to read from database (%s)", v2_2);
                        if (v1_0 == null) {
                            return v5_0;
                        } else {
                            v1_0.close();
                            return v5_0;
                        }
                    } catch (android.database.SQLException v1_4) {
                        Exception v4_1 = v1_4;
                        v1_0 = v4_0;
                        Throwable v2_1 = new Object[1];
                        v2_1[0] = v4_1.getMessage();
                        com.adobe.mobile.StaticMethods.b("Analytics - Unknown error reading from database (%s)", v2_1);
                        if (v1_0 == null) {
                            return v5_0;
                        }
                    }
                }
            } catch (android.database.SQLException v1_6) {
                Throwable v2_3 = v1_6;
                v1_0 = v4_0;
                if (v1_0 != null) {
                    v1_0.close();
                }
                throw v2_3;
            } catch (com.adobe.mobile.AbstractHitDatabase$Hit v5_4) {
                v5_0 = 0;
                v1_0 = v4_0;
                v4_2 = v5_4;
            } catch (com.adobe.mobile.AbstractHitDatabase$Hit v5_3) {
                v5_0 = 0;
                v1_0 = v4_0;
                v4_1 = v5_3;
            }
            if (v4_0 != null) {
                v4_0.close();
            }
            v5_0 = v1_0;
            return v5_0;
        } catch (Throwable v2_3) {
        } catch (Exception v4_2) {
            v5_0 = 0;
        } catch (Exception v4_1) {
            v5_0 = 0;
        }
    }

Method com.google.android.gms.common.util.DbUtils.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private static varargs void a(android.database.sqlite.SQLiteDatabase p11, String p12, String[] p13)
    {
        if ((!"table".equals(p12)) && ((!"view".equals(p12)) && (!"trigger".equals(p12)))) {
            int v0_3 = 0;
        } else {
            v0_3 = 1;
        }
        com.google.android.gms.common.internal.Preconditions.checkArgument(v0_3);
        String[] v7 = new String[1];
        v7[0] = p12;
        int v0_6 = p11.query("SQLITE_MASTER", new String[] {"name"}), "type == ?", v7, 0, 0, 0);
        Throwable v1_1 = 0;
        try {
            java.util.Set v13_1 = com.google.android.gms.common.util.CollectionUtils.g(p13);
        } catch (Throwable v11_2) {
            if (v0_6 != 0) {
                if (v1_1 == null) {
                    v0_6.close();
                } else {
                    try {
                        v0_6.close();
                    } catch (Throwable v12_1) {
                        com.google.android.gms.internal.stable.zzk.a(v1_1, v12_1);
                    }
                }
            }
            throw v11_2;
        } catch (Throwable v11_1) {
            v1_1 = v11_1;
            throw v1_1;
        }
        while (v0_6.moveToNext()) {
            String v3_2 = v0_6.getString(0);
            if (!v13_1.contains(v3_2)) {
                StringBuilder v5_4 = new StringBuilder(((String.valueOf(p12).length() + 8) + String.valueOf(v3_2).length()));
                v5_4.append("DROP ");
                v5_4.append(p12);
                v5_4.append(" \'");
                v5_4.append(v3_2);
                v5_4.append("\'");
                p11.execSQL(v5_4.toString());
            }
        }
        if (v0_6 != 0) {
            v0_6.close();
        }
        return;
    }