diff --git a/src/Notes-master/src/net/micode/notes/data/Contact.java b/src/Notes-master/src/net/micode/notes/data/Contact.java index d97ac5d..ab1a2e3 100644 --- a/src/Notes-master/src/net/micode/notes/data/Contact.java +++ b/src/Notes-master/src/net/micode/notes/data/Contact.java @@ -16,6 +16,7 @@ package net.micode.notes.data; + import android.content.Context; import android.database.Cursor; import android.provider.ContactsContract.CommonDataKinds.Phone; diff --git a/src/Notes-master/src/net/micode/notes/data/Notes.java b/src/Notes-master/src/net/micode/notes/data/Notes.java index f240604..fd2a890 100644 --- a/src/Notes-master/src/net/micode/notes/data/Notes.java +++ b/src/Notes-master/src/net/micode/notes/data/Notes.java @@ -7,15 +7,9 @@ * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package net.micode.notes.data; - import android.net.Uri; public class Notes { public static final String AUTHORITY = "micode_notes"; @@ -23,7 +17,6 @@ public class Notes { public static final int TYPE_NOTE = 0; public static final int TYPE_FOLDER = 1; public static final int TYPE_SYSTEM = 2; - /** * Following IDs are system folders' identifiers * {@link Notes#ID_ROOT_FOLDER } is default folder @@ -68,7 +61,7 @@ public class Notes { */ public static final String ID = "_id"; - /** + /* * The parent's id for note or folder *
Type: INTEGER (long)
*/ @@ -80,7 +73,7 @@ public class Notes { */ public static final String CREATED_DATE = "created_date"; - /** + /* * Latest modified date *Type: INTEGER (long)
*/ diff --git a/src/Notes-master/src/net/micode/notes/data/NotesDatabaseHelper.java b/src/Notes-master/src/net/micode/notes/data/NotesDatabaseHelper.java index ffe5d57..8da891c 100644 --- a/src/Notes-master/src/net/micode/notes/data/NotesDatabaseHelper.java +++ b/src/Notes-master/src/net/micode/notes/data/NotesDatabaseHelper.java @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package net.micode.notes.data; diff --git a/src/Notes-master/src/net/micode/notes/data/NotesProvider.java b/src/Notes-master/src/net/micode/notes/data/NotesProvider.java index edb0a60..1ff6a6d 100644 --- a/src/Notes-master/src/net/micode/notes/data/NotesProvider.java +++ b/src/Notes-master/src/net/micode/notes/data/NotesProvider.java @@ -15,8 +15,6 @@ */ package net.micode.notes.data; - - import android.app.SearchManager; import android.content.ContentProvider; import android.content.ContentUris; diff --git a/src/Notes-master/src/net/micode/notes/gtask/data/MetaData.java b/src/Notes-master/src/net/micode/notes/gtask/data/MetaData.java index 4f3e688..97818aa 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/data/MetaData.java +++ b/src/Notes-master/src/net/micode/notes/gtask/data/MetaData.java @@ -13,38 +13,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.micode.notes.gtask.data; - import android.database.Cursor; import android.util.Log; - import net.micode.notes.tool.GTaskStringUtils; - import org.json.JSONException; import org.json.JSONObject; - public class MetaData extends Task { /* - - * 功能描述:得到类的简写名称存入字符串TAG中 - - * 实现过程:调用getSimpleName ()函数 + 功能描述:得到类的简写名称存入字符串TAG中 + 实现过程:调用getSimpleName ()函数 */ - private final static String TAG = MetaData.class.getSimpleName(); private String mRelatedGid = null; /* - * 功能描述:设置数据,即生成元数据库 - * 实现过程:调用JSONObject库函数put (),Task类中的setNotes ()和setName ()函数 - * 参数注解: + 功能描述:设置数据,即生成元数据库 + 实现过程:调用JSONObject库函数put (),Task类中的setNotes ()和setName ()函数 + 参数注解: */ public void setMeta(String gid, JSONObject metaInfo) - { - //对函数块进行注释 + {//对函数块进行注释 try { metaInfo.put(GTaskStringUtils.META_HEAD_GTASK_ID, gid); /* @@ -94,13 +85,10 @@ public class MetaData extends Task { } } } - /* - * 功能描述:使用本地json数据对象设置元数据内容,一般不会用到,若用到,则抛出异常 - - */ + /*功能描述:使用本地json数据对象设置元数据内容,一般不会用到,若用到,则抛出异常*/ @Override - public void setContentByLocalJSON(JSONObject js) { + public void setContentByLocalJSON(JSONObject js) { // this function should not be called throw new IllegalAccessError("MetaData:setContentByLocalJSON should not be called"); @@ -111,9 +99,6 @@ public class MetaData extends Task { /* * 功能描述:从元数据内容中获取本地json对象,一般不会用到,若用到,则抛出异常 */ - - - @Override public JSONObject getLocalJSONFromContent() { throw new IllegalAccessError("MetaData:getLocalJSONFromContent should not be called"); /* diff --git a/src/Notes-master/src/net/micode/notes/gtask/data/Node.java b/src/Notes-master/src/net/micode/notes/gtask/data/Node.java index 93b94a7..17405dc 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/data/Node.java +++ b/src/Notes-master/src/net/micode/notes/gtask/data/Node.java @@ -1,29 +1,11 @@ -/* - * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package net.micode.notes.gtask.data; - import android.database.Cursor; - import org.json.JSONObject; /** * 应该是同步操作的基础数据类型,定义了相关指示同步操作的常量 * 关键字:abstract */ - public abstract class Node { //定义了各种用于表征同步状态的常量 public static final int SYNC_ACTION_NONE = 0;// 本地和云端都无可更新内容(即本地和云端内容一致) diff --git a/src/Notes-master/src/net/micode/notes/gtask/data/SqlData.java b/src/Notes-master/src/net/micode/notes/gtask/data/SqlData.java index f8f7c2a..2a0c1b4 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/data/SqlData.java +++ b/src/Notes-master/src/net/micode/notes/gtask/data/SqlData.java @@ -14,8 +14,6 @@ * limitations under the License. */ - - /* * Description:用于支持小米便签最底层的数据库相关操作,和sqlnote的关系上是子集关系,即data是note的子集(节点)。 * SqlData其实就是也就是所谓数据中的数据 diff --git a/src/Notes-master/src/net/micode/notes/gtask/data/SqlNote.java b/src/Notes-master/src/net/micode/notes/gtask/data/SqlNote.java index 2adf26b..ba89c30 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/data/SqlNote.java +++ b/src/Notes-master/src/net/micode/notes/gtask/data/SqlNote.java @@ -1,21 +1,3 @@ -/* - * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - - package net.micode.notes.gtask.data; @@ -33,14 +15,10 @@ import net.micode.notes.data.Notes.NoteColumns; import net.micode.notes.gtask.exception.ActionFailureException; import net.micode.notes.tool.GTaskStringUtils; import net.micode.notes.tool.ResourceParser; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; - import java.util.ArrayList; - - public class SqlNote { private static final String TAG = SqlNote.class.getSimpleName(); diff --git a/src/Notes-master/src/net/micode/notes/gtask/data/Task.java b/src/Notes-master/src/net/micode/notes/gtask/data/Task.java index 64aacd0..6b9e0bb 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/data/Task.java +++ b/src/Notes-master/src/net/micode/notes/gtask/data/Task.java @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package net.micode.notes.gtask.data; @@ -26,12 +11,9 @@ import net.micode.notes.data.Notes.DataConstants; import net.micode.notes.data.Notes.NoteColumns; import net.micode.notes.gtask.exception.ActionFailureException; import net.micode.notes.tool.GTaskStringUtils; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; - - public class Task extends Node { private static final String TAG = Task.class.getSimpleName(); @@ -53,7 +35,6 @@ public class Task extends Node { mParent = null;//当前Task所在的TaskList mMetaInfo = null; } - public JSONObject getCreateAction(int actionId) { JSONObject js = new JSONObject(); diff --git a/src/Notes-master/src/net/micode/notes/gtask/data/TaskList.java b/src/Notes-master/src/net/micode/notes/gtask/data/TaskList.java index fe77c6f..a25bf96 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/data/TaskList.java +++ b/src/Notes-master/src/net/micode/notes/gtask/data/TaskList.java @@ -77,7 +77,7 @@ public class TaskList extends Node { return js; } - /* (non-Javadoc) + /* * @see net.micode.notes.gtask.data.Node#getUpdateAction(int) * 生成并返回一个包含了一定数据的JSONObject实体 */ @@ -107,10 +107,8 @@ public class TaskList extends Node { e.printStackTrace(); throw new ActionFailureException("fail to generate tasklist-update jsonobject"); } - return js; } - public void setContentByRemoteJSON(JSONObject js) { if (js != null) { try { @@ -136,7 +134,6 @@ public class TaskList extends Node { } } } - public void setContentByLocalJSON(JSONObject js) { if (js == null || !js.has(GTaskStringUtils.META_HEAD_NOTE)) { Log.w(TAG, "setContentByLocalJSON: nothing is avaiable"); @@ -164,7 +161,6 @@ public class TaskList extends Node { e.printStackTrace(); } } - public JSONObject getLocalJSONFromContent() { try { JSONObject js = new JSONObject(); @@ -233,7 +229,7 @@ public class TaskList extends Node { } /** - * @param task + * @return 返回值为是否成功添加任务。 * 功能:在当前任务表末尾添加新的任务。 */ diff --git a/src/Notes-master/src/net/micode/notes/gtask/exception/ActionFailureException.java b/src/Notes-master/src/net/micode/notes/gtask/exception/ActionFailureException.java index 706732f..daa262b 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/exception/ActionFailureException.java +++ b/src/Notes-master/src/net/micode/notes/gtask/exception/ActionFailureException.java @@ -14,14 +14,11 @@ * limitations under the License. */ - - /* * Description:支持小米便签运行过程中的运行异常处理。 */ package net.micode.notes.gtask.exception; - public class ActionFailureException extends RuntimeException { private static final long serialVersionUID = 4425249765923293627L; /* @@ -43,7 +40,6 @@ public class ActionFailureException extends RuntimeException { public ActionFailureException(String paramString) { super(paramString); } - public ActionFailureException(String paramString, Throwable paramThrowable) { super(paramString, paramThrowable); } diff --git a/src/Notes-master/src/net/micode/notes/gtask/exception/NetworkFailureException.java b/src/Notes-master/src/net/micode/notes/gtask/exception/NetworkFailureException.java index a0a2409..bad50b8 100644 --- a/src/Notes-master/src/net/micode/notes/gtask/exception/NetworkFailureException.java +++ b/src/Notes-master/src/net/micode/notes/gtask/exception/NetworkFailureException.java @@ -1,20 +1,3 @@ -/* - * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - /* * Description:支持小米便签运行过程中的网络异常处理。 @@ -29,11 +12,11 @@ public class NetworkFailureException extends Exception { * serialVersionUID作用是序列化时保持版本的兼容性,即在版本升级时反序列化仍保持对象的唯一性。 * Made By Cuican */ - + public NetworkFailureException() { super(); } - + /* * 在JAVA类中使用super来引用父类的成分,用this来引用当前对象. * 如果一个类从另外一个类继承,我们new这个子类的实例对象的时候,这个子类对象里面会有一个父类对象。 @@ -45,7 +28,6 @@ public class NetworkFailureException extends Exception { public NetworkFailureException(String paramString) { super(paramString); } - public NetworkFailureException(String paramString, Throwable paramThrowable) { super(paramString, paramThrowable); }