// Path: taskmanagermaster/src/com/kongderui/taskmanager/TaskManagerApp.java
// public class TaskManagerApp extends Application {
// 	
// 	private static Context mContext = null;
// 	private static TaskManagerApp mAppSelf = null;
// 
// 	public TaskManagerApp() {
// 		mAppSelf = this;
// 	}
// 
// 	public static Context getmContext() {
// 		return mContext;
// 	}
// 	
// 	
// 
// 	public static Context getAppContext() {
// 		if(mContext == null) {
// 			mContext = mAppSelf.getApplicationContext();
// 		}
// 		return mContext;
// 	}
// 	
// 	
// 	
// 	
// 	
// 
// }
// 
// Path: taskmanagermaster/src/com/kongderui/taskmanager/util/TMLog.java
// public class TMLog {
// 	
// 	public static void e(String msg) {
// 		Log.e("TMError:", msg);
// 	}
// 	
// 	public static void i(String msg) {
// 		Log.i("TMInfo:", msg);
// 	}
// 	
// 	public static void i(int msg) {
// 		Log.i("TMInfo:", msg+"");
// 	}
// 	
// 	public static void w(String msg) {
// 		Log.w("TMWarning:", msg);
// 	}
// 	
// 	public static void d(String msg) {
// 		Log.d("TMDebug:", msg);
// 	}
// 
// }


import java.util.concurrent.atomic.AtomicInteger;
import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import com.kongderui.taskmanager.TaskManagerApp;
import com.kongderui.taskmanager.util.TMLog;
package com.kongderui.taskmanager.db;




public class DBHelper extends SQLiteOpenHelper {
	private static DBHelper mDBHelper = null;

	private static final String DATABASE_TASKMANAGER = "taskmanager.db";
	private static final int DATABASE_VERSION = 1;

	private static final String SQL_CREATE_TASK = "CREATE TABLE IF NOT EXISTS task (_id INTEGER PRIMARY KEY AUTOINCREMENT,  title VARCHAR(200), content VARCHAR(500), type integer, starttime integer, endtime integer, duration integer, extra text)";
	
	private SQLiteDatabase mDatabase = null;
	private final AtomicInteger mOpenCounter = new AtomicInteger();
	
	@Override
	public SQLiteDatabase getWritableDatabase() {
		return openDatabase();
	}
	
	public DBHelper(Context context) {
// Path: taskmanagermaster/src/com/kongderui/taskmanager/TaskManagerApp.java
// public class TaskManagerApp extends Application {
// 	
// 	private static Context mContext = null;
// 	private static TaskManagerApp mAppSelf = null;
// 
// 	public TaskManagerApp() {
// 		mAppSelf = this;
// 	}
// 
// 	public static Context getmContext() {
// 		return mContext;
// 	}
// 	
// 	
// 
// 	public static Context getAppContext() {
// 		if(mContext == null) {
// 			mContext = mAppSelf.getApplicationContext();
// 		}
// 		return mContext;
// 	}
// 	
// 	
// 	
// 	
// 	
// 
// }
// 
// Path: taskmanagermaster/src/com/kongderui/taskmanager/util/TMLog.java
// public class TMLog {
// 	
// 	public static void e(String msg) {
// 		Log.e("TMError:", msg);
// 	}
// 	
// 	public static void i(String msg) {
// 		Log.i("TMInfo:", msg);
// 	}
// 	
// 	public static void i(int msg) {
// 		Log.i("TMInfo:", msg+"");
// 	}
// 	
// 	public static void w(String msg) {
// 		Log.w("TMWarning:", msg);
// 	}
// 	
// 	public static void d(String msg) {
// 		Log.d("TMDebug:", msg);
// 	}
// 
// }


// Path: taskmanagermaster/src/com/kongderui/taskmanager/db/DBHelper.java
import java.util.concurrent.atomic.AtomicInteger;
import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import com.kongderui.taskmanager.TaskManagerApp;
import com.kongderui.taskmanager.util.TMLog;

package com.kongderui.taskmanager.db;




public class DBHelper extends SQLiteOpenHelper {
	private static DBHelper mDBHelper = null;

	private static final String DATABASE_TASKMANAGER = "taskmanager.db";
	private static final int DATABASE_VERSION = 1;

	private static final String SQL_CREATE_TASK = "CREATE TABLE IF NOT EXISTS task (_id INTEGER PRIMARY KEY AUTOINCREMENT,  title VARCHAR(200), content VARCHAR(500), type integer, starttime integer, endtime integer, duration integer, extra text)";
	
	private SQLiteDatabase mDatabase = null;
	private final AtomicInteger mOpenCounter = new AtomicInteger();
	
	@Override
	public SQLiteDatabase getWritableDatabase() {
		return openDatabase();
	}
	
	public DBHelper(Context context) {
		super(context, DATABASE_TASKMANAGER, null, DATABASE_VERSION);