Info Call to SQLite query API

Description

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

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method com.ofss.fcdb.mobile.android.b.b.f.g() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected com.ofss.fcdb.mobile.android.b.a.a g(String p5)
    {
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v0_4;
            android.database.Cursor v2_2 = this.b.rawQuery(new StringBuilder().append("SELECT * FROM css WHERE id = \'").append(p5).append("\'").toString(), 0);
            try {
                if (!v2_2.moveToFirst()) {
                    v2_2.close();
                    v0_4 = 0;
                    return v0_4;
                } else {
                    v0_4 = new com.ofss.fcdb.mobile.android.b.a.a(v2_2.getBlob(v2_2.getColumnIndex("css")));
                    v2_2.close();
                    return v0_4;
                }
            } catch (android.database.Cursor v0_2) {
                v1 = v2_2;
                v1.close();
                throw v0_2;
            } catch (android.database.Cursor v0) {
                android.database.Cursor v0_1 = v2_2;
                v0_1.close();
            }
        } catch (android.database.Cursor v0_2) {
        } catch (android.database.Cursor v0) {
            v0_1 = 0;
        }
    }

Method com.ofss.fcdb.mobile.android.b.b.f.f() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected String f(boolean p6, String p7)
    {
        String v0_0 = "NOCSSENTRY";
        if (!p6) {
            try {
                android.database.Cursor v1_1 = this.b.rawQuery("SELECT id FROM css", 0);
            } catch (String v0_4) {
                v1_1.close();
                throw v0_4;
            } catch (String v0) {
                v0_0 = "NOCSSENTRY";
                v1_1.close();
            }
            if (v1_1.moveToFirst()) {
                do {
                    String v0_2 = v1_1.getString(0);
                    com.ofss.fcdb.mobile.android.b.d.a.a(new StringBuilder().append("css:l_resname:").append(v0_2).toString());
                    com.ofss.fcdb.mobile.android.b.b.b.l.put(this.h(v0_2), v0_2);
                } while(v1_1.moveToNext());
                v0_0 = "CSSENTERED";
            }
            v1_1.close();
        } else {
            try {
                com.ofss.fcdb.mobile.android.b.b.b.k.put(this.h(p7), ((byte[]) this.g(((String) com.ofss.fcdb.mobile.android.b.b.b.l.get(p7))).a()));
                v0_0 = "CSSENTERED";
            } catch (String v0) {
                v0_0 = "NOCSSENTRY";
            }
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.f() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected com.ofss.fcdb.mobile.android.b.a.f f(String p5)
    {
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v0_4;
            android.database.Cursor v2_2 = this.b.rawQuery(new StringBuilder().append("SELECT * FROM xml WHERE id = \'").append(p5).append("\'").toString(), 0);
            try {
                if (!v2_2.moveToFirst()) {
                    v2_2.close();
                    v0_4 = 0;
                    return v0_4;
                } else {
                    v0_4 = new com.ofss.fcdb.mobile.android.b.a.f(v2_2.getBlob(v2_2.getColumnIndex("xml")));
                    v2_2.close();
                    return v0_4;
                }
            } catch (android.database.Cursor v0_2) {
                v1 = v2_2;
                v1.close();
                throw v0_2;
            } catch (android.database.Cursor v0) {
                android.database.Cursor v0_1 = v2_2;
                v0_1.close();
            }
        } catch (android.database.Cursor v0_2) {
        } catch (android.database.Cursor v0) {
            v0_1 = 0;
        }
    }

Method com.ofss.fcdb.mobile.android.b.b.f.e() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected String e(boolean p6, String p7)
    {
        String v0_0 = "NOXMLENTRY";
        if (!p6) {
            try {
                android.database.Cursor v1_1 = this.b.rawQuery("SELECT id FROM xml", 0);
            } catch (String v0_4) {
                v1_1.close();
                throw v0_4;
            } catch (String v0) {
                v0_0 = "NOXMLENTRY";
                v1_1.close();
            }
            if (v1_1.moveToFirst()) {
                do {
                    String v0_2 = v1_1.getString(0);
                    com.ofss.fcdb.mobile.android.b.d.a.a(new StringBuilder().append("xml:l_resname:").append(v0_2).toString());
                    com.ofss.fcdb.mobile.android.b.b.b.l.put(this.h(v0_2), v0_2);
                } while(v1_1.moveToNext());
                v0_0 = "XMLENTERED";
            }
            v1_1.close();
        } else {
            try {
                com.ofss.fcdb.mobile.android.b.b.b.h.put(p7, this.f(((String) com.ofss.fcdb.mobile.android.b.b.b.l.get(p7))).a());
                v0_0 = "XMLENTERED";
            } catch (String v0) {
                v0_0 = "NOXMLENTRY";
            }
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.e() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected com.ofss.fcdb.mobile.android.b.a.c e(String p5)
    {
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v0_4;
            android.database.Cursor v2_2 = this.b.rawQuery(new StringBuilder().append("SELECT * FROM html WHERE id = \'").append(p5).append("\'").toString(), 0);
            try {
                if (!v2_2.moveToFirst()) {
                    v2_2.close();
                    v0_4 = 0;
                    return v0_4;
                } else {
                    v0_4 = new com.ofss.fcdb.mobile.android.b.a.c(v2_2.getBlob(v2_2.getColumnIndex("font")));
                    v2_2.close();
                    return v0_4;
                }
            } catch (android.database.Cursor v0_2) {
                v1 = v2_2;
                v1.close();
                throw v0_2;
            } catch (android.database.Cursor v0) {
                android.database.Cursor v0_1 = v2_2;
                v0_1.close();
            }
        } catch (android.database.Cursor v0_2) {
        } catch (android.database.Cursor v0) {
            v0_1 = 0;
        }
    }

Method com.ofss.fcdb.mobile.android.b.b.f.d() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected String d(boolean p6, String p7)
    {
        String v0_0 = "NOPROPERTYENTRY";
        if (!p6) {
            try {
                android.database.Cursor v1_1 = this.b.rawQuery("SELECT id FROM property", 0);
            } catch (String v0_4) {
                v1_1.close();
                throw v0_4;
            } catch (String v0) {
                v0_0 = "NOPROPERTYENTRY";
                v1_1.close();
            }
            if (v1_1.moveToFirst()) {
                do {
                    String v0_2 = v1_1.getString(0);
                    com.ofss.fcdb.mobile.android.b.d.a.a(new StringBuilder().append("PROPERTY:l_resname:").append(v0_2).toString());
                    com.ofss.fcdb.mobile.android.b.b.b.l.put(this.h(v0_2), v0_2);
                } while(v1_1.moveToNext());
                v0_0 = "PROPERTYENTERED";
            }
            v1_1.close();
        } else {
            try {
                com.ofss.fcdb.mobile.android.b.b.b.g.put(p7, this.c(((String) com.ofss.fcdb.mobile.android.b.b.b.l.get(p7))).a());
                v0_0 = "PROPERTYENTERED";
            } catch (String v0) {
                v0_0 = "NOPROPERTYENTRY";
            }
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.d() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected com.ofss.fcdb.mobile.android.b.a.b d(String p5)
    {
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v0_4;
            android.database.Cursor v2_2 = this.b.rawQuery(new StringBuilder().append("SELECT * FROM font WHERE id = \'").append(p5).append("\'").toString(), 0);
            try {
                if (!v2_2.moveToFirst()) {
                    v2_2.close();
                    v0_4 = 0;
                    return v0_4;
                } else {
                    v0_4 = new com.ofss.fcdb.mobile.android.b.a.b(v2_2.getBlob(v2_2.getColumnIndex("font")));
                    v2_2.close();
                    return v0_4;
                }
            } catch (android.database.Cursor v0_2) {
                v1 = v2_2;
                v1.close();
                throw v0_2;
            } catch (android.database.Cursor v0) {
                android.database.Cursor v0_1 = v2_2;
                v0_1.close();
            }
        } catch (android.database.Cursor v0_2) {
        } catch (android.database.Cursor v0) {
            v0_1 = 0;
        }
    }

Method com.ofss.fcdb.mobile.android.b.b.f.c() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected String c(boolean p6, String p7)
    {
        String v0_0 = "NOHTMLENTRY";
        if (!p6) {
            try {
                android.database.Cursor v1_1 = this.b.rawQuery("SELECT id FROM html", 0);
            } catch (String v0_5) {
                v1_1.close();
                throw v0_5;
            } catch (String v0) {
                v0_0 = "NOHTMLENTRY";
                v1_1.close();
            }
            if (v1_1.moveToFirst()) {
                do {
                    String v0_3 = this.h(v1_1.getString(0));
                    com.ofss.fcdb.mobile.android.b.b.b.l.put(this.h(v0_3), v0_3);
                } while(v1_1.moveToNext());
                v0_0 = "HTMLENTERED";
            }
            v1_1.close();
        } else {
            try {
                com.ofss.fcdb.mobile.android.b.b.b.j.put(p7, this.e(((String) com.ofss.fcdb.mobile.android.b.b.b.l.get(p7))).a());
                v0_0 = "HTMLENTERED";
            } catch (String v0) {
                v0_0 = "NOHTMLENTRY";
            }
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.c() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected com.ofss.fcdb.mobile.android.b.a.e c()
    {
        java.util.HashMap v2_1 = new java.util.HashMap();
        String v1_3 = new java.util.ArrayList();
        java.util.ArrayList v3_1 = new java.util.ArrayList();
        try {
            Throwable v0_0 = this.b.rawQuery("SELECT resname, lang, usertype FROM restable", 0);
            try {
                if (v0_0.moveToFirst()) {
                    do {
                        v1_3.add(new StringBuilder().append(v0_0.getString(2)).append("_").append(v0_0.getString(1)).toString());
                        v3_1.add(v0_0.getString(0));
                    } while(v0_0.moveToNext());
                    v2_1.put("PROPERTY_LIST", v1_3);
                    v2_1.put("RESOURCE_LIST", v3_1);
                }
            } catch (String v1_5) {
                String v1_0 = v0_0;
                Throwable v0_1 = v1_5;
                v1_0.close();
                throw v0_1;
            } catch (String v1) {
                v1_0 = v0_0;
                try {
                    Throwable v0_3 = new com.ofss.fcdb.mobile.android.b.a.e(v2_1);
                    v1_0.close();
                } catch (Throwable v0_1) {
                }
                return v0_3;
            }
            v0_0.close();
            v0_3 = new com.ofss.fcdb.mobile.android.b.a.e(v2_1);
            return v0_3;
        } catch (String v1_1) {
            v1_0 = v0_0;
            v0_1 = v1_1;
        } catch (String v1) {
            v1_0 = v0_0;
        }
    }

Method com.ofss.fcdb.mobile.android.b.b.f.c() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected com.ofss.fcdb.mobile.android.b.a.d c(String p5)
    {
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v0_4;
            android.database.Cursor v2_2 = this.b.rawQuery(new StringBuilder().append("SELECT * FROM property WHERE id = \'").append(p5).append("\'").toString(), 0);
            try {
                if (!v2_2.moveToFirst()) {
                    v2_2.close();
                    v0_4 = 0;
                    return v0_4;
                } else {
                    v0_4 = new com.ofss.fcdb.mobile.android.b.a.d(v2_2.getBlob(v2_2.getColumnIndex("property")));
                    v2_2.close();
                    return v0_4;
                }
            } catch (android.database.Cursor v0_2) {
                v1 = v2_2;
                v1.close();
                throw v0_2;
            } catch (android.database.Cursor v0) {
                android.database.Cursor v0_1 = v2_2;
                v0_1.close();
            }
        } catch (android.database.Cursor v0_2) {
        } catch (android.database.Cursor v0) {
            v0_1 = 0;
        }
    }

Method com.ofss.fcdb.mobile.android.b.b.f.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected String b(boolean p6, String p7)
    {
        String v0_0 = "NOFONTENTRY";
        if (!p6) {
            try {
                android.database.Cursor v1_1 = this.b.rawQuery("SELECT id FROM font", 0);
            } catch (String v0_4) {
                v1_1.close();
                throw v0_4;
            } catch (String v0) {
                v0_0 = "NOFONTENTRY";
                v1_1.close();
            }
            if (v1_1.moveToFirst()) {
                do {
                    String v0_2 = v1_1.getString(0);
                    com.ofss.fcdb.mobile.android.b.b.b.l.put(this.h(v0_2), v0_2);
                } while(v1_1.moveToNext());
                v0_0 = "FONTENTERED";
            }
            v1_1.close();
        } else {
            try {
                com.ofss.fcdb.mobile.android.b.b.b.i.put(p7, this.d(((String) com.ofss.fcdb.mobile.android.b.b.b.l.get(p7))).a());
                v0_0 = "FONTENTERED";
            } catch (String v0) {
                v0_0 = "NOFONTENTRY";
            }
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected android.graphics.Bitmap b(String p10)
    {
        int v2_0 = 1;
        android.graphics.Bitmap v0_0 = 0;
        try {
            int v3_1;
            if (!new com.ofss.fcdb.mobile.android.b.g.a(this.c).a().equalsIgnoreCase("tablet")) {
                v3_1 = com.ofss.fcdb.mobile.android.b.c.f.a("PARAM.VALUE.PHONE_IMAGE_SIZE", this.c);
                android.database.Cursor v1_5 = this.b.rawQuery(new StringBuilder().append("SELECT * FROM image WHERE id = \'").append(p10).append("\'").toString(), 0);
                try {
                    if (!v1_5.moveToFirst()) {
                        v1_5.close();
                    } else {
                        byte[] v5_3 = v1_5.getBlob(v1_5.getColumnIndex("image"));
                        int v6_1 = new android.graphics.BitmapFactory$Options();
                        v6_1.inJustDecodeBounds = 1;
                        android.graphics.BitmapFactory.decodeByteArray(v5_3, 0, v5_3.length, v6_1);
                        int v7_1 = Integer.parseInt(v3_1);
                        int v4_11 = v6_1.outWidth;
                        int v3_4 = v6_1.outHeight;
                        while (((v4_11 / 2) >= v7_1) && ((v3_4 / 2) >= v7_1)) {
                            v4_11 /= 2;
                            v3_4 /= 2;
                            v2_0 *= 2;
                        }
                        int v3_7 = new android.graphics.BitmapFactory$Options();
                        v3_7.inSampleSize = v2_0;
                        v0_0 = android.graphics.BitmapFactory.decodeByteArray(v5_3, 0, v5_3.length, v3_7);
                        v1_5.close();
                    }
                } catch (android.graphics.Bitmap v0_1) {
                    v1_5.close();
                    throw v0_1;
                } catch (int v2) {
                    v1_5.close();
                }
            } else {
                v3_1 = com.ofss.fcdb.mobile.android.b.c.f.a("PARAM.VALUE.TAB_IMAGE_SIZE", this.c);
            }
        } catch (android.database.Cursor v1_6) {
            v1_5 = 0;
            v0_1 = v1_6;
        } catch (android.database.Cursor v1) {
            v1_5 = 0;
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    protected String a(boolean p6, String p7)
    {
        String v0_0 = "NOIMAGEENTRY";
        if (!p6) {
            try {
                android.database.Cursor v1_1 = this.b.rawQuery("SELECT id FROM image", 0);
            } catch (String v0_4) {
                v1_1.close();
                throw v0_4;
            } catch (String v0) {
                v0_0 = "NOIMAGEENTRY";
                v1_1.close();
            }
            if (v1_1.moveToFirst()) {
                do {
                    String v0_2 = v1_1.getString(0);
                    com.ofss.fcdb.mobile.android.b.b.b.l.put(this.h(v0_2), v0_2);
                } while(v1_1.moveToNext());
                v0_0 = "IMAGEENTERED";
            }
            v1_1.close();
        } else {
            try {
                com.ofss.fcdb.mobile.android.b.b.b.f.put(p7, this.b(((String) com.ofss.fcdb.mobile.android.b.b.b.l.get(p7))));
                v0_0 = "IMAGEENTERED";
            } catch (String v0) {
                v0_0 = "NOIMAGEENTRY";
            }
        }
        return v0_0;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.f() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void f(byte[] p5, String p6)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p6);
        v0_1.put("css", p5);
        this.b.insert("css", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.e() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void e(byte[] p5, String p6)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p6);
        v0_1.put("xml", p5);
        this.b.insert("xml", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.d() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void d(byte[] p5, String p6)
    {
        android.content.ContentValues v0_2 = android.graphics.BitmapFactory.decodeByteArray(p5, 0, p5.length);
        android.database.sqlite.SQLiteDatabase v1_4 = new java.io.ByteArrayOutputStream();
        v0_2.compress(android.graphics.Bitmap$CompressFormat.PNG, 100, v1_4);
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p6);
        v0_1.put("image", v1_4.toByteArray());
        this.b.insert("image", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.c() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void c(byte[] p5, String p6)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p6);
        v0_1.put("html", p5);
        this.b.insert("html", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.b() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void b(byte[] p5, String p6)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p6);
        v0_1.put("font", p5);
        this.b.insert("font", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void a(byte[] p5, String p6)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p6);
        v0_1.put("property", p5);
        this.b.insert("property", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void a(String p5, String p6, String p7, String p8, String p9)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("lang", p5);
        v0_1.put("usertype", p6);
        v0_1.put("entity", p7);
        v0_1.put("theme", p8);
        v0_1.put("resname", p9);
        this.b.insert("restable", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    protected void a(String p5)
    {
        android.content.ContentValues v0_1 = new android.content.ContentValues();
        v0_1.clear();
        v0_1.put("id", p5);
        this.b.insert("version", 0, v0_1);
        return;
    }

Method com.ofss.fcdb.mobile.android.a.b.a.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void a(com.ofss.fcdb.mobile.android.a.a.a.a p6, int p7)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.getWritableDatabase();
        Exception v0_1 = new android.content.ContentValues();
        v0_1.put("idrequest", p6.a());
        v0_1.put("response", p6.b());
        try {
            if (this.a("transactions", p6.a()) == null) {
                com.ofss.fcdb.mobile.android.b.d.a.a("test", "Inserting the row");
                v1.insert("transactions", 0, v0_1);
                v1.close();
            } else {
                com.ofss.fcdb.mobile.android.b.d.a.a("test", new StringBuilder("Record already exists for ").append(p6.a()).append(" . Deleting data").toString());
                new android.content.ContentValues().put("response", p6.b());
                v1.execSQL(new StringBuilder("delete from transactions where idrequest=\'").append(p6.a()).append("\'").toString());
            }
        } catch (Exception v0_2) {
            v1.close();
            throw v0_2;
        } catch (Exception v0) {
            v1.close();
        }
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.g.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p2, int p3, int p4)
    {
        p2.execSQL("DROP TABLE IF EXISTS html");
        p2.execSQL("DROP TABLE IF EXISTS LASTTHEMETYPETABLE");
        p2.execSQL("DROP TABLE IF EXISTS LASTUSERTYPETABLE");
        p2.execSQL("DROP TABLE IF EXISTS LASTLANGTYPETABLE");
        p2.execSQL("DROP TABLE IF EXISTS LASTENTITYTYPETABLE");
        p2.execSQL("DROP TABLE IF EXISTS restable");
        p2.execSQL("DROP TABLE IF EXISTS property");
        p2.execSQL("DROP TABLE IF EXISTS font");
        p2.execSQL("DROP TABLE IF EXISTS version");
        p2.execSQL("DROP TABLE IF EXISTS image");
        p2.execSQL("DROP TABLE IF EXISTS xml");
        p2.execSQL("DROP TABLE IF EXISTS css");
        this.onCreate(p2);
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.g.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        p2.execSQL("create table html (id text not null,html blob not null);");
        p2.execSQL("create table LASTLANGTYPETABLE (lastlang text not null);");
        p2.execSQL("create table LASTUSERTYPETABLE (lastuser text not null);");
        p2.execSQL("create table LASTTHEMETYPETABLE (lasttheme text not null);");
        p2.execSQL("create table LASTENTITYTYPETABLE (lastentity text not null);");
        p2.execSQL("create table restable (lang text not null,theme text not null,entity text not null,usertype text not null,resname text not null);");
        p2.execSQL("create table property (id text not null,property blob not null);");
        p2.execSQL("create table font (id text not null,font blob not null);");
        p2.execSQL("create table version (id text not null);");
        p2.execSQL("create table image (id text not null,image blob not null);");
        p2.execSQL("create table xml (id text not null, xml blob not null);");
        p2.execSQL("create table css (id text not null, css blob not null);");
        return;
    }

Method com.ofss.fcdb.mobile.android.a.b.a.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p2, int p3, int p4)
    {
        p2.execSQL("DROP TABLE IF EXISTS transactions");
        this.onCreate(p2);
        return;
    }

Method com.ofss.fcdb.mobile.android.a.b.a.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        p2.execSQL("CREATE TABLE transactions(idrequest TEXT PRIMARY KEY,response TEXT)");
        return;
    }

Method com.ofss.fcdb.mobile.android.a.b.a.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void a(com.ofss.fcdb.mobile.android.a.a.a.a p6, int p7)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.getWritableDatabase();
        Exception v0_1 = new android.content.ContentValues();
        v0_1.put("idrequest", p6.a());
        v0_1.put("response", p6.b());
        try {
            if (this.a("transactions", p6.a()) == null) {
                com.ofss.fcdb.mobile.android.b.d.a.a("test", "Inserting the row");
                v1.insert("transactions", 0, v0_1);
                v1.close();
            } else {
                com.ofss.fcdb.mobile.android.b.d.a.a("test", new StringBuilder("Record already exists for ").append(p6.a()).append(" . Deleting data").toString());
                new android.content.ContentValues().put("response", p6.b());
                v1.execSQL(new StringBuilder("delete from transactions where idrequest=\'").append(p6.a()).append("\'").toString());
            }
        } catch (Exception v0_2) {
            v1.close();
            throw v0_2;
        } catch (Exception v0) {
            v1.close();
        }
        return;
    }

Method com.ofss.fcdb.mobile.android.b.b.f.d() calling method android.database.sqlite.SQLiteDatabase.query()


    protected String d()
    {
        try {
            String v0_5 = this.b;
            boolean v3_4 = new String[1];
            v3_4[0] = "id";
            int v1_0 = v0_5.query(1, "version", v3_4, 0, 0, 0, 0, 0, 0);
            try {
                String v0_4;
                com.ofss.fcdb.mobile.android.b.d.a.a("trying to get version");
            } catch (String v0_0) {
                com.ofss.fcdb.mobile.android.b.d.a.a(android.util.Log.getStackTraceString(v0_0));
                v0_4 = "NOVERSIONFOUND";
                v1_0.close();
                return v0_4;
            }
            if (!v1_0.moveToFirst()) {
                v0_4 = "NOVERSIONFOUND";
            } else {
                String v2_0 = "0";
                do {
                    v0_4 = v1_0.getString(v1_0.getColumnIndex("id"));
                    if (Integer.parseInt(v2_0) != 0) {
                        // Both branches of the condition point to the same code.
                        // if (Integer.parseInt(v0_4) >= Integer.parseInt(v2_0)) {
                        // }
                    } else {
                        v2_0 = v0_4;
                    }
                } while(v1_0.moveToNext());
            }
            v1_0.close();
            return v0_4;
        } catch (String v0_1) {
            v1_0 = 0;
            v1_0.close();
            throw v0_1;
        } catch (String v0_0) {
            v1_0 = 0;
        } catch (String v0_1) {
        }
    }

Method com.ofss.fcdb.mobile.android.a.b.a.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.ofss.fcdb.mobile.android.a.a.a.a a(String p11, String p12)
    {
        com.ofss.fcdb.mobile.android.a.a.a.b v2_0 = 0;
        com.ofss.fcdb.mobile.android.b.d.a.a("test", new StringBuilder("Fetching getContact for key=").append(p12).toString());
        String v0_0 = this.getReadableDatabase();
        String[] v4 = new String[1];
        v4[0] = p12;
        String v0_2 = v0_0.query("transactions", 0, "idrequest=?", v4, 0, 0, 0, 0);
        if ((v0_2 != null) && (v0_2.moveToFirst())) {
            com.ofss.fcdb.mobile.android.b.d.a.a("test", "Record found and created");
            v2_0 = new com.ofss.fcdb.mobile.android.a.a.a.b();
            v2_0.a(p12);
            v2_0.b(v0_2.getString(1));
        }
        return v2_0;
    }