|
|
|
@ -30,25 +30,28 @@ public class Notes {
|
|
|
|
|
* {@link Notes#ID_TEMPARAY_FOLDER } is for notes belonging no folder
|
|
|
|
|
* {@link Notes#ID_CALL_RECORD_FOLDER} is to store call records
|
|
|
|
|
*/
|
|
|
|
|
// 系统文件夹的标识符常量
|
|
|
|
|
public static final int ID_ROOT_FOLDER = 0;// 根文件夹ID
|
|
|
|
|
public static final int ID_TEMPARAY_FOLDER = -1;// 临时文件夹ID(
|
|
|
|
|
public static final int ID_CALL_RECORD_FOLDER = -2;// 通话记录文件夹ID
|
|
|
|
|
public static final int ID_TRASH_FOLER = -3;// 回收站文件夹ID
|
|
|
|
|
|
|
|
|
|
// 用于Intent的额外数据键名常量
|
|
|
|
|
public static final String INTENT_EXTRA_ALERT_DATE = "net.micode.notes.alert_date";
|
|
|
|
|
public static final String INTENT_EXTRA_BACKGROUND_ID = "net.micode.notes.background_color_id";
|
|
|
|
|
public static final String INTENT_EXTRA_WIDGET_ID = "net.micode.notes.widget_id";
|
|
|
|
|
public static final String INTENT_EXTRA_WIDGET_TYPE = "net.micode.notes.widget_type";
|
|
|
|
|
public static final String INTENT_EXTRA_FOLDER_ID = "net.micode.notes.folder_id";
|
|
|
|
|
public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date";
|
|
|
|
|
public static final String INTENT_EXTRA_WIDGET_TYPE = "net.micode.notes.widget_type";// 桌面小部件类
|
|
|
|
|
public static final String INTENT_EXTRA_FOLDER_ID = "net.micode.notes.folder_id";// 文件夹ID
|
|
|
|
|
public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date";// 通话日期
|
|
|
|
|
|
|
|
|
|
// 桌面小部件类型常量
|
|
|
|
|
public static final int TYPE_WIDGET_INVALIDE = -1;
|
|
|
|
|
public static final int TYPE_WIDGET_2X = 0;
|
|
|
|
|
public static final int TYPE_WIDGET_4X = 1;
|
|
|
|
|
|
|
|
|
|
// 数据类型常量类
|
|
|
|
|
public static class DataConstants {
|
|
|
|
|
public static final String NOTE = TextNote.CONTENT_ITEM_TYPE;
|
|
|
|
|
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;
|
|
|
|
|
public static final String NOTE = TextNote.CONTENT_ITEM_TYPE;// 查询所有笔记和文件夹的URI
|
|
|
|
|
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;// 查询数据的URI
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -60,7 +63,7 @@ public class Notes {
|
|
|
|
|
* Uri to query data
|
|
|
|
|
*/
|
|
|
|
|
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
|
|
|
|
|
|
|
|
|
|
// 笔记表的列名常量接口
|
|
|
|
|
public interface NoteColumns {
|
|
|
|
|
/**
|
|
|
|
|
* The unique ID for a row
|
|
|
|
@ -166,7 +169,7 @@ public class Notes {
|
|
|
|
|
*/
|
|
|
|
|
public static final String VERSION = "version";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 数据表的列名常量接口
|
|
|
|
|
public interface DataColumns {
|
|
|
|
|
/**
|
|
|
|
|
* The unique ID for a row
|
|
|
|
@ -240,7 +243,7 @@ public class Notes {
|
|
|
|
|
*/
|
|
|
|
|
public static final String DATA5 = "data5";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 文本笔记常量类
|
|
|
|
|
public static final class TextNote implements DataColumns {
|
|
|
|
|
/**
|
|
|
|
|
* Mode to indicate the text in check list mode or not
|
|
|
|
@ -256,7 +259,7 @@ public class Notes {
|
|
|
|
|
|
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 通话记录笔记常量类
|
|
|
|
|
public static final class CallNote implements DataColumns {
|
|
|
|
|
/**
|
|
|
|
|
* Call date for this record
|
|
|
|
|