ReminderSQLiteHelper.smali

.class Lcom/cm/reminder/db/ReminderSQLiteHelper;
.super Landroid/database/sqlite/SQLiteOpenHelper;
.source "ReminderSQLiteHelper.java"


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 5

    .prologue
    .line 139
    const-string/jumbo v0, "reminder.db"

    const/4 v1, 0x0

    const/4 v2, 0x2

    invoke-direct {p0, p1, v0, v1, v2}, Landroid/database/sqlite/SQLiteOpenHelper;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;I)V

    .line 140
    return-void
.end method


# virtual methods
.method public onCreate(Landroid/database/sqlite/SQLiteDatabase;)V
    .registers 3

    .prologue
    .line 144
    const-string v0, "CREATE TABLE if not exists reminder_repeat (_id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT,remark TEXT,create_time INTEGER,first_execute INTEGER,repeat_time INTEGER,end_time INTEGER DEFAULT (0),repeat_type INTEGER DEFAULT (0),habit_id INTEGER DEFAULT (0),cycle_type INTEGER DEFAULT (0),cycle_days INTEGER DEFAULT (0),next_execute_time INTEGER DEFAULT (0),total_count INTEGER DEFAULT (0),habit_type INTEGER DEFAULT (0),completed_count INTEGER DEFAULT (0));"

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

    .line 145
    const-string v0, "CREATE TABLE if not exists reminder_repeat_event (task_id INTEGER,event_time INTEGER,execute_time INTEGER,event INTEGER);"

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

    .line 146
    const-string v0, "CREATE TABLE if not exists reminder_once (_id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT,remark TEXT,create_time INTEGER,execute_time INTEGER,habit_id INTEGER DEFAULT (0),habit_type INTEGER DEFAULT (0),is_complete INTEGER DEFAULT (0));"

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

    .line 147
    const-string v0, "CREATE TABLE if not exists reminder_repeat_modify (_id INTEGER PRIMARY KEY AUTOINCREMENT, reminder_id INTEGER,execute_time INTEGER,origin_execute_time INTEGER,title TEXT,remark TEXT);"

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

    .line 148
    const-string v0, "CREATE TABLE IF NOT EXISTS alarm_reminder_event(_id INTEGER PRIMARY KEY AUTOINCREMENT, reminder_id INTEGER,execute_time INTEGER,origin_execute_time INTEGER,status INTEGER,repeat_type INTEGER,calendar_id INTEGER,calendar_event_id INTEGER);"

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

    .line 149
    return-void
.end method

.method public onUpgrade(Landroid/database/sqlite/SQLiteDatabase;II)V
    .registers 5

    .prologue
    .line 153
    const/4 v0, 0x1

    if-ne p2, v0, :cond_10

    const/4 v0, 0x2

    if-ne p3, v0, :cond_10

    .line 154
    const-string v0, "DROP TABLE IF EXISTS alarm_reminder_log"

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

    .line 155
    const-string v0, "CREATE TABLE IF NOT EXISTS alarm_reminder_event(_id INTEGER PRIMARY KEY AUTOINCREMENT, reminder_id INTEGER,execute_time INTEGER,origin_execute_time INTEGER,status INTEGER,repeat_type INTEGER,calendar_id INTEGER,calendar_event_id INTEGER);"

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

    .line 157
    :cond_10
    return-void
.end method