.class public Lcom/moji/appwidget/skin/SkinInfoSqliteManager;
.super Ljava/lang/Object;
.source "SkinInfoSqliteManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/appwidget/skin/SkinInfoSqliteManager$SingleHolder;
    }
.end annotation


# static fields
.field private static a:Landroid/database/sqlite/SQLiteDatabase;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method private constructor <init>()V
    .locals 2

    .line 21
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 22
    new-instance v0, Lcom/moji/appwidget/skin/SkinInfoDBHelper;

    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/moji/appwidget/skin/SkinInfoDBHelper;-><init>(Landroid/content/Context;)V

    .line 23
    invoke-virtual {v0}, Lcom/moji/appwidget/skin/SkinInfoDBHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    sput-object v0, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    return-void
.end method

.method synthetic constructor <init>(Lcom/moji/appwidget/skin/SkinInfoSqliteManager$1;)V
    .locals 0

    .line 17
    invoke-direct {p0}, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;-><init>()V

    return-void
.end method

.method public static declared-synchronized a()Lcom/moji/appwidget/skin/SkinInfoSqliteManager;
    .locals 2

    const-class v0, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;

    monitor-enter v0

    .line 32
    :try_start_0
    invoke-static {}, Lcom/moji/appwidget/skin/SkinInfoSqliteManager$SingleHolder;->a()Lcom/moji/appwidget/skin/SkinInfoSqliteManager;

    move-result-object v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method


# virtual methods
.method public declared-synchronized a(Ljava/lang/String;Ljava/lang/String;Lcom/moji/appwidget/core/EWidgetSize;)Ljava/lang/String;
    .locals 7

    monitor-enter p0

    const/4 v0, 0x0

    :try_start_0
    const-string v1, ""
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_2

    .line 102
    :try_start_1
    sget-object v2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V

    const-string v2, "select * from SkinInfo where WidgetName = ? and Resolution = ? and WidgetType = ?"

    .line 104
    sget-object v3, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    const/4 v4, 0x3

    new-array v5, v4, [Ljava/lang/String;

    const/4 v6, 0x0

    aput-object p1, v5, v6

    const/4 p1, 0x1

    aput-object p2, v5, p1

    const/4 p1, 0x2

    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p3, ""

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    aput-object p2, v5, p1

    invoke-virtual {v3, v2, v5}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object p1
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 105
    :try_start_2
    sget-object p2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p2}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V

    if-eqz p1, :cond_0

    .line 106
    invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z

    move-result p2

    if-eqz p2, :cond_0

    .line 107
    invoke-interface {p1, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object p2
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    move-object v1, p2

    :cond_0
    if-eqz p1, :cond_1

    .line 114
    :try_start_3
    invoke-interface {p1}, Landroid/database/Cursor;->close()V

    goto :goto_0

    :catch_0
    move-exception p1

    goto :goto_1

    .line 116
    :cond_1
    :goto_0
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0
    .catchall {:try_start_3 .. :try_end_3} :catchall_2

    goto :goto_6

    :goto_1
    :try_start_4
    const-string p2, "SkinInfoSqliteManager"

    .line 118
    :goto_2
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_2

    goto :goto_6

    :catchall_0
    move-exception p2

    move-object v0, p1

    goto :goto_7

    :catch_1
    move-exception p2

    move-object v0, p1

    goto :goto_3

    :catchall_1
    move-exception p2

    goto :goto_7

    :catch_2
    move-exception p2

    :goto_3
    :try_start_5
    const-string p1, "SkinInfoSqliteManager"

    .line 110
    invoke-static {p1, p2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_1

    if-eqz v0, :cond_2

    .line 114
    :try_start_6
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    goto :goto_4

    :catch_3
    move-exception p1

    goto :goto_5

    .line 116
    :cond_2
    :goto_4
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_3
    .catchall {:try_start_6 .. :try_end_6} :catchall_2

    goto :goto_6

    :goto_5
    :try_start_7
    const-string p2, "SkinInfoSqliteManager"
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_2

    goto :goto_2

    .line 121
    :goto_6
    monitor-exit p0

    return-object v1

    :goto_7
    if-eqz v0, :cond_3

    .line 114
    :try_start_8
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    goto :goto_8

    :catch_4
    move-exception p1

    goto :goto_9

    .line 116
    :cond_3
    :goto_8
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_4
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    goto :goto_a

    :goto_9
    :try_start_9
    const-string p3, "SkinInfoSqliteManager"

    .line 118
    invoke-static {p3, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 120
    :goto_a
    throw p2
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_2

    :catchall_2
    move-exception p1

    .line 98
    monitor-exit p0

    throw p1
.end method

.method public a(Ljava/lang/String;Lcom/moji/appwidget/core/EWidgetSize;)Ljava/util/List;
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Lcom/moji/appwidget/core/EWidgetSize;",
            ")",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .line 131
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const/4 v1, 0x0

    .line 134
    :try_start_0
    sget-object v2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V

    const-string v2, "select * from SkinInfo where Resolution = ? and WidgetType = ?"

    .line 136
    sget-object v3, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    const/4 v4, 0x2

    new-array v4, v4, [Ljava/lang/String;

    const/4 v5, 0x0

    aput-object p1, v4, v5

    const/4 p1, 0x1

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p2, ""

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    aput-object p2, v4, p1

    invoke-virtual {v3, v2, v4}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 137
    :try_start_1
    sget-object p2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p2}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V

    if-eqz p1, :cond_0

    .line 139
    :goto_0
    invoke-interface {p1}, Landroid/database/Cursor;->moveToNext()Z

    move-result p2

    if-eqz p2, :cond_0

    const/4 p2, 0x4

    .line 140
    invoke-interface {p1, p2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object p2

    invoke-interface {v0, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :cond_0
    if-eqz p1, :cond_1

    .line 148
    :try_start_2
    invoke-interface {p1}, Landroid/database/Cursor;->close()V

    .line 150
    :cond_1
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_4

    :catchall_0
    move-exception p2

    move-object v1, p1

    goto :goto_5

    :catch_0
    move-exception p2

    move-object v1, p1

    goto :goto_1

    :catchall_1
    move-exception p2

    goto :goto_5

    :catch_1
    move-exception p2

    :goto_1
    :try_start_3
    const-string p1, "SkinInfoSqliteManager"

    .line 144
    invoke-static {p1, p2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    if-eqz v1, :cond_2

    .line 148
    :try_start_4
    invoke-interface {v1}, Landroid/database/Cursor;->close()V

    goto :goto_2

    :catch_2
    move-exception p1

    goto :goto_3

    .line 150
    :cond_2
    :goto_2
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_2

    goto :goto_4

    :goto_3
    const-string p2, "SkinInfoSqliteManager"

    .line 152
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_4
    return-object v0

    :goto_5
    if-eqz v1, :cond_3

    .line 148
    :try_start_5
    invoke-interface {v1}, Landroid/database/Cursor;->close()V

    goto :goto_6

    :catch_3
    move-exception p1

    goto :goto_7

    .line 150
    :cond_3
    :goto_6
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_3

    goto :goto_8

    :goto_7
    const-string v0, "SkinInfoSqliteManager"

    .line 152
    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 154
    :goto_8
    throw p2
.end method

.method public a(Ljava/lang/String;)V
    .locals 4

    .line 165
    :try_start_0
    sget-object v0, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V

    const-string v0, "delete from SkinInfo where WidgetName=?"

    .line 167
    sget-object v1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/String;

    const/4 v3, 0x0

    aput-object p1, v2, v3

    invoke-virtual {v1, v0, v2}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 168
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 173
    :try_start_1
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_0

    :catchall_0
    move-exception p1

    goto :goto_1

    :catch_0
    move-exception p1

    :try_start_2
    const-string v0, "SkinInfoSqliteManager"

    .line 170
    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 173
    :try_start_3
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    goto :goto_0

    :catch_1
    move-exception p1

    const-string v0, "SkinInfoSqliteManager"

    .line 175
    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    return-void

    .line 173
    :goto_1
    :try_start_4
    sget-object v0, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_2

    goto :goto_2

    :catch_2
    move-exception v0

    const-string v1, "SkinInfoSqliteManager"

    .line 175
    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 177
    :goto_2
    throw p1
.end method

.method public declared-synchronized a(Ljava/lang/String;Lcom/moji/appwidget/core/EWidgetSize;Ljava/lang/String;Ljava/lang/String;)V
    .locals 4

    monitor-enter p0

    .line 76
    :try_start_0
    sget-object v0, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V

    const-string v0, "insert into SkinInfo (Resolution, WidgetType, SingleScreenSetting, WidgetName) values(?,?,?,?)"

    .line 78
    sget-object v1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    const/4 v2, 0x4

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    aput-object p1, v2, v3

    const/4 p1, 0x1

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p2, ""

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    aput-object p2, v2, p1

    const/4 p1, 0x2

    aput-object p3, v2, p1

    const/4 p1, 0x3

    aput-object p4, v2, p1

    invoke-virtual {v1, v0, v2}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 79
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 84
    :try_start_1
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    goto :goto_1

    :catch_0
    move-exception p1

    :try_start_2
    const-string p2, "SkinInfoSqliteManager"

    .line 86
    :goto_0
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    goto :goto_1

    :catchall_0
    move-exception p1

    goto :goto_2

    :catch_1
    move-exception p1

    :try_start_3
    const-string p2, "SkinInfoSqliteManager"

    .line 81
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 84
    :try_start_4
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_2
    .catchall {:try_start_4 .. :try_end_4} :catchall_1

    goto :goto_1

    :catch_2
    move-exception p1

    :try_start_5
    const-string p2, "SkinInfoSqliteManager"
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_1

    goto :goto_0

    .line 89
    :goto_1
    monitor-exit p0

    return-void

    .line 84
    :goto_2
    :try_start_6
    sget-object p2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p2}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_3
    .catchall {:try_start_6 .. :try_end_6} :catchall_1

    goto :goto_3

    :catchall_1
    move-exception p1

    goto :goto_4

    :catch_3
    move-exception p2

    :try_start_7
    const-string p3, "SkinInfoSqliteManager"

    .line 86
    invoke-static {p3, p2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 88
    :goto_3
    throw p1
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_1

    .line 75
    :goto_4
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 5

    monitor-enter p0

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 44
    :try_start_0
    sget-object v2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V

    const-string v2, "select * from SkinInfo where WidgetName =? and Resolution =?"

    .line 46
    sget-object v3, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    const/4 v4, 0x2

    new-array v4, v4, [Ljava/lang/String;

    aput-object p1, v4, v1

    const/4 p1, 0x1

    aput-object p2, v4, p1

    invoke-virtual {v3, v2, v4}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object p2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_3
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 47
    :try_start_1
    sget-object v0, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V

    if-eqz p2, :cond_1

    .line 48
    invoke-interface {p2}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    if-eqz v0, :cond_1

    if-eqz p2, :cond_0

    .line 56
    :try_start_2
    invoke-interface {p2}, Landroid/database/Cursor;->close()V

    goto :goto_0

    :catch_0
    move-exception p2

    goto :goto_1

    .line 58
    :cond_0
    :goto_0
    sget-object p2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p2}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    goto :goto_2

    :goto_1
    :try_start_3
    const-string v0, "SkinInfoSqliteManager"

    .line 60
    invoke-static {v0, p2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_2

    .line 49
    :goto_2
    monitor-exit p0

    return p1

    :cond_1
    if-eqz p2, :cond_2

    .line 56
    :try_start_4
    invoke-interface {p2}, Landroid/database/Cursor;->close()V

    goto :goto_3

    :catch_1
    move-exception p1

    goto :goto_4

    .line 58
    :cond_2
    :goto_3
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1
    .catchall {:try_start_4 .. :try_end_4} :catchall_2

    goto :goto_9

    :goto_4
    :try_start_5
    const-string p2, "SkinInfoSqliteManager"

    .line 60
    :goto_5
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_2

    goto :goto_9

    :catchall_0
    move-exception p1

    move-object v0, p2

    goto :goto_a

    :catch_2
    move-exception p1

    move-object v0, p2

    goto :goto_6

    :catchall_1
    move-exception p1

    goto :goto_a

    :catch_3
    move-exception p1

    :goto_6
    :try_start_6
    const-string p2, "SkinInfoSqliteManager"

    .line 52
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_1

    if-eqz v0, :cond_3

    .line 56
    :try_start_7
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    goto :goto_7

    :catch_4
    move-exception p1

    goto :goto_8

    .line 58
    :cond_3
    :goto_7
    sget-object p1, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_4
    .catchall {:try_start_7 .. :try_end_7} :catchall_2

    goto :goto_9

    :goto_8
    :try_start_8
    const-string p2, "SkinInfoSqliteManager"
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    goto :goto_5

    .line 63
    :goto_9
    monitor-exit p0

    return v1

    :goto_a
    if-eqz v0, :cond_4

    .line 56
    :try_start_9
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    goto :goto_b

    :catchall_2
    move-exception p1

    goto :goto_e

    :catch_5
    move-exception p2

    goto :goto_c

    .line 58
    :cond_4
    :goto_b
    sget-object p2, Lcom/moji/appwidget/skin/SkinInfoSqliteManager;->a:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {p2}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_5
    .catchall {:try_start_9 .. :try_end_9} :catchall_2

    goto :goto_d

    :goto_c
    :try_start_a
    const-string v0, "SkinInfoSqliteManager"

    .line 60
    invoke-static {v0, p2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 62
    :goto_d
    throw p1
    :try_end_a
    .catchall {:try_start_a .. :try_end_a} :catchall_2

    .line 41
    :goto_e
    monitor-exit p0

    throw p1
.end method
