diff --git a/doc/~$软件泛读、标注和维护报告文档.docx b/doc/~$软件泛读、标注和维护报告文档.docx new file mode 100644 index 0000000..0aef927 Binary files /dev/null and b/doc/~$软件泛读、标注和维护报告文档.docx differ diff --git a/doc/开源软件泛读、标注和维护报告文档.docx b/doc/开源软件泛读、标注和维护报告文档.docx deleted file mode 100644 index 42e0edf..0000000 Binary files a/doc/开源软件泛读、标注和维护报告文档.docx and /dev/null differ diff --git a/src/Notes-master/src/net/micode/notes/ui/AlarmInitReceiver.java b/src/Notes-master/src/net/micode/notes/ui/AlarmInitReceiver.java index 1ea2d9a..f221202 100644 --- a/src/Notes-master/src/net/micode/notes/ui/AlarmInitReceiver.java +++ b/src/Notes-master/src/net/micode/notes/ui/AlarmInitReceiver.java @@ -28,33 +28,19 @@ import net.micode.notes.data.Notes; import net.micode.notes.data.Notes.NoteColumns; -/** - * 闹钟初始化接收器,用于在系统启动或应用安装时重新设置所有笔记的提醒闹钟 - * 该接收器负责在系统重启后或应用数据清除后,重新为所有设置了提醒时间且 - * 提醒时间尚未到达的笔记设置闹钟,确保提醒功能的完整性。 - */ public class AlarmInitReceiver extends BroadcastReceiver { - // 查询数据库时使用的投影列 private static final String [] PROJECTION = new String [] { NoteColumns.ID, NoteColumns.ALERTED_DATE }; - // ID 列的索引 private static final int COLUMN_ID = 0; - // 提醒日期列的索引 private static final int COLUMN_ALERTED_DATE = 1; - /** - * 接收广播时的处理方法 - * @param context 上下文对象 - * @param intent 接收到的广播意图 - */ @Override public void onReceive(Context context, Intent intent) { long currentDate = System.currentTimeMillis(); - // 查询所有设置了提醒时间且提醒时间尚未到达的笔记 Cursor c = context.getContentResolver().query(Notes.CONTENT_NOTE_URI, PROJECTION, NoteColumns.ALERTED_DATE + ">? AND " + NoteColumns.TYPE + "=" + Notes.TYPE_NOTE, @@ -64,7 +50,6 @@ public class AlarmInitReceiver extends BroadcastReceiver { if (c != null) { if (c.moveToFirst()) { do { - // 为每个符合条件的笔记设置闹钟 long alertDate = c.getLong(COLUMN_ALERTED_DATE); Intent sender = new Intent(context, AlarmReceiver.class); sender.setData(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, c.getLong(COLUMN_ID)));