示例#1
0
 /**
  * 添加到程序所里面
  *
  * @param packageName 包名
  */
 public void add(String packageName) {
   SQLiteDatabase db = helper.getWritableDatabase();
   ContentValues values = new ContentValues();
   values.put("packagename", packageName);
   db.insert("info", null, values);
   db.close();
 }
示例#2
0
 /**
  * 从程序锁里面删除当前的包
  *
  * @param packageName
  */
 public void delete(String packageName) {
   SQLiteDatabase db = helper.getWritableDatabase();
   db.delete("info", "packagename=?", new String[] {packageName});
   db.close();
 }