diff --git a/doc/新建 文本文档.txt b/doc/新建 文本文档.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/小米便签/src/MiNote/.gitignore b/src/MiNote/.gitignore similarity index 100% rename from src/小米便签/src/MiNote/.gitignore rename to src/MiNote/.gitignore diff --git a/src/小米便签/src/MiNote/.idea/.gitignore b/src/MiNote/.idea/.gitignore similarity index 100% rename from src/小米便签/src/MiNote/.idea/.gitignore rename to src/MiNote/.idea/.gitignore diff --git a/src/小米便签/src/MiNote/.idea/compiler.xml b/src/MiNote/.idea/compiler.xml similarity index 100% rename from src/小米便签/src/MiNote/.idea/compiler.xml rename to src/MiNote/.idea/compiler.xml diff --git a/src/小米便签/src/MiNote/.idea/deploymentTargetDropDown.xml b/src/MiNote/.idea/deploymentTargetDropDown.xml similarity index 100% rename from src/小米便签/src/MiNote/.idea/deploymentTargetDropDown.xml rename to src/MiNote/.idea/deploymentTargetDropDown.xml diff --git a/src/小米便签/src/MiNote/.idea/gradle.xml b/src/MiNote/.idea/gradle.xml similarity index 100% rename from src/小米便签/src/MiNote/.idea/gradle.xml rename to src/MiNote/.idea/gradle.xml diff --git a/src/小米便签/src/MiNote/.idea/migrations.xml b/src/MiNote/.idea/migrations.xml similarity index 100% rename from src/小米便签/src/MiNote/.idea/migrations.xml rename to src/MiNote/.idea/migrations.xml diff --git a/src/小米便签/src/MiNote/.idea/misc.xml b/src/MiNote/.idea/misc.xml similarity index 100% rename from src/小米便签/src/MiNote/.idea/misc.xml rename to src/MiNote/.idea/misc.xml diff --git a/src/小米便签/src/MiNote/app/.gitignore b/src/MiNote/app/.gitignore similarity index 100% rename from src/小米便签/src/MiNote/app/.gitignore rename to src/MiNote/app/.gitignore diff --git a/src/小米便签/src/MiNote/app/build.gradle.kts b/src/MiNote/app/build.gradle.kts similarity index 100% rename from src/小米便签/src/MiNote/app/build.gradle.kts rename to src/MiNote/app/build.gradle.kts diff --git a/src/小米便签/src/MiNote/app/proguard-rules.pro b/src/MiNote/app/proguard-rules.pro similarity index 100% rename from src/小米便签/src/MiNote/app/proguard-rules.pro rename to src/MiNote/app/proguard-rules.pro diff --git a/src/小米便签/src/MiNote/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java b/src/MiNote/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java rename to src/MiNote/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java diff --git a/src/小米便签/src/MiNote/app/src/main/AndroidManifest.xml b/src/MiNote/app/src/main/AndroidManifest.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/AndroidManifest.xml rename to src/MiNote/app/src/main/AndroidManifest.xml diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/Contact.java b/src/MiNote/app/src/main/java/net/micode/notes/data/Contact.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/Contact.java rename to src/MiNote/app/src/main/java/net/micode/notes/data/Contact.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/Notes.java b/src/MiNote/app/src/main/java/net/micode/notes/data/Notes.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/Notes.java rename to src/MiNote/app/src/main/java/net/micode/notes/data/Notes.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java b/src/MiNote/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java rename to src/MiNote/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/NotesProvider.java b/src/MiNote/app/src/main/java/net/micode/notes/data/NotesProvider.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/data/NotesProvider.java rename to src/MiNote/app/src/main/java/net/micode/notes/data/NotesProvider.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/MetaData.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/MetaData.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/MetaData.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/data/MetaData.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Node.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Node.java similarity index 71% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Node.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Node.java index 63950e0..f232893 100644 --- a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Node.java +++ b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Node.java @@ -19,24 +19,26 @@ package net.micode.notes.gtask.data; import android.database.Cursor; import org.json.JSONObject; - +/* ↓ RainFo-何奕霖代码阅读(第465-565行)(标记为R)↓ */ +//R:抽象类Node,定义了Node类中需要实现的方法,并且定义了Node类中需要用到的常量,并且定义了Node类中需要用到的变量 public abstract class Node { + //R:定义一个标记远程笔记未发生更新的标志值 public static final int SYNC_ACTION_NONE = 0; - + //R:定义一个标记笔记已被添加的标志值 public static final int SYNC_ACTION_ADD_REMOTE = 1; - + //R:定义一个标记笔记已被添加在本地的标志值 public static final int SYNC_ACTION_ADD_LOCAL = 2; - + //R:定义一个标记笔记已被删除的远程端的标志值 public static final int SYNC_ACTION_DEL_REMOTE = 3; - + //R:定义一个标记笔记已被删除的本地的标志值 public static final int SYNC_ACTION_DEL_LOCAL = 4; - + //R:定义一个标记笔记内容已被删除的标志值 public static final int SYNC_ACTION_UPDATE_REMOTE = 5; - + //R:定义一个标记远程笔记id已被删除的标志值 public static final int SYNC_ACTION_UPDATE_LOCAL = 6; - + //R:定义一个标记本地笔记内容和远端笔记内容冲突的标志值 public static final int SYNC_ACTION_UPDATE_CONFLICT = 7; - + //R:定义一个标记笔记id发生错误的标志值 public static final int SYNC_ACTION_ERROR = 8; private String mGid; @@ -46,14 +48,14 @@ public abstract class Node { private long mLastModified; private boolean mDeleted; - + //R:构造函数置所有值为默认 public Node() { mGid = null; mName = ""; mLastModified = 0; mDeleted = false; } - + //R:以下函数用于set和get所有变量数据 public abstract JSONObject getCreateAction(int actionId); public abstract JSONObject getUpdateAction(int actionId); @@ -97,5 +99,5 @@ public abstract class Node { public boolean getDeleted() { return this.mDeleted; } - + /* ↑ RainFo-何奕霖代码阅读(第465-565行)(标记为R)↑ */ } diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlData.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlData.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlData.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlData.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Task.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Task.java similarity index 69% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Task.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Task.java index 6a19454..489c55a 100644 --- a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Task.java +++ b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/Task.java @@ -31,8 +31,9 @@ import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; - +/* ↓ RainFo-何奕霖代码阅读(第114-464行)(标记为R)↓ */ public class Task extends Node { + //R:获取标记码TAG,用于打印日志 private static final String TAG = Task.class.getSimpleName(); private boolean mCompleted; @@ -44,7 +45,7 @@ public class Task extends Node { private Task mPriorSibling; private TaskList mParent; - + //R:构造函数用于对各个变量置初值 public Task() { super(); mCompleted = false; @@ -53,120 +54,152 @@ public class Task extends Node { mParent = null; mMetaInfo = null; } - + //R:以下所有函数都使用了GTaskStringUtils工具类所包含的变量,代码视效好,且易于修改 + //R:继承Node函数中的函数,用于创建一个创建任务的JSONObject,并返回js public JSONObject getCreateAction(int actionId) { + //R:创建一个JSONObject JSONObject js = new JSONObject(); try { // action_type + //R:添加动作类型 js.put(GTaskStringUtils.GTASK_JSON_ACTION_TYPE, GTaskStringUtils.GTASK_JSON_ACTION_TYPE_CREATE); // action_id + //R:添加动作ID js.put(GTaskStringUtils.GTASK_JSON_ACTION_ID, actionId); // index + //R:添加动作索引 js.put(GTaskStringUtils.GTASK_JSON_INDEX, mParent.getChildTaskIndex(this)); // entity_delta + //R:构造一个子对象,并添加任务名、创建者ID、实体类型、实体备注(如果有) JSONObject entity = new JSONObject(); + //R:添加任务名 entity.put(GTaskStringUtils.GTASK_JSON_NAME, getName()); + //R:添加创建者ID,默认为null entity.put(GTaskStringUtils.GTASK_JSON_CREATOR_ID, "null"); + //R:添加实体类型 entity.put(GTaskStringUtils.GTASK_JSON_ENTITY_TYPE, GTaskStringUtils.GTASK_JSON_TYPE_TASK); + //R:添加实体备注(如果有) if (getNotes() != null) { entity.put(GTaskStringUtils.GTASK_JSON_NOTES, getNotes()); } + //R:将entity对象添加到js中 js.put(GTaskStringUtils.GTASK_JSON_ENTITY_DELTA, entity); - + //R:下面代码将其他属性一并添加到js中 // parent_id + //R:添加父任务ID js.put(GTaskStringUtils.GTASK_JSON_PARENT_ID, mParent.getGid()); // dest_parent_type + //R:添加目标父类型 js.put(GTaskStringUtils.GTASK_JSON_DEST_PARENT_TYPE, GTaskStringUtils.GTASK_JSON_TYPE_GROUP); // list_id + //R:添加列表ID js.put(GTaskStringUtils.GTASK_JSON_LIST_ID, mParent.getGid()); // prior_sibling_id + //R:添加前一兄弟任务ID(如果有) if (mPriorSibling != null) { js.put(GTaskStringUtils.GTASK_JSON_PRIOR_SIBLING_ID, mPriorSibling.getGid()); } - + //R:编码的一个良好习惯就是每段代码都要给个catch来捕获错误 } catch (JSONException e) { Log.e(TAG, e.toString()); e.printStackTrace(); throw new ActionFailureException("fail to generate task-create jsonobject"); } - + //R:返回js return js; } - + //R:继承Node中的抽象函数,该函数用于创建一个更新任务的JSONObject,并返回js public JSONObject getUpdateAction(int actionId) { + //R:创建一个JSONObject JSONObject js = new JSONObject(); try { // action_type + //R:添加动作类型到js js.put(GTaskStringUtils.GTASK_JSON_ACTION_TYPE, GTaskStringUtils.GTASK_JSON_ACTION_TYPE_UPDATE); // action_id + //R:添加动作ID到js js.put(GTaskStringUtils.GTASK_JSON_ACTION_ID, actionId); // id + //R:添加任务ID到js js.put(GTaskStringUtils.GTASK_JSON_ID, getGid()); // entity_delta + //R:构造一个子对象entity,并添加任务名、实体备注(如果有)、是否删除状态进入其中 JSONObject entity = new JSONObject(); + //R:添加任务名 entity.put(GTaskStringUtils.GTASK_JSON_NAME, getName()); + //R:添加实体备注(如果有) if (getNotes() != null) { entity.put(GTaskStringUtils.GTASK_JSON_NOTES, getNotes()); } + //R:添加是否删除状态 entity.put(GTaskStringUtils.GTASK_JSON_DELETED, getDeleted()); + //R:将entity对象添加到js中 js.put(GTaskStringUtils.GTASK_JSON_ENTITY_DELTA, entity); - + //R:捕获异常(如果有)并显示错误信息 } catch (JSONException e) { Log.e(TAG, e.toString()); e.printStackTrace(); throw new ActionFailureException("fail to generate task-update jsonobject"); } - + //R:返回js return js; } - + //R:继承Node中的抽象函数,该函数根据传入的JSONObject对象设置目标对象的属性 public void setContentByRemoteJSON(JSONObject js) { + //R:严谨——判断js是否为空 if (js != null) { try { // id + //R:如果js包含id属性,设置当前对象的gid属性 if (js.has(GTaskStringUtils.GTASK_JSON_ID)) { setGid(js.getString(GTaskStringUtils.GTASK_JSON_ID)); } // last_modified + //R:如果js包含last_modified属性,设置当前对象的lastModified属性 if (js.has(GTaskStringUtils.GTASK_JSON_LAST_MODIFIED)) { setLastModified(js.getLong(GTaskStringUtils.GTASK_JSON_LAST_MODIFIED)); } // name + //R:如果js包含name属性,设置当前对象的name属性 if (js.has(GTaskStringUtils.GTASK_JSON_NAME)) { setName(js.getString(GTaskStringUtils.GTASK_JSON_NAME)); } // notes + //R:如果js包含notes属性,设置当前对象的notes属性 if (js.has(GTaskStringUtils.GTASK_JSON_NOTES)) { setNotes(js.getString(GTaskStringUtils.GTASK_JSON_NOTES)); } // deleted + //R:如果js包含deleted属性,设置当前对象的deleted属性 if (js.has(GTaskStringUtils.GTASK_JSON_DELETED)) { setDeleted(js.getBoolean(GTaskStringUtils.GTASK_JSON_DELETED)); } // completed + //R:如果js包含completed属性,设置当前对象的completed属性 if (js.has(GTaskStringUtils.GTASK_JSON_COMPLETED)) { setCompleted(js.getBoolean(GTaskStringUtils.GTASK_JSON_COMPLETED)); } + //R:捕获异常(如果有)并显示错误信息 } catch (JSONException e) { Log.e(TAG, e.toString()); e.printStackTrace(); @@ -174,46 +207,52 @@ public class Task extends Node { } } } - + //R:继承Node中的抽象函数,该函数根据传入的JSONObject对象设置内容 public void setContentByLocalJSON(JSONObject js) { + //R:通过检查JSON对象是否有效,来设置一些提示内容并在脚本窗口中显示 if (js == null || !js.has(GTaskStringUtils.META_HEAD_NOTE) || !js.has(GTaskStringUtils.META_HEAD_DATA)) { Log.w(TAG, "setContentByLocalJSON: nothing is avaiable"); } try { + //R:提取JSON中的备注信息和数据数组 JSONObject note = js.getJSONObject(GTaskStringUtils.META_HEAD_NOTE); JSONArray dataArray = js.getJSONArray(GTaskStringUtils.META_HEAD_DATA); - + //R:检查备注信息是否为笔记类型(即是否正确) if (note.getInt(NoteColumns.TYPE) != Notes.TYPE_NOTE) { + //R:显示错误信息并返回空 Log.e(TAG, "invalid type"); return; } - + //R:遍历数据数组,找到第一个MIME类型为笔记的数据 for (int i = 0; i < dataArray.length(); i++) { JSONObject data = dataArray.getJSONObject(i); + //R:如果找到,则设置当前对象的name属性并退出循环 if (TextUtils.equals(data.getString(DataColumns.MIME_TYPE), DataConstants.NOTE)) { setName(data.getString(DataColumns.CONTENT)); break; } } - + //R:捕获异常(如果有)并显示错误信息,打印堆栈 } catch (JSONException e) { Log.e(TAG, e.toString()); e.printStackTrace(); } } - + //R:继承Node中的抽象函数,该函数根据当前对象的内容生成JSON对象 public JSONObject getLocalJSONFromContent() { + //R:获取对象名称 String name = getName(); try { + //R:若检查到mMetaInfo为空且名称不为空,则创建一个新的JSON结构并填充数据返回 if (mMetaInfo == null) { // new task created from web if (name == null) { Log.w(TAG, "the note seems to be an empty one"); return null; } - + //R:创建JSON各类对象,并依次填充数据 JSONObject js = new JSONObject(); JSONObject note = new JSONObject(); JSONArray dataArray = new JSONArray(); @@ -225,10 +264,11 @@ public class Task extends Node { js.put(GTaskStringUtils.META_HEAD_NOTE, note); return js; } else { + //R:mMetaInfo不为空,从中解析出note和dataArray数组 // synced task JSONObject note = mMetaInfo.getJSONObject(GTaskStringUtils.META_HEAD_NOTE); JSONArray dataArray = mMetaInfo.getJSONArray(GTaskStringUtils.META_HEAD_DATA); - + //R:遍历dataArray,找到第一个MIME类型为笔记的数据,并修改其内容 for (int i = 0; i < dataArray.length(); i++) { JSONObject data = dataArray.getJSONObject(i); if (TextUtils.equals(data.getString(DataColumns.MIME_TYPE), DataConstants.NOTE)) { @@ -236,51 +276,57 @@ public class Task extends Node { break; } } - + //R:更新note对象中的类型字段后直接返回mMetaInfo note.put(NoteColumns.TYPE, Notes.TYPE_NOTE); return mMetaInfo; } + //R:捕获异常(如果有)并显示错误信息,打印堆栈,并返回空 } catch (JSONException e) { Log.e(TAG, e.toString()); e.printStackTrace(); return null; } } - + //R:设置当前对象的metaInfo属性 public void setMetaInfo(MetaData metaData) { + //R:若metaData不为空且notes属性不为空,则尝试将notes转换为JSON对象,并赋值给mMetaInfo if (metaData != null && metaData.getNotes() != null) { try { mMetaInfo = new JSONObject(metaData.getNotes()); + //R:若转换失败,则将mMetaInfo设置为空,在脚本界面打印相关信息 } catch (JSONException e) { Log.w(TAG, e.toString()); mMetaInfo = null; } } } - + //R:继承Node中的抽象函数,该函数根据传入的Cursor对象获取同步动作 public int getSyncAction(Cursor c) { try { + //R:获取并检查对象的metaInfo,检查mMetaInfo是否存在且包含笔记头部信息 JSONObject noteInfo = null; if (mMetaInfo != null && mMetaInfo.has(GTaskStringUtils.META_HEAD_NOTE)) { + //R:包含即提取metaInfo中的笔记头部信息 noteInfo = mMetaInfo.getJSONObject(GTaskStringUtils.META_HEAD_NOTE); } - + //R:若不存在,则打印错误信息并返回更新动作 if (noteInfo == null) { Log.w(TAG, "it seems that note meta has been deleted"); return SYNC_ACTION_UPDATE_REMOTE; } - + //R:提取metaInfo中的笔记ID并与noteInfo中的笔记ID对比 if (!noteInfo.has(NoteColumns.ID)) { + //R:不匹配则打印信息并返回更新动作 Log.w(TAG, "remote note id seems to be deleted"); return SYNC_ACTION_UPDATE_LOCAL; } - + //R:判断c中的ID是否与noteInfo中的ID一致 // validate the note id now if (c.getLong(SqlNote.ID_COLUMN) != noteInfo.getLong(NoteColumns.ID)) { Log.w(TAG, "note id doesn't match"); return SYNC_ACTION_UPDATE_LOCAL; } - + //R:读取并判断本地是否有更新 if (c.getInt(SqlNote.LOCAL_MODIFIED_COLUMN) == 0) { // there is no local update if (c.getLong(SqlNote.SYNC_ID_COLUMN) == getLastModified()) { @@ -291,11 +337,13 @@ public class Task extends Node { return SYNC_ACTION_UPDATE_LOCAL; } } else { + //R:本地有更新,判断是否与gtask id一致 // validate gtask id if (!c.getString(SqlNote.GTASK_ID_COLUMN).equals(getGid())) { Log.e(TAG, "gtask id doesn't match"); return SYNC_ACTION_ERROR; } + //R:一致时,检查远程最后修改时间是否与本地一致 if (c.getLong(SqlNote.SYNC_ID_COLUMN) == getLastModified()) { // local modification only return SYNC_ACTION_UPDATE_REMOTE; @@ -303,19 +351,21 @@ public class Task extends Node { return SYNC_ACTION_UPDATE_CONFLICT; } } + //R:捕获异常并打印错误信息,打印堆栈 } catch (Exception e) { Log.e(TAG, e.toString()); e.printStackTrace(); } - + //R:返回错误动作 return SYNC_ACTION_ERROR; } - + //R:判断当前对象是否值得保存 public boolean isWorthSaving() { + //R:直接通过return,若metaInfo不为空,notes或name不为空,则返回true return mMetaInfo != null || (getName() != null && getName().trim().length() > 0) || (getNotes() != null && getNotes().trim().length() > 0); } - + //R:以下函数用于set和get相关值 public void setCompleted(boolean completed) { this.mCompleted = completed; } @@ -347,5 +397,5 @@ public class Task extends Node { public TaskList getParent() { return this.mParent; } - + /* ↑ RainFo-何奕霖代码阅读(第114-464行)(标记为R)↑ */ } diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/TaskList.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/TaskList.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/data/TaskList.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/data/TaskList.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java similarity index 78% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java index d2b4082..c4a5870 100644 --- a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java +++ b/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java @@ -47,20 +47,21 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Map; - +/* ↓ RainFo-何奕霖代码阅读(第567-1363行)(标记为R)↓ */ public class GTaskManager { + //R: 创建一个用于显示提示信息的TAG提示段 private static final String TAG = GTaskManager.class.getSimpleName(); - + //R: 创建一个显示同步成功的常量,用于返回给调用者 public static final int STATE_SUCCESS = 0; - + //R: 创建一个显示网络连接失败的常量,用于返回给调用者 public static final int STATE_NETWORK_ERROR = 1; - + //R: 创建一个显示内部错误常量,用于返回给调用者 public static final int STATE_INTERNAL_ERROR = 2; - + //R: 创建一个显示同步正在进行的常量,用于返回给调用者 public static final int STATE_SYNC_IN_PROGRESS = 3; - + //R: 创建一个显示同步被取消的常量,用于返回给调用者 public static final int STATE_SYNC_CANCELLED = 4; - + //R: 创建一个同步机制下检查多重实例的常量,用于返回给调用者 private static GTaskManager mInstance = null; private Activity mActivity; @@ -88,6 +89,7 @@ public class GTaskManager { private HashMap mNidToGid; private GTaskManager() { + //R: 初始化上述创建的成员变量 mSyncing = false; mCancelled = false; mGTaskListHashMap = new HashMap(); @@ -98,24 +100,26 @@ public class GTaskManager { mGidToNid = new HashMap(); mNidToGid = new HashMap(); } - + //R:检查同步机制下是否只有一个实例 public static synchronized GTaskManager getInstance() { if (mInstance == null) { mInstance = new GTaskManager(); } return mInstance; } - + //R:设置同步机制下,用于同步数据的Activity public synchronized void setActivityContext(Activity activity) { // used for getting authtoken mActivity = activity; } - + //R:一个用于同步数据的函数 public int sync(Context context, GTaskASyncTask asyncTask) { + //R:检查同步机制下,是否已经有一个实例在运行 if (mSyncing) { Log.d(TAG, "Sync is in progress"); return STATE_SYNC_IN_PROGRESS; } + //R:初始化上下文和内容解析器,并设置同步标志为真 mContext = context; mContentResolver = mContext.getContentResolver(); mSyncing = true; @@ -130,21 +134,22 @@ public class GTaskManager { try { GTaskClient client = GTaskClient.getInstance(); client.resetUpdateArray(); - + //R:尝试登陆谷歌服务 // login google task if (!mCancelled) { if (!client.login(mActivity)) { throw new NetworkFailureException("login google task failed"); } } - + //R:获取谷歌任务的列表 // get the task list from google asyncTask.publishProgess(mContext.getString(R.string.sync_progress_init_list)); initGTaskList(); - + //R:获取谷歌任务列表并发布进度信息 // do content sync work asyncTask.publishProgess(mContext.getString(R.string.sync_progress_syncing)); syncContent(); + //R:捕获错误并返回对应标志值 } catch (NetworkFailureException e) { Log.e(TAG, e.toString()); return STATE_NETWORK_ERROR; @@ -156,6 +161,7 @@ public class GTaskManager { e.printStackTrace(); return STATE_INTERNAL_ERROR; } finally { + //R:最后清除临时变量 mGTaskListHashMap.clear(); mGTaskHashMap.clear(); mMetaHashMap.clear(); @@ -164,29 +170,31 @@ public class GTaskManager { mNidToGid.clear(); mSyncing = false; } - + //R:返回同步状态 return mCancelled ? STATE_SYNC_CANCELLED : STATE_SUCCESS; } - + //R:用于初始化谷歌任务列表的函数 private void initGTaskList() throws NetworkFailureException { if (mCancelled) return; GTaskClient client = GTaskClient.getInstance(); try { + //R:获取谷歌任务列表JSON数据 JSONArray jsTaskLists = client.getTaskLists(); - + //R:初始化元数据列表 (mMetaList),处理每个任务列表项 // init meta list first mMetaList = null; for (int i = 0; i < jsTaskLists.length(); i++) { + //R:遍历以获取JSON数据 JSONObject object = jsTaskLists.getJSONObject(i); String gid = object.getString(GTaskStringUtils.GTASK_JSON_ID); String name = object.getString(GTaskStringUtils.GTASK_JSON_NAME); - + //R:如果任务列表名称为[MIUI_Notes]METADATA,则创建一个元数据列表并加载它 if (name .equals(GTaskStringUtils.MIUI_FOLDER_PREFFIX + GTaskStringUtils.FOLDER_META)) { mMetaList = new TaskList(); mMetaList.setContentByRemoteJSON(object); - + //加载该列表下的所有元数据条目,并存储在mMetaList和mMetaHashMap中 // load meta data JSONArray jsMetas = client.getTaskList(gid); for (int j = 0; j < jsMetas.length(); j++) { @@ -202,7 +210,7 @@ public class GTaskManager { } } } - + //R:如果元数据列表不存在,则创建一个新列表并存储在服务器上 // create meta list if not existed if (mMetaList == null) { mMetaList = new TaskList(); @@ -210,13 +218,13 @@ public class GTaskManager { + GTaskStringUtils.FOLDER_META); GTaskClient.getInstance().createTaskList(mMetaList); } - + //R:初始化其他的任务列表,处理每个任务列表项 // init task list for (int i = 0; i < jsTaskLists.length(); i++) { JSONObject object = jsTaskLists.getJSONObject(i); String gid = object.getString(GTaskStringUtils.GTASK_JSON_ID); String name = object.getString(GTaskStringUtils.GTASK_JSON_NAME); - + //R:如果任务列表名称以[MIUI_Notes]开头,并且不是METADATA,则创建一个任务列表对象,并将其添加到mGTaskListHashMap和mGTaskHashMap中 if (name.startsWith(GTaskStringUtils.MIUI_FOLDER_PREFFIX) && !name.equals(GTaskStringUtils.MIUI_FOLDER_PREFFIX + GTaskStringUtils.FOLDER_META)) { @@ -224,7 +232,7 @@ public class GTaskManager { tasklist.setContentByRemoteJSON(object); mGTaskListHashMap.put(gid, tasklist); mGTaskHashMap.put(gid, tasklist); - + //R:加载该列表下的所有任务,并将其添加到任务列表对象中(需要确定是否WorthSaving) // load tasks JSONArray jsTasks = client.getTaskList(gid); for (int j = 0; j < jsTasks.length(); j++) { @@ -232,6 +240,7 @@ public class GTaskManager { gid = object.getString(GTaskStringUtils.GTASK_JSON_ID); Task task = new Task(); task.setContentByRemoteJSON(object); + //R:如果任务WorthSaving,则将其添加到任务列表对象中 if (task.isWorthSaving()) { task.setMetaInfo(mMetaHashMap.get(gid)); tasklist.addChildTask(task); @@ -240,46 +249,52 @@ public class GTaskManager { } } } + //R:捕获错误 } catch (JSONException e) { Log.e(TAG, e.toString()); e.printStackTrace(); throw new ActionFailureException("initGTaskList: handing JSONObject failed"); } } - + //R:一个比较核心的函数,用于同步线上线下的笔记内容 private void syncContent() throws NetworkFailureException { int syncType; Cursor c = null; String gid; Node node; - + //R:将本地不需要的笔记删除记录清空 mLocalDeleteIdMap.clear(); if (mCancelled) { return; } - + //R:查询并同步不在回收站中的本地删除笔记 // for local deleted note try { + //R:查询数据库中类型不是系统类型且父级ID不是回收站ID的笔记 c = mContentResolver.query(Notes.CONTENT_NOTE_URI, SqlNote.PROJECTION_NOTE, "(type<>? AND parent_id=?)", new String[] { String.valueOf(Notes.TYPE_SYSTEM), String.valueOf(Notes.ID_TRASH_FOLER) }, null); + //R:遍历查询结果 if (c != null) { while (c.moveToNext()) { gid = c.getString(SqlNote.GTASK_ID_COLUMN); node = mGTaskHashMap.get(gid); if (node != null) { + //R:如果笔记存在于mGTaskHashMap中,则将其从mGTaskHashMap中移除并同步删除 mGTaskHashMap.remove(gid); doContentSync(Node.SYNC_ACTION_DEL_REMOTE, node, c); } - + //R:将笔记ID添加到mLocalDeleteIdMap中 mLocalDeleteIdMap.add(c.getLong(SqlNote.ID_COLUMN)); } } else { + //R:打印警告 Log.w(TAG, "failed to query trash folder"); } } finally { + //R:关闭游标 if (c != null) { c.close(); c = null; @@ -288,7 +303,7 @@ public class GTaskManager { // sync folder first syncFolder(); - + //R:查询并同步数据库中存在的笔记 // for note existing in database try { c = mContentResolver.query(Notes.CONTENT_NOTE_URI, SqlNote.PROJECTION_NOTE, @@ -300,15 +315,18 @@ public class GTaskManager { gid = c.getString(SqlNote.GTASK_ID_COLUMN); node = mGTaskHashMap.get(gid); if (node != null) { + //R:如果笔记存在于mGTaskHashMap中,则将其从mGTaskHashMap中移除并同步更新 mGTaskHashMap.remove(gid); mGidToNid.put(gid, c.getLong(SqlNote.ID_COLUMN)); mNidToGid.put(c.getLong(SqlNote.ID_COLUMN), gid); syncType = node.getSyncAction(c); } else { + //R:如果笔记不存在于mGTaskHashMap中,则判断笔记是否为本地添加 if (c.getString(SqlNote.GTASK_ID_COLUMN).trim().length() == 0) { // local add syncType = Node.SYNC_ACTION_ADD_REMOTE; } else { + //R:如果笔记没有远程id,则判断笔记为远程删除,设置同步动作为本地删除 // remote delete syncType = Node.SYNC_ACTION_DEL_LOCAL; } @@ -325,7 +343,7 @@ public class GTaskManager { c = null; } } - + //R:遍历剩余的笔记,执行本地添加操作 // go through remaining items Iterator> iter = mGTaskHashMap.entrySet().iterator(); while (iter.hasNext()) { @@ -333,7 +351,7 @@ public class GTaskManager { node = entry.getValue(); doContentSync(Node.SYNC_ACTION_ADD_LOCAL, node, null); } - + //R:如果同步未取消,则删除本地删除笔记 // mCancelled can be set by another thread, so we neet to check one by // one // clear local delete table @@ -350,7 +368,7 @@ public class GTaskManager { } } - + //R:该函数用于同步便签系统文件夹信息 private void syncFolder() throws NetworkFailureException { Cursor c = null; String gid; @@ -360,7 +378,7 @@ public class GTaskManager { if (mCancelled) { return; } - + //R:查询数据库中的根文件夹信息,并与远程服务器同步更新或添加 // for root folder try { c = mContentResolver.query(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, @@ -370,10 +388,12 @@ public class GTaskManager { gid = c.getString(SqlNote.GTASK_ID_COLUMN); node = mGTaskHashMap.get(gid); if (node != null) { + //R:如果根文件夹存在于mGTaskHashMap中,则将其从mGTaskHashMap中移除并同步更新 mGTaskHashMap.remove(gid); mGidToNid.put(gid, (long) Notes.ID_ROOT_FOLDER); mNidToGid.put((long) Notes.ID_ROOT_FOLDER, gid); // for system folder, only update remote name if necessary + //R:同步更新远程文件夹名称 if (!node.getName().equals( GTaskStringUtils.MIUI_FOLDER_PREFFIX + GTaskStringUtils.FOLDER_DEFAULT)) doContentSync(Node.SYNC_ACTION_UPDATE_REMOTE, node, c); @@ -389,7 +409,7 @@ public class GTaskManager { c = null; } } - + //R:查询数据库中呼叫记录文件夹信息,并与远程服务器同步更新或添加 // for call-note folder try { c = mContentResolver.query(Notes.CONTENT_NOTE_URI, SqlNote.PROJECTION_NOTE, "(_id=?)", @@ -398,6 +418,7 @@ public class GTaskManager { }, null); if (c != null) { if (c.moveToNext()) { + //R:如果呼叫记录文件夹存在于数据库中,则将其从mGTaskHashMap中移除并同步更新 gid = c.getString(SqlNote.GTASK_ID_COLUMN); node = mGTaskHashMap.get(gid); if (node != null) { @@ -406,6 +427,7 @@ public class GTaskManager { mNidToGid.put((long) Notes.ID_CALL_RECORD_FOLDER, gid); // for system folder, only update remote name if // necessary + //R:同步更新远程文件夹名称 if (!node.getName().equals( GTaskStringUtils.MIUI_FOLDER_PREFFIX + GTaskStringUtils.FOLDER_CALL_NOTE)) @@ -423,7 +445,7 @@ public class GTaskManager { c = null; } } - + //R:查询数据库中其他文件夹信息,并与远程服务器同步更新或添加 // for local existing folders try { c = mContentResolver.query(Notes.CONTENT_NOTE_URI, SqlNote.PROJECTION_NOTE, @@ -431,15 +453,18 @@ public class GTaskManager { String.valueOf(Notes.TYPE_FOLDER), String.valueOf(Notes.ID_TRASH_FOLER) }, NoteColumns.TYPE + " DESC"); if (c != null) { + //R:遍历数据库中的文件夹,执行同步操作 while (c.moveToNext()) { gid = c.getString(SqlNote.GTASK_ID_COLUMN); node = mGTaskHashMap.get(gid); if (node != null) { + //R:如果文件夹存在于mGTaskHashMap中,则将其从mGTaskHashMap中移除并同步更新 mGTaskHashMap.remove(gid); mGidToNid.put(gid, c.getLong(SqlNote.ID_COLUMN)); mNidToGid.put(c.getLong(SqlNote.ID_COLUMN), gid); syncType = node.getSyncAction(c); } else { + //R:如果文件夹不存在于mGTaskHashMap中,则判断是否为远程删除 if (c.getString(SqlNote.GTASK_ID_COLUMN).trim().length() == 0) { // local add syncType = Node.SYNC_ACTION_ADD_REMOTE; @@ -459,10 +484,11 @@ public class GTaskManager { c = null; } } - + //R:遍历远程服务器中不存在的文件夹,执行同步操作 // for remote add folders Iterator> iter = mGTaskListHashMap.entrySet().iterator(); while (iter.hasNext()) { + //R:遍历mGTaskListHashMap,判断是否为远程文件夹 Map.Entry entry = iter.next(); gid = entry.getKey(); node = entry.getValue(); @@ -475,45 +501,55 @@ public class GTaskManager { if (!mCancelled) GTaskClient.getInstance().commitUpdate(); } - + //R:该函数用于同步本地数据库与远程服务器之间的内容差距 private void doContentSync(int syncType, Node node, Cursor c) throws NetworkFailureException { if (mCancelled) { return; } - + //R:根据传入的syncType,执行相应的同步操作 MetaData meta; switch (syncType) { + //R:添加本地节点 case Node.SYNC_ACTION_ADD_LOCAL: addLocalNode(node); break; + //R:添加远程节点 case Node.SYNC_ACTION_ADD_REMOTE: addRemoteNode(node, c); break; + //R:更新本地节点 case Node.SYNC_ACTION_DEL_LOCAL: meta = mMetaHashMap.get(c.getString(SqlNote.GTASK_ID_COLUMN)); + //R:如果节点存在,则删除该节点 if (meta != null) { GTaskClient.getInstance().deleteNode(meta); } mLocalDeleteIdMap.add(c.getLong(SqlNote.ID_COLUMN)); break; + //R:删除远程节点 case Node.SYNC_ACTION_DEL_REMOTE: meta = mMetaHashMap.get(node.getGid()); + //R:如果节点存在,则删除该节点 if (meta != null) { GTaskClient.getInstance().deleteNode(meta); } GTaskClient.getInstance().deleteNode(node); break; + //R:更新本地节点 case Node.SYNC_ACTION_UPDATE_LOCAL: updateLocalNode(node, c); break; + //R:更新远程节点 case Node.SYNC_ACTION_UPDATE_REMOTE: updateRemoteNode(node, c); break; + //R:更新冲突节点 case Node.SYNC_ACTION_UPDATE_CONFLICT: // merging both modifications maybe a good idea // right now just use local update simply updateRemoteNode(node, c); break; + //R:其他情况 case Node.SYNC_ACTION_NONE: break; case Node.SYNC_ACTION_ERROR: @@ -521,29 +557,34 @@ public class GTaskManager { throw new ActionFailureException("unkown sync action type"); } } - + //R:该函数用于将一个Node对象添加到本地数据库,并更新相关元数据 private void addLocalNode(Node node) throws NetworkFailureException { if (mCancelled) { return; } - + //R:如果节点为TaskList,则创建一个默认的根目录,否则创建一个新节点 SqlNote sqlNote; if (node instanceof TaskList) { + //R:如果节点为默认根目录,则创建一个默认的根目录,否则创建一个新节点 if (node.getName().equals( GTaskStringUtils.MIUI_FOLDER_PREFFIX + GTaskStringUtils.FOLDER_DEFAULT)) { sqlNote = new SqlNote(mContext, Notes.ID_ROOT_FOLDER); + //R:设置节点的ID为Notes.ID_ROOT_FOLDER } else if (node.getName().equals( GTaskStringUtils.MIUI_FOLDER_PREFFIX + GTaskStringUtils.FOLDER_CALL_NOTE)) { sqlNote = new SqlNote(mContext, Notes.ID_CALL_RECORD_FOLDER); + //R:设置节点的ID为Notes.ID_CALL_RECORD_FOLDER } else { sqlNote = new SqlNote(mContext); sqlNote.setContent(node.getLocalJSONFromContent()); sqlNote.setParentId(Notes.ID_ROOT_FOLDER); } + //R:将节点添加到本地数据库 } else { sqlNote = new SqlNote(mContext); JSONObject js = node.getLocalJSONFromContent(); try { + //R:如果节点为Note,则判断是否为默认笔记,否则创建一个新节点 if (js.has(GTaskStringUtils.META_HEAD_NOTE)) { JSONObject note = js.getJSONObject(GTaskStringUtils.META_HEAD_NOTE); if (note.has(NoteColumns.ID)) { @@ -554,12 +595,13 @@ public class GTaskManager { } } } - + //R:如果节点为Data,则判断是否为默认数据,否则创建一个新节点 if (js.has(GTaskStringUtils.META_HEAD_DATA)) { JSONArray dataArray = js.getJSONArray(GTaskStringUtils.META_HEAD_DATA); for (int i = 0; i < dataArray.length(); i++) { JSONObject data = dataArray.getJSONObject(i); if (data.has(DataColumns.ID)) { + //R:如果数据ID存在,则判断是否在数据表中存在,如果不存在,则创建一个新数据ID long dataId = data.getLong(DataColumns.ID); if (DataUtils.existInDataDatabase(mContentResolver, dataId)) { // the data id is not available, have to create @@ -570,12 +612,14 @@ public class GTaskManager { } } + //R:捕获错误 } catch (JSONException e) { Log.w(TAG, e.toString()); e.printStackTrace(); } + //R:设置节点内容 sqlNote.setContent(js); - + //R:设置节点的父ID Long parentId = mGidToNid.get(((Task) node).getParent().getGid()); if (parentId == null) { Log.e(TAG, "cannot find task's parent id locally"); @@ -583,62 +627,63 @@ public class GTaskManager { } sqlNote.setParentId(parentId.longValue()); } - + //R:提交节点 // create the local node sqlNote.setGtaskId(node.getGid()); sqlNote.commit(false); - + //R:更新本地节点 // update gid-nid mapping mGidToNid.put(node.getGid(), sqlNote.getId()); mNidToGid.put(sqlNote.getId(), node.getGid()); - + //R:提交节点 // update meta updateRemoteMeta(node.getGid(), sqlNote); } - + //R:该函数用于更新本地节点 private void updateLocalNode(Node node, Cursor c) throws NetworkFailureException { if (mCancelled) { return; } - + //R:如果节点为TaskList,则创建一个默认的根目录,否则创建一个新节点 SqlNote sqlNote; // update the note locally sqlNote = new SqlNote(mContext, c); sqlNote.setContent(node.getLocalJSONFromContent()); - + //R:设置节点的父ID Long parentId = (node instanceof Task) ? mGidToNid.get(((Task) node).getParent().getGid()) : new Long(Notes.ID_ROOT_FOLDER); if (parentId == null) { Log.e(TAG, "cannot find task's parent id locally"); throw new ActionFailureException("cannot update local node"); } + //R:提交节点 sqlNote.setParentId(parentId.longValue()); sqlNote.commit(true); // update meta info updateRemoteMeta(node.getGid(), sqlNote); } - + //R:该函数用于添加远程节点 private void addRemoteNode(Node node, Cursor c) throws NetworkFailureException { if (mCancelled) { return; } - + //R:如果节点为TaskList,则创建一个默认的根目录,否则创建一个新节点 SqlNote sqlNote = new SqlNote(mContext, c); Node n; - + //R:如果节点为Note,则判断是否为默认笔记,否则创建一个新节点 // update remotely if (sqlNote.isNoteType()) { Task task = new Task(); task.setContentByLocalJSON(sqlNote.getContent()); - + //R:将节点添加到任务列表中 String parentGid = mNidToGid.get(sqlNote.getParentId()); if (parentGid == null) { Log.e(TAG, "cannot find task's parent tasklist"); throw new ActionFailureException("cannot add remote task"); } mGTaskListHashMap.get(parentGid).addChildTask(task); - + //R:创建一个新任务 GTaskClient.getInstance().createTask(task); n = (Node) task; @@ -646,7 +691,7 @@ public class GTaskManager { updateRemoteMeta(task.getGid(), sqlNote); } else { TaskList tasklist = null; - + //R:如果节点为Data,则判断是否为默认数据,否则创建一个新节点 // we need to skip folder if it has already existed String folderName = GTaskStringUtils.MIUI_FOLDER_PREFFIX; if (sqlNote.getId() == Notes.ID_ROOT_FOLDER) @@ -655,22 +700,24 @@ public class GTaskManager { folderName += GTaskStringUtils.FOLDER_CALL_NOTE; else folderName += sqlNote.getSnippet(); - + //R:遍历任务列表 Iterator> iter = mGTaskListHashMap.entrySet().iterator(); + while (iter.hasNext()) { Map.Entry entry = iter.next(); String gid = entry.getKey(); TaskList list = entry.getValue(); - + //R:如果任务列表名称与默认名称相同,则跳过 if (list.getName().equals(folderName)) { tasklist = list; + //R:删除任务列表 if (mGTaskHashMap.containsKey(gid)) { mGTaskHashMap.remove(gid); } break; } } - + //R:如果任务列表为空,则创建一个新任务列表 // no match we can add now if (tasklist == null) { tasklist = new TaskList(); @@ -680,7 +727,7 @@ public class GTaskManager { } n = (Node) tasklist; } - + //R:提交节点并更新本地笔记 // update local note sqlNote.setGtaskId(n.getGid()); sqlNote.commit(false); @@ -691,18 +738,18 @@ public class GTaskManager { mGidToNid.put(n.getGid(), sqlNote.getId()); mNidToGid.put(sqlNote.getId(), n.getGid()); } - + //R:该函数用于更新远程节点 private void updateRemoteNode(Node node, Cursor c) throws NetworkFailureException { if (mCancelled) { return; } - + //R:创建一个新节点 SqlNote sqlNote = new SqlNote(mContext, c); // update remotely node.setContentByLocalJSON(sqlNote.getContent()); GTaskClient.getInstance().addUpdateNode(node); - + //R:提交节点 // update meta updateRemoteMeta(node.getGid(), sqlNote); @@ -710,33 +757,36 @@ public class GTaskManager { if (sqlNote.isNoteType()) { Task task = (Task) node; TaskList preParentList = task.getParent(); - + //R:获取当前父节点 String curParentGid = mNidToGid.get(sqlNote.getParentId()); if (curParentGid == null) { + //R:如果找不到父节点,则抛出异常 Log.e(TAG, "cannot find task's parent tasklist"); throw new ActionFailureException("cannot update remote task"); } TaskList curParentList = mGTaskListHashMap.get(curParentGid); - + //R:如果父节点发生变化,则移动任务 if (preParentList != curParentList) { preParentList.removeChildTask(task); curParentList.addChildTask(task); GTaskClient.getInstance().moveTask(task, preParentList, curParentList); } } - + //R:提交节点 // clear local modified flag sqlNote.resetLocalModified(); sqlNote.commit(true); } - + //R:该函数用于更新远程元数据 private void updateRemoteMeta(String gid, SqlNote sqlNote) throws NetworkFailureException { if (sqlNote != null && sqlNote.isNoteType()) { MetaData metaData = mMetaHashMap.get(gid); + //R:如果元数据不为空,则更新元数据,否则创建一个新元数据 if (metaData != null) { metaData.setMeta(gid, sqlNote.getContent()); GTaskClient.getInstance().addUpdateNode(metaData); } else { + //R:如果为空,创建一个新元数据 metaData = new MetaData(); metaData.setMeta(gid, sqlNote.getContent()); mMetaList.addChildTask(metaData); @@ -745,12 +795,12 @@ public class GTaskManager { } } } - + //R:该函数用于刷新本地同步ID private void refreshLocalSyncId() throws NetworkFailureException { if (mCancelled) { return; } - + //R:清空所有哈希表 // get the latest gtask list mGTaskHashMap.clear(); mGTaskListHashMap.clear(); @@ -759,21 +809,25 @@ public class GTaskManager { Cursor c = null; try { + //R:查询所有笔记 c = mContentResolver.query(Notes.CONTENT_NOTE_URI, SqlNote.PROJECTION_NOTE, "(type<>? AND parent_id<>?)", new String[] { String.valueOf(Notes.TYPE_SYSTEM), String.valueOf(Notes.ID_TRASH_FOLER) }, NoteColumns.TYPE + " DESC"); if (c != null) { while (c.moveToNext()) { + //R:获取笔记的GID String gid = c.getString(SqlNote.GTASK_ID_COLUMN); Node node = mGTaskHashMap.get(gid); if (node != null) { + //R:如果存在,则删除,并更新本地笔记 mGTaskHashMap.remove(gid); ContentValues values = new ContentValues(); values.put(NoteColumns.SYNC_ID, node.getLastModified()); mContentResolver.update(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, c.getLong(SqlNote.ID_COLUMN)), values, null, null); } else { + //R:如果找不到,抛出异常 Log.e(TAG, "something is missed"); throw new ActionFailureException( "some local items don't have gid after sync"); @@ -789,12 +843,13 @@ public class GTaskManager { } } } - + //R:该函数用于同步账号内容 public String getSyncAccount() { return GTaskClient.getInstance().getSyncAccount().name; } - + //R:该函数用于取消同步,通过设置好的标志位mCancelled来决定引用该函数的线程是否继续执行 public void cancelSync() { mCancelled = true; } + /* ↑ RainFo-何奕霖代码阅读(第567-1363行)(标记为R)↑ */ } diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java b/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java rename to src/MiNote/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/model/Note.java b/src/MiNote/app/src/main/java/net/micode/notes/model/Note.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/model/Note.java rename to src/MiNote/app/src/main/java/net/micode/notes/model/Note.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/model/WorkingNote.java b/src/MiNote/app/src/main/java/net/micode/notes/model/WorkingNote.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/model/WorkingNote.java rename to src/MiNote/app/src/main/java/net/micode/notes/model/WorkingNote.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/BackupUtils.java b/src/MiNote/app/src/main/java/net/micode/notes/tool/BackupUtils.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/BackupUtils.java rename to src/MiNote/app/src/main/java/net/micode/notes/tool/BackupUtils.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/DataUtils.java b/src/MiNote/app/src/main/java/net/micode/notes/tool/DataUtils.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/DataUtils.java rename to src/MiNote/app/src/main/java/net/micode/notes/tool/DataUtils.java diff --git a/src/MiNote/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java b/src/MiNote/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java new file mode 100644 index 0000000..f095485 --- /dev/null +++ b/src/MiNote/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java @@ -0,0 +1,115 @@ +/* + * 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.tool; + +/* ↓ RainFo-何奕霖代码阅读(第1-113行)(标记为R)↓ */ +//R:此为命名用工具类,该种编写风格可以使得后期字符串的输入更为方便,且字符串需要修改时直接改动该工具类的对应参数即可 +public class GTaskStringUtils { + //R:先固定规定一个类中万用的键名,用于标记用户发出的行为,以便在后期往JSONOnject中添加键值对,方便调用 + public final static String GTASK_JSON_ACTION_ID = "action_id"; + //R:先固定规定一个类中万用的键名,用于记录用户发出的一系列动作,以便在后期往JSONOnject中添加键值对,方便调用 + public final static String GTASK_JSON_ACTION_LIST = "action_list"; + //R:先固定规定一个类中万用的键名,标记应用获取动作的类型,以便添加键值对 + public final static String GTASK_JSON_ACTION_TYPE = "action_type"; + //R:定义一个创建项目动作时的键值,与上面ACTION_TYPE一同被以键值对的方式引用,便于使用和修改 + public final static String GTASK_JSON_ACTION_TYPE_CREATE = "create"; + //R:定义一个获取所有任务的指令键值,与上面ACTION_TYPE一同被以键值对的方式引用,便于使用和修改 + public final static String GTASK_JSON_ACTION_TYPE_GETALL = "get_all"; + //R:定义一个移动任务动作时的键值,与上面ACTION_TYPE一同被以键值对的方式引用,便于使用和修改 + public final static String GTASK_JSON_ACTION_TYPE_MOVE = "move"; + //R:定义一个更新任务动作时的键值,与上面ACTION_TYPE一同被以键值对的方式引用,便于使用和修改 + public final static String GTASK_JSON_ACTION_TYPE_UPDATE = "update"; + //R:定义一个用于命名创建者ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_CREATOR_ID = "creator_id"; + //R:该静态字符串未被使用 + public final static String GTASK_JSON_CHILD_ENTITY = "child_entity"; + //R:定义一个用于命名客户端版本号的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_CLIENT_VERSION = "client_version"; + //R:定义一个用于命名是否完成状态的值,适用于检查某函数传入的JSONObject对象中是否包含completed指令,便于使用和修改 + public final static String GTASK_JSON_COMPLETED = "completed"; + //R:该定义未被使用 + public final static String GTASK_JSON_CURRENT_LIST_ID = "current_list_id"; + //R:该定义未被使用 + public final static String GTASK_JSON_DEFAULT_LIST_ID = "default_list_id"; + //R:定义一个用于命名是否删除状态的值,适用于检查某函数传入的JSONObject对象中是否包含deleted指令,便于使用和修改 + public final static String GTASK_JSON_DELETED = "deleted"; + //R:目标任务列表使用的定义名,用于其他函数移动JSON任务至其他父级时命名 + public final static String GTASK_JSON_DEST_LIST = "dest_list"; + //R:定义一个用于命名任务前往目标父级ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_DEST_PARENT = "dest_parent"; + //R:定义一个用于命名任务前往目标父级类型,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_DEST_PARENT_TYPE = "dest_parent_type"; + //R:定义一个用于创建任务的JSON对象中实体差异的任务名的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_ENTITY_DELTA = "entity_delta"; + //R:定义一个用于创建任务的JSON对象中实体差异中实体类型的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_ENTITY_TYPE = "entity_type"; + //R:定义一个用于创建任务列表的函数中是否读取已删除任务的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_GET_DELETED = "get_deleted"; + //R:定义一个用于创建任务列表的JSON对象中,用于标记任务ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_ID = "id"; + //R:定义一个用于创建任务列表的JSON对象中,用于标记任务索引的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_INDEX = "index"; + //R:定义一个检查传入的的JSON对象中,是否存在last_modified,便于使用和修改 + public final static String GTASK_JSON_LAST_MODIFIED = "last_modified"; + //R:该定义未被使用 + public final static String GTASK_JSON_LATEST_SYNC_POINT = "latest_sync_point"; + //R:定义一个用于创建任务列表的JSON对象中,用于标记任务列表ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_LIST_ID = "list_id"; + //R:定义一个从字符串中被解析出来JSON对象中,用于标记其中JSON数组的键名,便于使用和修改 + public final static String GTASK_JSON_LISTS = "lists"; + //R:定义一个用于创建任务的JSON对象中实体差异中任务名的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_NAME = "name"; + //R:定义一个用于创建任务的函数中,解析响应结果后接收新创建任务的ID,便于使用和修改 + public final static String GTASK_JSON_NEW_ID = "new_id"; + //R:定义一个用于创建任务的JSON对象中实体差异中实体备注的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_NOTES = "notes"; + //R:定义一个用于创建任务的JSON对象中设置父任务ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_PARENT_ID = "parent_id"; + //R:定义一个用于创建任务的JSON对象中设置前一个兄弟节点ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_PRIOR_SIBLING_ID = "prior_sibling_id"; + //R:定义一个用于创建任务的函数中,接收响应结果时使用的键名,便于使用和修改 + public final static String GTASK_JSON_RESULTS = "results"; + //R:定义一个用于移动任务的函数中,用于标记任务来源列表ID的键名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_SOURCE_LIST = "source_list"; + //R:定义一个用于获取任务列表的函数中,用于在response中获取任务列表的代表名,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_TASKS = "tasks"; + //R:该定义未被使用 + public final static String GTASK_JSON_TYPE = "type"; + //R:定义一个用于创建任务的JSON对象中设置目标父类型为组,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_TYPE_GROUP = "GROUP"; + //R:定义一个用于创建任务的JSON对象中设置差异实体的实体类型,适用于JSONObject的put()函数中,便于使用和修改 + public final static String GTASK_JSON_TYPE_TASK = "TASK"; + //R:该定义未被使用 + public final static String GTASK_JSON_USER = "user"; + //R:定义一个用于设置本地JSON对象内容时,对类型为文件夹的JSON对象格式化名称并重新设置时使用,便于使用和修改 + public final static String MIUI_FOLDER_PREFFIX = "[MIUI_Notes]"; + //R:定义一个用于设置本地JSON对象内容时,对类型为笔记且其类型更细致时的JSON对象设置名称为默认根文件名称,便于使用和修改 + public final static String FOLDER_DEFAULT = "Default"; + //R:定义一个用于设置本地JSON对象内容时,对类型为笔记且其类型更细致时的JSON对象设置名称为通话记录文件夹名称,便于使用和修改 + public final static String FOLDER_CALL_NOTE = "Call_Note"; + //R:用于标记名称为"META"的文件夹,便于使用和修改 + public final static String FOLDER_META = "METADATA"; + //R:标记一个记录笔记内容的键名,便于使用和修改 + public final static String META_HEAD_GTASK_ID = "meta_gid"; + //R:标记一个记录笔记内容的JSON文件的键名,函数使用其可获取并检查笔记内容,便于使用和修改 + public final static String META_HEAD_NOTE = "meta_note"; + //R:标记一个记录笔记内容的JSON文件的键名,函数使用其来获取嵌套数据并检查,便于使用和修改 + public final static String META_HEAD_DATA = "meta_data"; + //R:标记一个通用的笔记名称 + public final static String META_NOTE_NAME = "[META INFO] DON'T UPDATE AND DELETE"; + /* ↑ RainFo-何奕霖代码阅读(第1-113行)(标记为R)↑ */ +} diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/ResourceParser.java b/src/MiNote/app/src/main/java/net/micode/notes/tool/ResourceParser.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/ResourceParser.java rename to src/MiNote/app/src/main/java/net/micode/notes/tool/ResourceParser.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmReceiver.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmReceiver.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmReceiver.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/AlarmReceiver.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePicker.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePicker.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePicker.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePicker.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/DropdownMenu.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/DropdownMenu.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/DropdownMenu.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/DropdownMenu.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditText.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditText.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditText.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NoteEditText.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteItemData.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteItemData.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NoteItemData.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NoteItemData.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListActivity.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListActivity.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListActivity.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListActivity.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListItem.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListItem.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListItem.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NotesListItem.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java b/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java rename to src/MiNote/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java b/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java rename to src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_2x.java b/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_2x.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_2x.java rename to src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_2x.java diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java b/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java rename to src/MiNote/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java diff --git a/src/小米便签/src/MiNote/app/src/main/res/color/primary_text_dark.xml b/src/MiNote/app/src/main/res/color/primary_text_dark.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/color/primary_text_dark.xml rename to src/MiNote/app/src/main/res/color/primary_text_dark.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/color/secondary_text_dark.xml b/src/MiNote/app/src/main/res/color/secondary_text_dark.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/color/secondary_text_dark.xml rename to src/MiNote/app/src/main/res/color/secondary_text_dark.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/bg_btn_set_color.png b/src/MiNote/app/src/main/res/drawable-hdpi/bg_btn_set_color.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/bg_btn_set_color.png rename to src/MiNote/app/src/main/res/drawable-hdpi/bg_btn_set_color.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/bg_color_btn_mask.png b/src/MiNote/app/src/main/res/drawable-hdpi/bg_color_btn_mask.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/bg_color_btn_mask.png rename to src/MiNote/app/src/main/res/drawable-hdpi/bg_color_btn_mask.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/call_record.png b/src/MiNote/app/src/main/res/drawable-hdpi/call_record.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/call_record.png rename to src/MiNote/app/src/main/res/drawable-hdpi/call_record.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/clock.png b/src/MiNote/app/src/main/res/drawable-hdpi/clock.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/clock.png rename to src/MiNote/app/src/main/res/drawable-hdpi/clock.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/delete.png b/src/MiNote/app/src/main/res/drawable-hdpi/delete.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/delete.png rename to src/MiNote/app/src/main/res/drawable-hdpi/delete.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/dropdown_icon.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/dropdown_icon.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/dropdown_icon.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/dropdown_icon.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_blue.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_blue.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_blue.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_blue.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_green.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_green.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_green.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_green.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_red.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_red.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_red.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_red.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_blue.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_blue.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_blue.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_title_blue.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_green.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_green.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_green.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_title_green.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_red.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_red.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_red.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_title_red.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_white.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_white.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_white.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_title_white.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_yellow.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_yellow.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_title_yellow.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_title_yellow.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_white.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_white.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_white.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_white.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_yellow.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/edit_yellow.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/edit_yellow.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/edit_yellow.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_large.png b/src/MiNote/app/src/main/res/drawable-hdpi/font_large.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_large.png rename to src/MiNote/app/src/main/res/drawable-hdpi/font_large.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_normal.png b/src/MiNote/app/src/main/res/drawable-hdpi/font_normal.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_normal.png rename to src/MiNote/app/src/main/res/drawable-hdpi/font_normal.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_size_selector_bg.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/font_size_selector_bg.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_size_selector_bg.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/font_size_selector_bg.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_small.png b/src/MiNote/app/src/main/res/drawable-hdpi/font_small.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_small.png rename to src/MiNote/app/src/main/res/drawable-hdpi/font_small.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_super.png b/src/MiNote/app/src/main/res/drawable-hdpi/font_super.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/font_super.png rename to src/MiNote/app/src/main/res/drawable-hdpi/font_super.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/icon_app.png b/src/MiNote/app/src/main/res/drawable-hdpi/icon_app.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/icon_app.png rename to src/MiNote/app/src/main/res/drawable-hdpi/icon_app.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_background.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_background.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_background.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_background.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_down.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_down.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_down.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_blue_down.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_middle.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_middle.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_middle.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_blue_middle.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_single.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_single.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_single.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_blue_single.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_up.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_up.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_blue_up.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_blue_up.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_folder.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_folder.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_folder.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_folder.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_footer_bg.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_footer_bg.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_footer_bg.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_footer_bg.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_down.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_green_down.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_down.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_green_down.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_middle.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_green_middle.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_middle.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_green_middle.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_single.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_green_single.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_single.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_green_single.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_up.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_green_up.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_green_up.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_green_up.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_down.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_red_down.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_down.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_red_down.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_middle.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_red_middle.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_middle.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_red_middle.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_single.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_red_single.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_single.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_red_single.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_up.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_red_up.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_red_up.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_red_up.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_down.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_white_down.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_down.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_white_down.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_middle.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_white_middle.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_middle.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_white_middle.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_single.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_white_single.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_single.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_white_single.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_up.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_white_up.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_white_up.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_white_up.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_down.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_down.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_down.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_down.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_middle.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_middle.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_middle.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_middle.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_single.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_single.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_single.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_single.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_up.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_up.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_up.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/list_yellow_up.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/menu_delete.png b/src/MiNote/app/src/main/res/drawable-hdpi/menu_delete.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/menu_delete.png rename to src/MiNote/app/src/main/res/drawable-hdpi/menu_delete.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/menu_move.png b/src/MiNote/app/src/main/res/drawable-hdpi/menu_move.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/menu_move.png rename to src/MiNote/app/src/main/res/drawable-hdpi/menu_move.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/new_note_normal.png b/src/MiNote/app/src/main/res/drawable-hdpi/new_note_normal.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/new_note_normal.png rename to src/MiNote/app/src/main/res/drawable-hdpi/new_note_normal.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/new_note_pressed.png b/src/MiNote/app/src/main/res/drawable-hdpi/new_note_pressed.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/new_note_pressed.png rename to src/MiNote/app/src/main/res/drawable-hdpi/new_note_pressed.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/note_edit_color_selector_panel.png b/src/MiNote/app/src/main/res/drawable-hdpi/note_edit_color_selector_panel.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/note_edit_color_selector_panel.png rename to src/MiNote/app/src/main/res/drawable-hdpi/note_edit_color_selector_panel.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/notification.png b/src/MiNote/app/src/main/res/drawable-hdpi/notification.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/notification.png rename to src/MiNote/app/src/main/res/drawable-hdpi/notification.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/search_result.png b/src/MiNote/app/src/main/res/drawable-hdpi/search_result.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/search_result.png rename to src/MiNote/app/src/main/res/drawable-hdpi/search_result.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/selected.png b/src/MiNote/app/src/main/res/drawable-hdpi/selected.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/selected.png rename to src/MiNote/app/src/main/res/drawable-hdpi/selected.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/title_alert.png b/src/MiNote/app/src/main/res/drawable-hdpi/title_alert.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/title_alert.png rename to src/MiNote/app/src/main/res/drawable-hdpi/title_alert.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/title_bar_bg.9.png b/src/MiNote/app/src/main/res/drawable-hdpi/title_bar_bg.9.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/title_bar_bg.9.png rename to src/MiNote/app/src/main/res/drawable-hdpi/title_bar_bg.9.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_blue.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_blue.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_blue.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_blue.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_green.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_green.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_green.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_green.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_red.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_red.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_red.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_red.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_white.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_white.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_white.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_white.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_yellow.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_yellow.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_yellow.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_2x_yellow.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_blue.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_blue.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_blue.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_blue.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_green.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_green.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_green.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_green.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_red.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_red.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_red.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_red.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_white.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_white.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_white.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_white.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_yellow.png b/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_yellow.png similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_yellow.png rename to src/MiNote/app/src/main/res/drawable-hdpi/widget_4x_yellow.png diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable/ic_launcher_background.xml b/src/MiNote/app/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable/ic_launcher_background.xml rename to src/MiNote/app/src/main/res/drawable/ic_launcher_background.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable/ic_launcher_foreground.xml b/src/MiNote/app/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable/ic_launcher_foreground.xml rename to src/MiNote/app/src/main/res/drawable/ic_launcher_foreground.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/drawable/new_note.xml b/src/MiNote/app/src/main/res/drawable/new_note.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/drawable/new_note.xml rename to src/MiNote/app/src/main/res/drawable/new_note.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/account_dialog_title.xml b/src/MiNote/app/src/main/res/layout/account_dialog_title.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/account_dialog_title.xml rename to src/MiNote/app/src/main/res/layout/account_dialog_title.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/activity_main.xml b/src/MiNote/app/src/main/res/layout/activity_main.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/activity_main.xml rename to src/MiNote/app/src/main/res/layout/activity_main.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/add_account_text.xml b/src/MiNote/app/src/main/res/layout/add_account_text.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/add_account_text.xml rename to src/MiNote/app/src/main/res/layout/add_account_text.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/datetime_picker.xml b/src/MiNote/app/src/main/res/layout/datetime_picker.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/datetime_picker.xml rename to src/MiNote/app/src/main/res/layout/datetime_picker.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/dialog_edit_text.xml b/src/MiNote/app/src/main/res/layout/dialog_edit_text.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/dialog_edit_text.xml rename to src/MiNote/app/src/main/res/layout/dialog_edit_text.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/folder_list_item.xml b/src/MiNote/app/src/main/res/layout/folder_list_item.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/folder_list_item.xml rename to src/MiNote/app/src/main/res/layout/folder_list_item.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/note_edit.xml b/src/MiNote/app/src/main/res/layout/note_edit.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/note_edit.xml rename to src/MiNote/app/src/main/res/layout/note_edit.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/note_edit_list_item.xml b/src/MiNote/app/src/main/res/layout/note_edit_list_item.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/note_edit_list_item.xml rename to src/MiNote/app/src/main/res/layout/note_edit_list_item.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/note_item.xml b/src/MiNote/app/src/main/res/layout/note_item.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/note_item.xml rename to src/MiNote/app/src/main/res/layout/note_item.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/note_list.xml b/src/MiNote/app/src/main/res/layout/note_list.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/note_list.xml rename to src/MiNote/app/src/main/res/layout/note_list.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/note_list_dropdown_menu.xml b/src/MiNote/app/src/main/res/layout/note_list_dropdown_menu.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/note_list_dropdown_menu.xml rename to src/MiNote/app/src/main/res/layout/note_list_dropdown_menu.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/note_list_footer.xml b/src/MiNote/app/src/main/res/layout/note_list_footer.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/note_list_footer.xml rename to src/MiNote/app/src/main/res/layout/note_list_footer.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/settings_header.xml b/src/MiNote/app/src/main/res/layout/settings_header.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/settings_header.xml rename to src/MiNote/app/src/main/res/layout/settings_header.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/widget_2x.xml b/src/MiNote/app/src/main/res/layout/widget_2x.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/widget_2x.xml rename to src/MiNote/app/src/main/res/layout/widget_2x.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/layout/widget_4x.xml b/src/MiNote/app/src/main/res/layout/widget_4x.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/layout/widget_4x.xml rename to src/MiNote/app/src/main/res/layout/widget_4x.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/call_note_edit.xml b/src/MiNote/app/src/main/res/menu/call_note_edit.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/call_note_edit.xml rename to src/MiNote/app/src/main/res/menu/call_note_edit.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/call_record_folder.xml b/src/MiNote/app/src/main/res/menu/call_record_folder.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/call_record_folder.xml rename to src/MiNote/app/src/main/res/menu/call_record_folder.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/note_edit.xml b/src/MiNote/app/src/main/res/menu/note_edit.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/note_edit.xml rename to src/MiNote/app/src/main/res/menu/note_edit.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/note_list.xml b/src/MiNote/app/src/main/res/menu/note_list.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/note_list.xml rename to src/MiNote/app/src/main/res/menu/note_list.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/note_list_dropdown.xml b/src/MiNote/app/src/main/res/menu/note_list_dropdown.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/note_list_dropdown.xml rename to src/MiNote/app/src/main/res/menu/note_list_dropdown.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/note_list_options.xml b/src/MiNote/app/src/main/res/menu/note_list_options.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/note_list_options.xml rename to src/MiNote/app/src/main/res/menu/note_list_options.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/menu/sub_folder.xml b/src/MiNote/app/src/main/res/menu/sub_folder.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/menu/sub_folder.xml rename to src/MiNote/app/src/main/res/menu/sub_folder.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to src/MiNote/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp rename to src/MiNote/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp rename to src/MiNote/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp rename to src/MiNote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp rename to src/MiNote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to src/MiNote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/src/小米便签/src/MiNote/app/src/main/res/raw-zh-rCN/introduction b/src/MiNote/app/src/main/res/raw-zh-rCN/introduction similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/raw-zh-rCN/introduction rename to src/MiNote/app/src/main/res/raw-zh-rCN/introduction diff --git a/src/小米便签/src/MiNote/app/src/main/res/raw/introduction b/src/MiNote/app/src/main/res/raw/introduction similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/raw/introduction rename to src/MiNote/app/src/main/res/raw/introduction diff --git a/src/小米便签/src/MiNote/app/src/main/res/values-night/themes.xml b/src/MiNote/app/src/main/res/values-night/themes.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values-night/themes.xml rename to src/MiNote/app/src/main/res/values-night/themes.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values-zh-rCN/arrays.xml b/src/MiNote/app/src/main/res/values-zh-rCN/arrays.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values-zh-rCN/arrays.xml rename to src/MiNote/app/src/main/res/values-zh-rCN/arrays.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values-zh-rCN/strings.xml b/src/MiNote/app/src/main/res/values-zh-rCN/strings.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values-zh-rCN/strings.xml rename to src/MiNote/app/src/main/res/values-zh-rCN/strings.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values-zh-rTW/arrays.xml b/src/MiNote/app/src/main/res/values-zh-rTW/arrays.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values-zh-rTW/arrays.xml rename to src/MiNote/app/src/main/res/values-zh-rTW/arrays.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values-zh-rTW/strings.xml b/src/MiNote/app/src/main/res/values-zh-rTW/strings.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values-zh-rTW/strings.xml rename to src/MiNote/app/src/main/res/values-zh-rTW/strings.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values/arrays.xml b/src/MiNote/app/src/main/res/values/arrays.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values/arrays.xml rename to src/MiNote/app/src/main/res/values/arrays.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values/colors.xml b/src/MiNote/app/src/main/res/values/colors.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values/colors.xml rename to src/MiNote/app/src/main/res/values/colors.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values/dimens.xml b/src/MiNote/app/src/main/res/values/dimens.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values/dimens.xml rename to src/MiNote/app/src/main/res/values/dimens.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values/strings.xml b/src/MiNote/app/src/main/res/values/strings.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values/strings.xml rename to src/MiNote/app/src/main/res/values/strings.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/values/styles.xml b/src/MiNote/app/src/main/res/values/styles.xml similarity index 97% rename from src/小米便签/src/MiNote/app/src/main/res/values/styles.xml rename to src/MiNote/app/src/main/res/values/styles.xml index d750e65..ad0d90d 100644 --- a/src/小米便签/src/MiNote/app/src/main/res/values/styles.xml +++ b/src/MiNote/app/src/main/res/values/styles.xml @@ -64,6 +64,6 @@ \ No newline at end of file diff --git a/src/小米便签/src/MiNote/app/src/main/res/values/themes.xml b/src/MiNote/app/src/main/res/values/themes.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/values/themes.xml rename to src/MiNote/app/src/main/res/values/themes.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/xml/backup_rules.xml b/src/MiNote/app/src/main/res/xml/backup_rules.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/xml/backup_rules.xml rename to src/MiNote/app/src/main/res/xml/backup_rules.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/xml/data_extraction_rules.xml b/src/MiNote/app/src/main/res/xml/data_extraction_rules.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/xml/data_extraction_rules.xml rename to src/MiNote/app/src/main/res/xml/data_extraction_rules.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/xml/preferences.xml b/src/MiNote/app/src/main/res/xml/preferences.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/xml/preferences.xml rename to src/MiNote/app/src/main/res/xml/preferences.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/xml/searchable.xml b/src/MiNote/app/src/main/res/xml/searchable.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/xml/searchable.xml rename to src/MiNote/app/src/main/res/xml/searchable.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/xml/widget_2x_info.xml b/src/MiNote/app/src/main/res/xml/widget_2x_info.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/xml/widget_2x_info.xml rename to src/MiNote/app/src/main/res/xml/widget_2x_info.xml diff --git a/src/小米便签/src/MiNote/app/src/main/res/xml/widget_4x_info.xml b/src/MiNote/app/src/main/res/xml/widget_4x_info.xml similarity index 100% rename from src/小米便签/src/MiNote/app/src/main/res/xml/widget_4x_info.xml rename to src/MiNote/app/src/main/res/xml/widget_4x_info.xml diff --git a/src/小米便签/src/MiNote/app/src/test/java/net/micode/notes/ExampleUnitTest.java b/src/MiNote/app/src/test/java/net/micode/notes/ExampleUnitTest.java similarity index 100% rename from src/小米便签/src/MiNote/app/src/test/java/net/micode/notes/ExampleUnitTest.java rename to src/MiNote/app/src/test/java/net/micode/notes/ExampleUnitTest.java diff --git a/src/小米便签/src/MiNote/build.gradle.kts b/src/MiNote/build.gradle.kts similarity index 100% rename from src/小米便签/src/MiNote/build.gradle.kts rename to src/MiNote/build.gradle.kts diff --git a/src/小米便签/src/MiNote/gradle.properties b/src/MiNote/gradle.properties similarity index 100% rename from src/小米便签/src/MiNote/gradle.properties rename to src/MiNote/gradle.properties diff --git a/src/小米便签/src/MiNote/gradle/libs.versions.toml b/src/MiNote/gradle/libs.versions.toml similarity index 100% rename from src/小米便签/src/MiNote/gradle/libs.versions.toml rename to src/MiNote/gradle/libs.versions.toml diff --git a/src/小米便签/src/MiNote/gradle/wrapper/gradle-wrapper.jar b/src/MiNote/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from src/小米便签/src/MiNote/gradle/wrapper/gradle-wrapper.jar rename to src/MiNote/gradle/wrapper/gradle-wrapper.jar diff --git a/src/小米便签/src/MiNote/gradle/wrapper/gradle-wrapper.properties b/src/MiNote/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from src/小米便签/src/MiNote/gradle/wrapper/gradle-wrapper.properties rename to src/MiNote/gradle/wrapper/gradle-wrapper.properties diff --git a/src/小米便签/src/MiNote/gradlew b/src/MiNote/gradlew similarity index 100% rename from src/小米便签/src/MiNote/gradlew rename to src/MiNote/gradlew diff --git a/src/小米便签/src/MiNote/gradlew.bat b/src/MiNote/gradlew.bat similarity index 100% rename from src/小米便签/src/MiNote/gradlew.bat rename to src/MiNote/gradlew.bat diff --git a/src/小米便签/src/MiNote/settings.gradle.kts b/src/MiNote/settings.gradle.kts similarity index 100% rename from src/小米便签/src/MiNote/settings.gradle.kts rename to src/MiNote/settings.gradle.kts diff --git a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java b/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java deleted file mode 100644 index 666b729..0000000 --- a/src/小米便签/src/MiNote/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.tool; - -public class GTaskStringUtils { - - public final static String GTASK_JSON_ACTION_ID = "action_id"; - - public final static String GTASK_JSON_ACTION_LIST = "action_list"; - - public final static String GTASK_JSON_ACTION_TYPE = "action_type"; - - public final static String GTASK_JSON_ACTION_TYPE_CREATE = "create"; - - public final static String GTASK_JSON_ACTION_TYPE_GETALL = "get_all"; - - public final static String GTASK_JSON_ACTION_TYPE_MOVE = "move"; - - public final static String GTASK_JSON_ACTION_TYPE_UPDATE = "update"; - - public final static String GTASK_JSON_CREATOR_ID = "creator_id"; - - public final static String GTASK_JSON_CHILD_ENTITY = "child_entity"; - - public final static String GTASK_JSON_CLIENT_VERSION = "client_version"; - - public final static String GTASK_JSON_COMPLETED = "completed"; - - public final static String GTASK_JSON_CURRENT_LIST_ID = "current_list_id"; - - public final static String GTASK_JSON_DEFAULT_LIST_ID = "default_list_id"; - - public final static String GTASK_JSON_DELETED = "deleted"; - - public final static String GTASK_JSON_DEST_LIST = "dest_list"; - - public final static String GTASK_JSON_DEST_PARENT = "dest_parent"; - - public final static String GTASK_JSON_DEST_PARENT_TYPE = "dest_parent_type"; - - public final static String GTASK_JSON_ENTITY_DELTA = "entity_delta"; - - public final static String GTASK_JSON_ENTITY_TYPE = "entity_type"; - - public final static String GTASK_JSON_GET_DELETED = "get_deleted"; - - public final static String GTASK_JSON_ID = "id"; - - public final static String GTASK_JSON_INDEX = "index"; - - public final static String GTASK_JSON_LAST_MODIFIED = "last_modified"; - - public final static String GTASK_JSON_LATEST_SYNC_POINT = "latest_sync_point"; - - public final static String GTASK_JSON_LIST_ID = "list_id"; - - public final static String GTASK_JSON_LISTS = "lists"; - - public final static String GTASK_JSON_NAME = "name"; - - public final static String GTASK_JSON_NEW_ID = "new_id"; - - public final static String GTASK_JSON_NOTES = "notes"; - - public final static String GTASK_JSON_PARENT_ID = "parent_id"; - - public final static String GTASK_JSON_PRIOR_SIBLING_ID = "prior_sibling_id"; - - public final static String GTASK_JSON_RESULTS = "results"; - - public final static String GTASK_JSON_SOURCE_LIST = "source_list"; - - public final static String GTASK_JSON_TASKS = "tasks"; - - public final static String GTASK_JSON_TYPE = "type"; - - public final static String GTASK_JSON_TYPE_GROUP = "GROUP"; - - public final static String GTASK_JSON_TYPE_TASK = "TASK"; - - public final static String GTASK_JSON_USER = "user"; - - public final static String MIUI_FOLDER_PREFFIX = "[MIUI_Notes]"; - - public final static String FOLDER_DEFAULT = "Default"; - - public final static String FOLDER_CALL_NOTE = "Call_Note"; - - public final static String FOLDER_META = "METADATA"; - - public final static String META_HEAD_GTASK_ID = "meta_gid"; - - public final static String META_HEAD_NOTE = "meta_note"; - - public final static String META_HEAD_DATA = "meta_data"; - - public final static String META_NOTE_NAME = "[META INFO] DON'T UPDATE AND DELETE"; - -}