diff --git a/src/app/src/main/java/net/micode/notes/data/Contact.java b/src/app/src/main/java/net/micode/notes/data/Contact.java
index ca2ad5b..ec34a3f 100644
--- a/src/app/src/main/java/net/micode/notes/data/Contact.java
+++ b/src/app/src/main/java/net/micode/notes/data/Contact.java
@@ -52,7 +52,6 @@ public class Contact {
if(sContactCache.containsKey(phoneNumber)) {
return sContactCache.get(phoneNumber);
}
-//todo:不符合但入口但出口原则
String selection = CALLER_ID_SELECTION.replace("+",
PhoneNumberUtils.toCallerIDMinMatch(phoneNumber));
diff --git a/src/app/src/main/java/net/micode/notes/data/Notes.java b/src/app/src/main/java/net/micode/notes/data/Notes.java
index f240604..6f9a420 100644
--- a/src/app/src/main/java/net/micode/notes/data/Notes.java
+++ b/src/app/src/main/java/net/micode/notes/data/Notes.java
@@ -20,6 +20,7 @@ import android.net.Uri;
public class Notes {
public static final String AUTHORITY = "micode_notes";
public static final String TAG = "Notes";
+ //todo:参数含义
public static final int TYPE_NOTE = 0;
public static final int TYPE_FOLDER = 1;
public static final int TYPE_SYSTEM = 2;
@@ -54,13 +55,19 @@ public class Notes {
/**
* Uri to query all notes and folders
*/
+ //获取便签存放位置的URI,用于查找notes和folders
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
/**
* Uri to query data
*/
+ //获取数据存放位置URI,用于查找数据
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
+
+ /**
+ *该类声明了一系列关于便签的final变量,没有定义方法
+ */
public interface NoteColumns {
/**
* The unique ID for a row
@@ -167,6 +174,9 @@ public class Notes {
public static final String VERSION = "version";
}
+ /*
+ * 该类声明了一系列关于数据的final变量,没有定义方法
+ * */
public interface DataColumns {
/**
* The unique ID for a row
@@ -241,12 +251,15 @@ public class Notes {
public static final String DATA5 = "data5";
}
+ /*
+ * 该类是对接口DataColumns的实现,没有声明方法
+ * */
public static final class TextNote implements DataColumns {
/**
* Mode to indicate the text in check list mode or not
* Type: Integer 1:check list mode 0: normal mode
*/
- public static final String MODE = DATA1;
+ public static final String MODE = DATA1;//DATA1-DataColumns中声明
public static final int MODE_CHECK_LIST = 1;