|
|
|
@ -19,51 +19,44 @@ package net.micode.notes.data;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.net.Uri;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 笔记应用的数据结构定义
|
|
|
|
* 笔记应用的数据结构定义
|
|
|
|
* 包含所有笔记相关的常量、接口和内部类定义
|
|
|
|
* 包含所有笔记相关的常量、接口和内部类定义
|
|
|
|
* 纯定义类,不包含函数实现
|
|
|
|
* 纯定义类,不包含函数实现
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class Notes {
|
|
|
|
public class Notes {
|
|
|
|
// ContentProvider的授权标识
|
|
|
|
// ContentProvider的授权标识
|
|
|
|
public static final String AUTHORITY = "micode_notes";
|
|
|
|
public static final String AUTHORITY = "micode_notes";
|
|
|
|
// 日志标签
|
|
|
|
// 日志标签
|
|
|
|
public static final String TAG = "Notes";
|
|
|
|
public static final String TAG = "Notes";
|
|
|
|
// 0类型:普通笔记
|
|
|
|
// 0类型:普通笔记
|
|
|
|
public static final int TYPE_NOTE = 0;
|
|
|
|
public static final int TYPE_NOTE = 0;
|
|
|
|
// 1类型:文件夹
|
|
|
|
// 1类型:文件夹
|
|
|
|
public static final int TYPE_FOLDER = 1;
|
|
|
|
public static final int TYPE_FOLDER = 1;
|
|
|
|
// 2类型:系统文件夹
|
|
|
|
// 2类型:系统文件夹
|
|
|
|
public static final int TYPE_SYSTEM = 2;
|
|
|
|
public static final int TYPE_SYSTEM = 2;
|
|
|
|
|
|
|
|
// 3类型:清单
|
|
|
|
// 系统文件夹的 ID 定义。
|
|
|
|
public static final int TYPE_CHECKLIST = 3;
|
|
|
|
// #ID_ROOT_FOLDER 默认根文件夹
|
|
|
|
|
|
|
|
// #ID_TEMPARAY_FOLDER 临时文件夹,移动笔记时的中转
|
|
|
|
// 系统文件夹的 ID 定义。
|
|
|
|
// #ID_CALL_RECORD_FOLDER 通话记录专用文件夹
|
|
|
|
// #ID_ROOT_FOLDER 默认根文件夹
|
|
|
|
// #ID_TRASH_FOLER 回收站
|
|
|
|
// #ID_TEMPARAY_FOLDER 临时文件夹,移动笔记时的中转
|
|
|
|
public static final int ID_ROOT_FOLDER = 0; // 默认根文件夹
|
|
|
|
// #ID_CALL_RECORD_FOLDER 通话记录专用文件夹
|
|
|
|
public static final int ID_TEMPARAY_FOLDER = -1; // 临时文件夹(用于无归属的笔记)
|
|
|
|
// #ID_TRASH_FOLER 回收站
|
|
|
|
public static final int ID_CALL_RECORD_FOLDER = -2; // 通话记录文件夹
|
|
|
|
public static final int ID_ROOT_FOLDER = 0; // 默认根文件夹
|
|
|
|
public static final int ID_TRASH_FOLER = -3; // 回收站文件夹
|
|
|
|
public static final int ID_TEMPARAY_FOLDER = -1; // 临时文件夹(用于无归属的笔记)
|
|
|
|
|
|
|
|
public static final int ID_CALL_RECORD_FOLDER = -2; // 通话记录文件夹
|
|
|
|
|
|
|
|
public static final int ID_TRASH_FOLER = -3; // 回收站文件夹
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Intent Extra 键常量,用于在 Android 组件间通过 Intent 传递数据,包括:
|
|
|
|
* Intent Extra 键常量,用于在 Android 组件间通过 Intent 传递数据,包括:
|
|
|
|
* 1. 提醒日期
|
|
|
|
* 1. 提醒日期
|
|
|
|
* 2. 背景颜色ID
|
|
|
|
* 2. 背景颜色ID
|
|
|
|
* 3. 小部件ID
|
|
|
|
* 3. 小部件ID
|
|
|
|
* 4. 小部件类型
|
|
|
|
* 4. 小部件类型
|
|
|
|
* 5. 文件夹ID
|
|
|
|
* 5. 文件夹ID
|
|
|
|
* 6. 通话日期
|
|
|
|
* 6. 通话日期
|
|
|
|
* Following IDs are system folders' identifiers
|
|
|
|
* 7. 笔记类型
|
|
|
|
* {@link Notes#ID_ROOT_FOLDER } is default folder
|
|
|
|
|
|
|
|
* {@link Notes#ID_TEMPARAY_FOLDER } is for notes belonging no folder
|
|
|
|
|
|
|
|
* {@link Notes#ID_CALL_RECORD_FOLDER} is to store call records
|
|
|
|
|
|
|
|
* 7. 笔记类型
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static final int ID_ROOT_FOLDER = 0;
|
|
|
|
|
|
|
|
public static final int ID_TEMPARAY_FOLDER = -1;
|
|
|
|
|
|
|
|
public static final int ID_CALL_RECORD_FOLDER = -2;
|
|
|
|
|
|
|
|
public static final int ID_TRASH_FOLER = -3;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final String INTENT_EXTRA_ALERT_DATE = "net.micode.notes.alert_date";
|
|
|
|
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_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_ID = "net.micode.notes.widget_id";
|
|
|
|
@ -72,262 +65,190 @@ public class Notes {
|
|
|
|
public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date";
|
|
|
|
public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date";
|
|
|
|
public static final String INTENT_EXTRA_NOTE_TYPE = "net.micode.notes.note_type";
|
|
|
|
public static final String INTENT_EXTRA_NOTE_TYPE = "net.micode.notes.note_type";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 无效的小部件类型 -1
|
|
|
|
public static final int TYPE_WIDGET_INVALIDE = -1;
|
|
|
|
public static final int TYPE_WIDGET_INVALIDE = -1;
|
|
|
|
|
|
|
|
// 2x2小部件类型 0
|
|
|
|
public static final int TYPE_WIDGET_2X = 0;
|
|
|
|
public static final int TYPE_WIDGET_2X = 0;
|
|
|
|
|
|
|
|
// 4x4小部件类型 1
|
|
|
|
public static final int TYPE_WIDGET_4X = 1;
|
|
|
|
public static final int TYPE_WIDGET_4X = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 数据类型常量定义
|
|
|
|
|
|
|
|
*/
|
|
|
|
public static class DataConstants {
|
|
|
|
public static class DataConstants {
|
|
|
|
|
|
|
|
// 普通笔记的MIME类型
|
|
|
|
public static final String NOTE = TextNote.CONTENT_ITEM_TYPE;
|
|
|
|
public static final String NOTE = TextNote.CONTENT_ITEM_TYPE;
|
|
|
|
|
|
|
|
// 通话记录笔记的MIME类型
|
|
|
|
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;
|
|
|
|
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// URI 是 ContentProvider 的标准访问入口,用于统一访问应用的数据。
|
|
|
|
* Uri to query all notes and folders
|
|
|
|
// 查询所有笔记和文件夹的URI
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
|
|
|
|
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 查询数据表的URI
|
|
|
|
* Uri to query data
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
|
|
|
|
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Uri to query trash notes
|
|
|
|
* Uri to query trash notes
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static final Uri CONTENT_TRASH_URI = Uri.parse("content://" + AUTHORITY + "/trash");
|
|
|
|
public static final Uri CONTENT_TRASH_URI = Uri.parse("content://" + AUTHORITY + "/trash");
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* NoteColumns 接口 - 便签表(notes表)列定义
|
|
|
|
|
|
|
|
* 定义了便签和文件夹数据库表的所有列名和类型
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 笔记表的列名定义接口
|
|
|
|
|
|
|
|
*/
|
|
|
|
public interface NoteColumns {
|
|
|
|
public interface NoteColumns {
|
|
|
|
/**
|
|
|
|
|
|
|
|
* The unique ID for a row
|
|
|
|
// 行的唯一ID
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String ID = "_id";
|
|
|
|
public static final String ID = "_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 笔记或文件夹的父ID
|
|
|
|
* The parent's id for note or folder
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String PARENT_ID = "parent_id";
|
|
|
|
public static final String PARENT_ID = "parent_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 笔记或文件夹的创建日期
|
|
|
|
* Created data for note or folder
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String CREATED_DATE = "created_date";
|
|
|
|
public static final String CREATED_DATE = "created_date";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 最后修改日期
|
|
|
|
* Latest modified date
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String MODIFIED_DATE = "modified_date";
|
|
|
|
public static final String MODIFIED_DATE = "modified_date";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 提醒日期
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Alert date
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String ALERTED_DATE = "alert_date";
|
|
|
|
public static final String ALERTED_DATE = "alert_date";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 文件夹名称或笔记的文本内容摘要
|
|
|
|
* Folder's name or text content of note
|
|
|
|
|
|
|
|
* <P> Type: TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String SNIPPET = "snippet";
|
|
|
|
public static final String SNIPPET = "snippet";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 笔记的小部件ID
|
|
|
|
* Note's widget id
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String WIDGET_ID = "widget_id";
|
|
|
|
public static final String WIDGET_ID = "widget_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 笔记的小部件类型
|
|
|
|
* Note's widget type
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String WIDGET_TYPE = "widget_type";
|
|
|
|
public static final String WIDGET_TYPE = "widget_type";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 笔记的背景颜色ID
|
|
|
|
* Note's background color's id
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String BG_COLOR_ID = "bg_color_id";
|
|
|
|
public static final String BG_COLOR_ID = "bg_color_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 是否有附件;对于文本笔记没有附件,多媒体笔记至少有一个附件
|
|
|
|
* For text note, it doesn't has attachment, for multi-media
|
|
|
|
|
|
|
|
* note, it has at least one attachment
|
|
|
|
|
|
|
|
* <P> Type: INTEGER </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String HAS_ATTACHMENT = "has_attachment";
|
|
|
|
public static final String HAS_ATTACHMENT = "has_attachment";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 文件夹中的笔记数量
|
|
|
|
* Folder's count of notes
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String NOTES_COUNT = "notes_count";
|
|
|
|
public static final String NOTES_COUNT = "notes_count";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 文件类型:文件夹或笔记
|
|
|
|
* The file type: folder or note
|
|
|
|
|
|
|
|
* <P> Type: INTEGER </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String TYPE = "type";
|
|
|
|
public static final String TYPE = "type";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 最后一次同步的ID
|
|
|
|
* The last sync id
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String SYNC_ID = "sync_id";
|
|
|
|
public static final String SYNC_ID = "sync_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 标记是否在本地被修改
|
|
|
|
* Sign to indicate local modified or not
|
|
|
|
|
|
|
|
* <P> Type: INTEGER </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String LOCAL_MODIFIED = "local_modified";
|
|
|
|
public static final String LOCAL_MODIFIED = "local_modified";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 移动到临时文件夹之前的原始父ID
|
|
|
|
* Original parent id before moving into temporary folder
|
|
|
|
|
|
|
|
* <P> Type : INTEGER </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String ORIGIN_PARENT_ID = "origin_parent_id";
|
|
|
|
public static final String ORIGIN_PARENT_ID = "origin_parent_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// Google Task的ID
|
|
|
|
* The gtask id
|
|
|
|
|
|
|
|
* <P> Type : TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String GTASK_ID = "gtask_id";
|
|
|
|
public static final String GTASK_ID = "gtask_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 版本号
|
|
|
|
* The version code
|
|
|
|
|
|
|
|
* <P> Type : INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String VERSION = "version";
|
|
|
|
public static final String VERSION = "version";
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Whether the note is encrypted
|
|
|
|
* Whether the note is encrypted
|
|
|
|
* <P> Type : INTEGER (0 = not encrypted, 1 = encrypted) </P>
|
|
|
|
* <P> Type : INTEGER (0 = not encrypted, 1 = encrypted) </P>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static final String IS_ENCRYPTED = "is_encrypted";
|
|
|
|
public static final String IS_ENCRYPTED = "is_encrypted";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public interface TrashColumns extends NoteColumns {
|
|
|
|
public interface TrashColumns extends NoteColumns {
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Deleted date for trash note
|
|
|
|
* Deleted date for trash note
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static final String DELETED_DATE = "deleted_date";
|
|
|
|
public static final String DELETED_DATE = "deleted_date";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* DataColumns 接口 - 便签数据表(data表)列定义
|
|
|
|
* DataColumns 接口 - 便签数据表(data表)列定义
|
|
|
|
* 定义了便签详细内容的数据表列名和类型
|
|
|
|
* 定义了便签详细内容的数据表列名和类型
|
|
|
|
* 使用MIME_TYPE字段区分不同类型的便签数据(文本便签、通话记录等)
|
|
|
|
* 使用MIME_TYPE字段区分不同类型的便签数据(文本便签、通话记录等)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public interface DataColumns {
|
|
|
|
public interface DataColumns {
|
|
|
|
/**
|
|
|
|
// 行的唯一ID
|
|
|
|
* The unique ID for a row
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String ID = "_id";
|
|
|
|
public static final String ID = "_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 该行数据项的MIME类型
|
|
|
|
* The MIME type of the item represented by this row.
|
|
|
|
|
|
|
|
* <P> Type: Text </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String MIME_TYPE = "mime_type";
|
|
|
|
public static final String MIME_TYPE = "mime_type";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 该数据所属笔记的引用ID
|
|
|
|
* The reference id to note that this data belongs to
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String NOTE_ID = "note_id";
|
|
|
|
public static final String NOTE_ID = "note_id";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 笔记或文件夹的创建日期
|
|
|
|
* Created data for note or folder
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String CREATED_DATE = "created_date";
|
|
|
|
public static final String CREATED_DATE = "created_date";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 最后修改日期
|
|
|
|
* Latest modified date
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String MODIFIED_DATE = "modified_date";
|
|
|
|
public static final String MODIFIED_DATE = "modified_date";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 数据内容
|
|
|
|
* Data's content
|
|
|
|
|
|
|
|
* <P> Type: TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String CONTENT = "content";
|
|
|
|
public static final String CONTENT = "content";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通用数据列1
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
|
|
|
|
|
|
|
|
* integer data type
|
|
|
|
|
|
|
|
* <P> Type: INTEGER </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String DATA1 = "data1";
|
|
|
|
public static final String DATA1 = "data1";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 通用数据列2
|
|
|
|
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
|
|
|
|
|
|
|
|
* integer data type
|
|
|
|
|
|
|
|
* <P> Type: INTEGER </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String DATA2 = "data2";
|
|
|
|
public static final String DATA2 = "data2";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 通用数据列3
|
|
|
|
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
|
|
|
|
|
|
|
|
* TEXT data type
|
|
|
|
|
|
|
|
* <P> Type: TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String DATA3 = "data3";
|
|
|
|
public static final String DATA3 = "data3";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 通用数据列4
|
|
|
|
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
|
|
|
|
|
|
|
|
* TEXT data type
|
|
|
|
|
|
|
|
* <P> Type: TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String DATA4 = "data4";
|
|
|
|
public static final String DATA4 = "data4";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 通用数据列5
|
|
|
|
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
|
|
|
|
|
|
|
|
* TEXT data type
|
|
|
|
|
|
|
|
* <P> Type: TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String DATA5 = "data5";
|
|
|
|
public static final String DATA5 = "data5";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* TextNote 类 - 文本便签数据定义
|
|
|
|
|
|
|
|
* 定义了文本便签特有的数据列和URI
|
|
|
|
|
|
|
|
*/
|
|
|
|
public static final class TextNote implements DataColumns {
|
|
|
|
public static final class TextNote implements DataColumns {
|
|
|
|
/**
|
|
|
|
// 模式标识:文本是否为清单模式
|
|
|
|
* Mode to indicate the text in check list mode or not
|
|
|
|
|
|
|
|
* <P> Type: Integer 1:check list mode 0: normal mode </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String MODE = DATA1;
|
|
|
|
public static final String MODE = DATA1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 清单模式常量
|
|
|
|
public static final int MODE_CHECK_LIST = 1;
|
|
|
|
public static final int MODE_CHECK_LIST = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 普通模式常量
|
|
|
|
|
|
|
|
public static final int MODE_NORMAL = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 文本笔记的目录MIME类型
|
|
|
|
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/text_note";
|
|
|
|
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/text_note";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 文本笔记的单项MIME类型
|
|
|
|
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note";
|
|
|
|
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 文本笔记的URI
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* CallNote 类 - 通话记录便签数据定义
|
|
|
|
|
|
|
|
* 定义了通话记录便签特有的数据列和URI
|
|
|
|
|
|
|
|
*/
|
|
|
|
public static final class CallNote implements DataColumns {
|
|
|
|
public static final class CallNote implements DataColumns {
|
|
|
|
/**
|
|
|
|
// 通话日期
|
|
|
|
* Call date for this record
|
|
|
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String CALL_DATE = DATA1;
|
|
|
|
public static final String CALL_DATE = DATA1;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
// 电话号码
|
|
|
|
* Phone number for this record
|
|
|
|
|
|
|
|
* <P> Type: TEXT </P>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static final String PHONE_NUMBER = DATA3;
|
|
|
|
public static final String PHONE_NUMBER = DATA3;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 联系人姓名
|
|
|
|
|
|
|
|
public static final String CONTACT_NAME = DATA4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通话记录笔记的目录MIME类型
|
|
|
|
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/call_note";
|
|
|
|
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/call_note";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通话记录笔记的单项MIME类型
|
|
|
|
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note";
|
|
|
|
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通话记录笔记的URI
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note");
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|