diff --git a/.gradle/7.5/executionHistory/executionHistory.bin b/.gradle/7.5/executionHistory/executionHistory.bin index e01e658..ba8f737 100644 Binary files a/.gradle/7.5/executionHistory/executionHistory.bin and b/.gradle/7.5/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.5/executionHistory/executionHistory.lock b/.gradle/7.5/executionHistory/executionHistory.lock index 563c183..852ced8 100644 Binary files a/.gradle/7.5/executionHistory/executionHistory.lock and b/.gradle/7.5/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.5/fileHashes/fileHashes.bin b/.gradle/7.5/fileHashes/fileHashes.bin index 147ced8..8f5a16ad 100644 Binary files a/.gradle/7.5/fileHashes/fileHashes.bin and b/.gradle/7.5/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.5/fileHashes/fileHashes.lock b/.gradle/7.5/fileHashes/fileHashes.lock index e5ceb84..4defcda 100644 Binary files a/.gradle/7.5/fileHashes/fileHashes.lock and b/.gradle/7.5/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.5/fileHashes/resourceHashesCache.bin b/.gradle/7.5/fileHashes/resourceHashesCache.bin index c1bbeda..cde8e7a 100644 Binary files a/.gradle/7.5/fileHashes/resourceHashesCache.bin and b/.gradle/7.5/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 3a8fb31..3c71f34 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/configuration-cache/cadx65my5juc9dcyzlsib2doc/work.bin b/.gradle/configuration-cache/cadx65my5juc9dcyzlsib2doc/work.bin index 315388b..b409d29 100644 Binary files a/.gradle/configuration-cache/cadx65my5juc9dcyzlsib2doc/work.bin and b/.gradle/configuration-cache/cadx65my5juc9dcyzlsib2doc/work.bin differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index cd22c14..9a4d2f4 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index f2f622b..0000000 --- a/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/build/intermediates/apk/debug/app-debug.apk b/app/build/intermediates/apk/debug/app-debug.apk index 3b46dfe..1387629 100644 Binary files a/app/build/intermediates/apk/debug/app-debug.apk and b/app/build/intermediates/apk/debug/app-debug.apk differ diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/11/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/11/classes.dex index 6427be7..60782ed 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/11/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/11/classes.dex differ diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/15/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/15/classes.dex index 5076e47..8f14800 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/15/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/15/classes.dex differ diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/3/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/3/classes.dex index fbed0c7..46e71ab 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/3/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/3/classes.dex differ diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/4/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/4/classes.dex index 6b5e238..da4af49 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/4/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/4/classes.dex differ diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex index c3f867d..de5da9d 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/5/classes.dex differ diff --git a/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt b/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt index 05199f3..cd95a2d 100644 --- a/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt +++ b/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt @@ -1,4 +1,4 @@ -#Thu May 18 20:09:28 CST 2023 +#Thu May 18 23:18:27 CST 2023 path.4=13/classes.dex path.3=12/classes.dex path.2=11/classes.dex diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/data/Auth.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/data/Auth.class index c69f204..960114f 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/data/Auth.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/data/Auth.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note$NoteData.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note$NoteData.class index 3dd08f3..843d933 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note$NoteData.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note$NoteData.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note.class index 8e9a3b0..3bdee2e 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/model/Note.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/model/WorkingNote.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/model/WorkingNote.class index 5efec16..1b42738 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/model/WorkingNote.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/model/WorkingNote.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$1.class index f0798f9..1c02204 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$2.class index 967b499..6eb55f6 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$2.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$2.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$LocalBinder.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$LocalBinder.class index 495a61c..b2bef8c 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$LocalBinder.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService$LocalBinder.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService.class index f99ff09..6d142bf 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/service/BackupBoundService.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils$TextExport.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils$TextExport.class index 66697f9..5b0b1f0 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils$TextExport.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils$TextExport.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils.class index 74c4f82..dd66794 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/BackupUtils.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/DataUtils.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/DataUtils.class index b326d08..0587350 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/DataUtils.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/DataUtils.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$1.class index 6ffa5f9..de3acb9 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$BodyType.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$BodyType.class index 7558718..f8ecc5c 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$BodyType.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer$BodyType.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer.class index e4b83c8..1881214 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/NoteHttpServer.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$1.class index 947c442..65bfce7 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.class index ffb6859..15c463e 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils.class index 712cdec..9d92d93 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/SyncNoteUtils.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils$1.class deleted file mode 100644 index a754f96..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils.class index 66be042..b7c595d 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/tool/UIUtils.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/AlarmAlertActivity.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/AlarmAlertActivity.class index 5b5ff37..42f4448 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/AlarmAlertActivity.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/AlarmAlertActivity.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter$1.class deleted file mode 100644 index 8548290..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter.class index ca85397..75441f5 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/BackupListAdapter.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePicker.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePicker.class index 375d0e2..af8eb75 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePicker.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePicker.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog$1.class deleted file mode 100644 index 415e755..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog.class index 7340b18..0697a0c 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DateTimePickerDialog.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu$1.class deleted file mode 100644 index ddd74fd..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu.class index d152cd8..b576625 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/DropdownMenu.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter$FolderListItem.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter$FolderListItem.class index c14e58f..fd28713 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter$FolderListItem.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter$FolderListItem.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter.class index 62984bb..5c213cf 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/FoldersListAdapter.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton$1.class deleted file mode 100644 index 6f7b905..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton$2.class deleted file mode 100644 index 9c36120..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton$2.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton.class index 53619af..6ba85b1 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NbButton.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteCheckBox.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteCheckBox.class index a06eb9e..6e55d7e 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteCheckBox.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteCheckBox.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText$1.class deleted file mode 100644 index fd48fe2..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText.class index ae1d7dd..40ccf42 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditText.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$1.class index 69cd83b..5974b6f 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$2.class index 6400c49..66ca7f9 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$2.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$2.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$3.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$3.class index 91612d5..58ce786 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$3.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$3.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$4$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$4$1.class deleted file mode 100644 index d63a37e..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$4$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$4.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$4.class deleted file mode 100644 index 7f07e59..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity$4.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity.class index 566f24a..5f4dd43 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginActivity.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton$1$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton$1$1.class deleted file mode 100644 index aa6f6e8..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton$1$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton$1.class deleted file mode 100644 index 0398b44..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton.class deleted file mode 100644 index 4404816..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteLoginButton.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$1.class index 75dec32..8d217ad 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$2.class deleted file mode 100644 index cdeaaeb..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$2.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$3.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$3.class deleted file mode 100644 index ee3f699..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton$3.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton.class index bf34397..75b7859 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuButton.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment$1.class index a9a8f02..54eb845 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment.class index 5525425..0f19913 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuListFragment.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.class index e5c56d3..3fee0cb 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.class index 24595d7..153eae9 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment.class index 707a6d3..97234e6 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteMenuMainFragment.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1$1.class deleted file mode 100644 index 7751661..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1$2.class deleted file mode 100644 index 81a9f43..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1$2.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1.class index 9b65f93..9027a84 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$2.class index d923790..9a0459f 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$2.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton$2.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton.class index 27fea8c..860ad1e 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteVerificationButton.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class index fa88b7c..c8f3984 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$10.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$10.class deleted file mode 100644 index 38f4dca..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$10.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$11.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$11.class deleted file mode 100644 index 3f5d315..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$11.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class index 1116064..08dd1d2 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class index 5456540..1f64037 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class index 242cb94..416d951 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class index 10ebe13..7352f03 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class index 20afe06..cf6d882 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class index d056749..0279eec 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class deleted file mode 100644 index fc34bf1..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class deleted file mode 100644 index 21e1bbb..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class index d935782..5f07e48 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ListEditState.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ListEditState.class index 5e9eebd..35768a9 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ListEditState.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ListEditState.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class deleted file mode 100644 index 44a5414..0000000 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class and /dev/null differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class index ca80132..63e96ba 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class index 758f698..e74e8f1 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class index 8900927..263d1b1 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class index 93e03ec..12e5f52 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.class index cec626c..11c8cc2 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter.class index 81eb8ee..50c74a8 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListAdapter.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListItem.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListItem.class index bc928e4..3365e5a 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListItem.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListItem.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$1.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$1.class index c83d3dd..8c382d9 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$1.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$1.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$2.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$2.class index 8523228..9b98056 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$2.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$2.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$3.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$3.class index d91bc85..62a9341 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$3.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$3.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$4.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$4.class index 00b781f..499a2bd 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$4.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$4.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$5.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$5.class index ea268ae..111c7db 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$5.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$5.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$6.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$6.class index 7b80036..28f1bbd 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$6.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$6.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$7.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$7.class index d9abeb9..6113a19 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$7.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$7.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$8.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$8.class index 39e534a..1824e18 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$8.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$8.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.class index 15d3107..82551be 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity.class index 4673635..6c656fe 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesPreferenceActivity.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter$ViewHolder.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter$ViewHolder.class index c2fc953..b21fc9e 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter$ViewHolder.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter$ViewHolder.class differ diff --git a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter.class b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter.class index 133dd9c..3f96f44 100644 Binary files a/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter.class and b/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/SyncListAdapter.class differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/data/Auth.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/data/Auth.dex index 2416c28..70b9106 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/data/Auth.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/data/Auth.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note$NoteData.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note$NoteData.dex index 0949156..1108e81 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note$NoteData.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note$NoteData.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note.dex index 33b660b..abe6616 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/Note.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/WorkingNote.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/WorkingNote.dex index a1a14a0..c8f9937 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/WorkingNote.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/model/WorkingNote.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$1.dex index 5f9c086..3218106 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$2.dex index 336dc1b..4e158cb 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$2.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$2.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$LocalBinder.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$LocalBinder.dex index ba338c5..25677df 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$LocalBinder.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService$LocalBinder.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService.dex index 6077acc..b336097 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/service/BackupBoundService.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils$TextExport.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils$TextExport.dex index 0d5c7ca..d26615b 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils$TextExport.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils$TextExport.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils.dex index 9bce9eb..5f16c89 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/BackupUtils.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/DataUtils.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/DataUtils.dex index 5728df8..0ef6626 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/DataUtils.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/DataUtils.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$1.dex index ddd5507..689f187 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$BodyType.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$BodyType.dex index e0145c3..9eb6f38 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$BodyType.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer$BodyType.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer.dex index 8924ae4..c81dd75 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/NoteHttpServer.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$1.dex index 48a690d..d4f0471 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.dex index 1269d99..52b0107 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils$SyncNoteItemData.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils.dex index b2341eb..e03a4f3 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/SyncNoteUtils.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils$1.dex deleted file mode 100644 index f40c768..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils.dex index 1c23bb5..cc9da38 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/tool/UIUtils.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/AlarmAlertActivity.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/AlarmAlertActivity.dex index 60abaa7..46b23ab 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/AlarmAlertActivity.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/AlarmAlertActivity.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter$1.dex deleted file mode 100644 index f35a11d..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter.dex index a7f6b2c..623e60b 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/BackupListAdapter.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePicker.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePicker.dex index 93a09ff..40592f4 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePicker.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePicker.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog$1.dex deleted file mode 100644 index 2c10036..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog.dex index be1ace5..9293f90 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DateTimePickerDialog.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu$1.dex deleted file mode 100644 index 49a8b16..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu.dex index a903a24..5ea78ab 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/DropdownMenu.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter$FolderListItem.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter$FolderListItem.dex index f4af898..e5c8bdf 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter$FolderListItem.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter$FolderListItem.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter.dex index 02dd75f..f36c2c7 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/FoldersListAdapter.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton$1.dex deleted file mode 100644 index 3049c4a..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton$2.dex deleted file mode 100644 index d565fa5..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton$2.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton.dex index 6e980de..a64d6d6 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NbButton.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteCheckBox.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteCheckBox.dex index 9053fed..09340ae 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteCheckBox.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteCheckBox.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText$1.dex deleted file mode 100644 index 221a854..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText.dex index 5d9edaf..1777ef4 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteEditText.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$1.dex index ddf77d3..3e4ed18 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$2.dex index eee1d41..ac51dec 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$2.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$2.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$3.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$3.dex index e5eac85..56ae5ab 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$3.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$3.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$4$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$4$1.dex deleted file mode 100644 index e578d9d..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$4$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$4.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$4.dex deleted file mode 100644 index 4aaa7f4..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity$4.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity.dex index 914990b..8eac488 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginActivity.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton$1$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton$1$1.dex deleted file mode 100644 index 4e0ceb1..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton$1$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton$1.dex deleted file mode 100644 index eaeac82..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton.dex deleted file mode 100644 index 56a4afd..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteLoginButton.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$1.dex index 33a3409..ccd36e3 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$2.dex deleted file mode 100644 index e5a1d66..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$2.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$3.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$3.dex deleted file mode 100644 index 37c7a20..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton$3.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton.dex index e4bd9f0..65d3d57 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuButton.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment$1.dex index 9b63916..a7a20a5 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment.dex index 2daf962..64b8175 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuListFragment.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.dex index 9ee18e5..a3ae82f 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuBackUpButtonClickListener.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.dex index f2bf770..c4c1921 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment$NoteMenuSyncButtonClickListener.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment.dex index 473cb5e..b8227f3 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteMenuMainFragment.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1$1.dex deleted file mode 100644 index adcdb33..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1$2.dex deleted file mode 100644 index cc9a3ce..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1$2.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1.dex index a50577b..0063734 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$2.dex index 430a72d..9f30172 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$2.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton$2.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton.dex index c681603..015d525 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NoteVerificationButton.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex index d6c03f5..edf1b86 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$10.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$10.dex deleted file mode 100644 index 6ccdca4..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$10.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$11.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$11.dex deleted file mode 100644 index 86ff2c2..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$11.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex index b8bb740..6d3197c 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex index 78a46b1..62af810 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex index 9580a8d..8cc54ba 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex index d150f3e..a53f03d 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex index 347a8ee..54dcaee 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex index 4ed33ad..00f2b6e 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex deleted file mode 100644 index 9c56096..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex deleted file mode 100644 index 3498e81..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex index 40a29bd..39d1a9b 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ListEditState.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ListEditState.dex index 3fec325..769df34 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ListEditState.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ListEditState.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex deleted file mode 100644 index 140152c..0000000 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex and /dev/null differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex index 8650ab0..9f767e5 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex index 7c7a2f6..4b214d7 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex index c094a30..68f1ec4 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex index 7844f02..820b3ed 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.dex index 53a05bb..9ed6744 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter$AppWidgetAttribute.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter.dex index d6904f5..7811f0b 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListAdapter.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListItem.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListItem.dex index 3275d08..70bfc7a 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListItem.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListItem.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$1.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$1.dex index 44cc321..a5ad5d8 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$1.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$2.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$2.dex index 99e75dd..ebe364d 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$2.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$2.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$3.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$3.dex index 80233e5..343d7e6 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$3.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$3.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$4.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$4.dex index 652dd5a..4109911 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$4.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$4.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$5.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$5.dex index 220cd06..718bdac 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$5.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$5.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$6.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$6.dex index 194cc49..15a44e6 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$6.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$6.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$7.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$7.dex index 4861014..b6c18ab 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$7.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$7.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$8.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$8.dex index 5e41302..ca4d179 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$8.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$8.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.dex index 37829de..ef3ffdb 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity$GTaskReceiver.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity.dex index 9364b77..79bd291 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesPreferenceActivity.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter$ViewHolder.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter$ViewHolder.dex index 878cef1..e6b09b2 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter$ViewHolder.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter$ViewHolder.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter.dex b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter.dex index 3fde9c5..026cd63 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter.dex and b/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/SyncListAdapter.dex differ diff --git a/app/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin b/app/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin index 1fdd27c..611de37 100644 Binary files a/app/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin and b/app/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin differ diff --git a/app/src/main/java/net/micode/notes/callback/NoteCallback.java b/app/src/main/java/net/micode/notes/callback/NoteCallback.java index 415e2b9..7aeb716 100644 --- a/app/src/main/java/net/micode/notes/callback/NoteCallback.java +++ b/app/src/main/java/net/micode/notes/callback/NoteCallback.java @@ -1,5 +1,5 @@ package net.micode.notes.callback; public interface NoteCallback { - public void execute(); + void execute(); } diff --git a/app/src/main/java/net/micode/notes/data/Auth.java b/app/src/main/java/net/micode/notes/data/Auth.java index 1042866..b9b1da1 100644 --- a/app/src/main/java/net/micode/notes/data/Auth.java +++ b/app/src/main/java/net/micode/notes/data/Auth.java @@ -1,30 +1,19 @@ package net.micode.notes.data; -import android.content.ContentValues; import android.content.Context; import android.content.SharedPreferences; -import android.database.Cursor; import android.net.Uri; -import android.util.Log; -import android.webkit.HttpAuthHandler; -import net.micode.notes.callback.NoteCallback; import net.micode.notes.tool.NoteHttpServer; import net.micode.notes.tool.NoteRemoteConfig; -import okhttp3.Call; import okhttp3.Callback; import okhttp3.HttpUrl; -import okhttp3.Response; -import org.jetbrains.annotations.NotNull; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; -import java.util.logging.Handler; public class Auth { - - //tag private static final String TAG = "chenqy"; public static final String AUTHORITY = "micode_notes"; public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/auth"); @@ -52,7 +41,7 @@ public class Auth { return sharedPreferences.getString(token_key, null); } - public static void checkAuthToken(Context context, Callback callback) throws IOException, JSONException { + public static void checkAuthToken(Context context, Callback callback) throws JSONException { String auth_token = getAuthToken(context, AUTH_TOKEN_KEY); JSONObject jsonObject = new JSONObject(); jsonObject.put("token", auth_token); diff --git a/app/src/main/java/net/micode/notes/model/Note.java b/app/src/main/java/net/micode/notes/model/Note.java index bf90e82..32793ba 100644 --- a/app/src/main/java/net/micode/notes/model/Note.java +++ b/app/src/main/java/net/micode/notes/model/Note.java @@ -52,13 +52,13 @@ public class Note { // 向数据库中插入新笔记数据,并获取包含新建笔记Uri的对象uri Uri uri = context.getContentResolver().insert(Notes.CONTENT_NOTE_URI, values); - long noteId = 0; + long noteId; try { // 从uri中获得新建笔记的id,即路径segments的第二个元素,并将其转换为long类型返回 - noteId = Long.valueOf(uri.getPathSegments().get(1)); + noteId = Long.parseLong(uri.getPathSegments().get(1)); } catch (NumberFormatException e) { // 如果获取不到这个id或者它等于-1,则会抛出相应的异常 - Log.e(TAG, "Get note id error :" + e.toString()); + Log.e(TAG, "Get note id error :" + e); noteId = 0; } if (noteId == -1) { @@ -220,14 +220,11 @@ public class Note { mNoteDiffValues.clear(); // 将mNoteData中的数据保存到本地数据库中 - if (mNoteData.isLocalModified() - && (mNoteData.pushIntoContentResolver(context, noteId) == null)) { - // 如果保存失败,则返回false - return false; - } + // 如果保存失败,则返回false + return !mNoteData.isLocalModified() + || (mNoteData.pushIntoContentResolver(context, noteId) != null); // 如果保存成功,则返回true - return true; } @@ -369,8 +366,8 @@ public class Note { } // 初始化operationList列表和builder对象 - ArrayList operationList = new ArrayList(); - ContentProviderOperation.Builder builder = null; + ArrayList operationList = new ArrayList<>(); + ContentProviderOperation.Builder builder; // 如果mTextDataValues对象不为空,则将其中的数据保存到ContentResolver中 if(mTextDataValues.size() > 0) { @@ -384,7 +381,7 @@ public class Note { mTextDataValues); try { // 解析Uri中的id值,并将其设置为mTextDataId - setTextDataId(Long.valueOf(uri.getPathSegments().get(1))); + setTextDataId(Long.parseLong(uri.getPathSegments().get(1))); } catch (NumberFormatException e) { Log.e(TAG, "Insert new text data fail with noteId" + noteId); // 插入失败,清空mTextDataValues,并返回null @@ -414,7 +411,7 @@ public class Note { mCallDataValues); try { // 解析Uri中的id值,并将其设置为mCallDataId - setCallDataId(Long.valueOf(uri.getPathSegments().get(1))); + setCallDataId(Long.parseLong(uri.getPathSegments().get(1))); } catch (NumberFormatException e) { Log.e(TAG, "Insert new call data fail with noteId" + noteId); // 插入失败,清空mCallDataValues,并返回null @@ -440,10 +437,10 @@ public class Note { return (results == null || results.length == 0 || results[0] == null) ? null : ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, noteId); } catch (RemoteException e) { // 捕获 RemoteException 异常 - Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage())); // 记录异常信息到日志 + Log.e(TAG, String.format("%s: %s", e, e.getMessage())); // 记录异常信息到日志 return null; // 返回 null } catch (OperationApplicationException e) { // 捕获 OperationApplicationException 异常 - Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage())); // 记录异常信息到日志 + Log.e(TAG, String.format("%s: %s", e, e.getMessage())); // 记录异常信息到日志 return null; // 返回 null } } diff --git a/app/src/main/java/net/micode/notes/model/WorkingNote.java b/app/src/main/java/net/micode/notes/model/WorkingNote.java index 392151a..ca22643 100644 --- a/app/src/main/java/net/micode/notes/model/WorkingNote.java +++ b/app/src/main/java/net/micode/notes/model/WorkingNote.java @@ -35,7 +35,7 @@ import net.micode.notes.tool.ResourceParser.NoteBgResources; public class WorkingNote { // Note for the working note private Note mNote; - // Note Id + // Note id private long mNoteId; // Note content private String mContent; @@ -317,14 +317,10 @@ public class WorkingNote { * @return 如果笔记值得被保存到数据库中,则返回true;否则返回false */ private boolean isWorthSaving() { - if (mIsDeleted || (!existInDatabase() && TextUtils.isEmpty(mContent)) - || (existInDatabase() && !mNote.isLocalModified())) { - // 如果该笔记已经被标记为“已删除”,或者它既没有保存到数据库中,也没有任何数据,或者它已经存在于 - // 数据库中但没有被修改过,则认为该笔记不需要被保存。 - return false; - } else { - return true; - } + // 如果该笔记已经被标记为“已删除”,或者它既没有保存到数据库中,也没有任何数据,或者它已经存在于 + // 数据库中但没有被修改过,则认为该笔记不需要被保存。 + return !mIsDeleted && (existInDatabase() || !TextUtils.isEmpty(mContent)) + && (!existInDatabase() || mNote.isLocalModified()); } @@ -499,7 +495,7 @@ public class WorkingNote { * @return 如果笔记设置了提醒,则返回true;否则返回false */ public boolean hasClockAlert() { - return (mAlertDate > 0 ? true : false); + return (mAlertDate > 0); } /** diff --git a/app/src/main/java/net/micode/notes/service/BackupBoundService.java b/app/src/main/java/net/micode/notes/service/BackupBoundService.java index 320a7f3..1864ec9 100644 --- a/app/src/main/java/net/micode/notes/service/BackupBoundService.java +++ b/app/src/main/java/net/micode/notes/service/BackupBoundService.java @@ -29,40 +29,36 @@ import java.util.List; public class BackupBoundService extends Service { - //tag private static final String TAG = "chenqy"; public static final String SERVICE_NAME = "BackupIntentService"; public static final String BACKUP_NOTE_ACTION = "net.micode.notes.BACKUP_NOTE"; private final IBinder binder = new LocalBinder(); - private final static String[] PROJECTION_NOTE = new String[]{ - Notes.NoteColumns.VERSION, + private final String[] PROJECTION_NOTE = new String[]{ + Notes.NoteColumns.VERSION }; - private final static String[] PROJECTION_DATA = new String[]{ + private final String[] PROJECTION_DATA = new String[]{ Notes.DataColumns.CONTENT, - Notes.DataColumns.DATA5, + Notes.DataColumns.DATA5 }; - private Handler mHandler = new Handler(Looper.getMainLooper()){ + private Handler mHandler = new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { super.handleMessage(msg); - if (msg.what == 1){ + if (msg.what == 1) { String text = (String) msg.obj; - Toast.makeText(BackupBoundService.this,text,Toast.LENGTH_SHORT).show(); + Toast.makeText(BackupBoundService.this, text, Toast.LENGTH_SHORT).show(); } } }; - - @Override public IBinder onBind(Intent intent) { return binder; } - public void backupNotes(List noteData) throws JSONException { NoteHttpServer noteHttpServer = new NoteHttpServer(); String phone = Auth.getAuthToken(this, Auth.AUTH_PHONE_KEY); @@ -70,8 +66,8 @@ public class BackupBoundService extends Service { for (Long noteId : noteData) { JSONObject body = new JSONObject(); - body.put("user_id",phone); - // Get version number from Notes.CONTENT_NOTE_URI + body.put("user_id", phone); + Cursor cursorNote = getContentResolver().query( Notes.CONTENT_NOTE_URI, PROJECTION_NOTE, @@ -85,7 +81,6 @@ public class BackupBoundService extends Service { body.put("version", version); } - // Get content and note token from Notes.CONTENT_DATA_URI Cursor cursorData = getContentResolver().query( Notes.CONTENT_DATA_URI, PROJECTION_DATA, @@ -101,12 +96,11 @@ public class BackupBoundService extends Service { body.put("note_token", noteToken); } - // Send data to server noteHttpServer.sendAsyncPostRequest(url, body.toString(), NoteHttpServer.BodyType.JSON, new Callback() { @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { Log.e(TAG, "Backup failed: " + e.getMessage()); - mHandler.obtainMessage(1,"Backup failed: " + e.getMessage()).sendToTarget(); + mHandler.obtainMessage(1, "Backup failed: " + e.getMessage()).sendToTarget(); } @Override @@ -116,13 +110,12 @@ public class BackupBoundService extends Service { try { JSONObject result = new JSONObject(resStr); - String noteToken = (String) result.get("data"); + String noteToken = result.optString("data"); if (noteToken == null) { Log.e(TAG, "Backup failed"); mHandler.obtainMessage(1, "Backup failed").sendToTarget(); } else { - // Update note_token in local database ContentValues values = new ContentValues(); values.put(Notes.DataColumns.DATA5, noteToken); getContentResolver().update( @@ -141,8 +134,6 @@ public class BackupBoundService extends Service { } } - - public class LocalBinder extends Binder { public BackupBoundService getService() { return BackupBoundService.this; diff --git a/app/src/main/java/net/micode/notes/tool/BackupUtils.java b/app/src/main/java/net/micode/notes/tool/BackupUtils.java index a208362..d2d2881 100644 --- a/app/src/main/java/net/micode/notes/tool/BackupUtils.java +++ b/app/src/main/java/net/micode/notes/tool/BackupUtils.java @@ -302,7 +302,7 @@ public class BackupUtils { if (folderCursor.moveToFirst()) { do { // 打印文件夹名称 - String folderName = ""; + String folderName; if (folderCursor.getLong(NOTE_COLUMN_ID) == Notes.ID_CALL_RECORD_FOLDER) { folderName = mContext.getString(R.string.call_record_folder_name); } else { @@ -325,7 +325,7 @@ public class BackupUtils { Cursor noteCursor = mContext.getContentResolver().query( Notes.CONTENT_NOTE_URI, // 查询的 URI NOTE_PROJECTION, // 要查询的列名 - NoteColumns.TYPE + "=" + +Notes.TYPE_NOTE + " AND " + NoteColumns.PARENT_ID + "=0", // WHERE 子句 + NoteColumns.TYPE + "=" + Notes.TYPE_NOTE + " AND " + NoteColumns.PARENT_ID + "=0", // WHERE 子句 null, // WHERE 子句中占位符的值 null // 排序方式 ); @@ -334,9 +334,9 @@ public class BackupUtils { if (noteCursor.moveToFirst()) { do { // 打印笔记的最后修改时间 - ps.println(String.format(getFormat(FORMAT_NOTE_DATE), DateFormat.format( + ps.printf((getFormat(FORMAT_NOTE_DATE)) + "%n", DateFormat.format( mContext.getString(R.string.format_datetime_mdhm), - noteCursor.getLong(NOTE_COLUMN_MODIFIED_DATE)))); + noteCursor.getLong(NOTE_COLUMN_MODIFIED_DATE))); // 导出当前笔记的内容 String noteId = noteCursor.getString(NOTE_COLUMN_ID); exportNoteToText(noteId, ps); @@ -353,8 +353,7 @@ public class BackupUtils { } /** * Get a print stream pointed to the file {@generateExportedTextFile} - */ - /** + * * 生成用于将数据输出到文本文件中的PrintStream对象。 * * @return 用于将数据输出到文本文件中的PrintStream对象。 @@ -372,7 +371,7 @@ public class BackupUtils { mFileName = file.getName(); // 将文件目录路径保存在成员变量中。 mFileDirectory = mContext.getString(R.string.file_path); - PrintStream ps = null; + PrintStream ps; try { // 创建一个新的FileOutputStream对象,并将其包装在PrintStream对象中。 FileOutputStream fos = new FileOutputStream(file); diff --git a/app/src/main/java/net/micode/notes/tool/DataUtils.java b/app/src/main/java/net/micode/notes/tool/DataUtils.java index a9a3030..7208e74 100644 --- a/app/src/main/java/net/micode/notes/tool/DataUtils.java +++ b/app/src/main/java/net/micode/notes/tool/DataUtils.java @@ -57,7 +57,7 @@ public class DataUtils { } // 创建操作列表 - ArrayList operationList = new ArrayList(); + ArrayList operationList = new ArrayList<>(); for (long id : ids) { // 不包括系统文件夹根节点 if(id == Notes.ID_ROOT_FOLDER) { @@ -73,15 +73,13 @@ public class DataUtils { // 通过ContentResolver的applyBatch()方法将所有操作提交给ContentProvider执行 ContentProviderResult[] results = resolver.applyBatch(Notes.AUTHORITY, operationList); if (results == null || results.length == 0 || results[0] == null) { - Log.d(TAG, "delete notes failed, ids:" + ids.toString()); + Log.d(TAG, "delete notes failed, ids:" + ids); return false; } // 如果成功则返回true return true; - } catch (RemoteException e) { - Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage())); - } catch (OperationApplicationException e) { - Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage())); + } catch (RemoteException | OperationApplicationException e) { + Log.e(TAG, String.format("%s: %s", e, e.getMessage())); } // 失败则返回false return false; @@ -127,7 +125,7 @@ public class DataUtils { } // 创建操作列表 - ArrayList operationList = new ArrayList(); + ArrayList operationList = new ArrayList<>(); for (long id : ids) { // 创建ContentProviderOperation.Builder对象来构建更新该id的操作,并将其添加到operationList中 ContentProviderOperation.Builder builder = ContentProviderOperation @@ -143,15 +141,13 @@ public class DataUtils { // 通过ContentResolver的applyBatch()方法将所有操作提交给ContentProvider执行 ContentProviderResult[] results = resolver.applyBatch(Notes.AUTHORITY, operationList); if (results == null || results.length == 0 || results[0] == null) { - Log.d(TAG, "move notes failed, ids:" + ids.toString()); + Log.d(TAG, "move notes failed, ids:" + ids); return false; } // 如果成功则返回true return true; - } catch (RemoteException e) { - Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage())); - } catch (OperationApplicationException e) { - Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage())); + } catch (RemoteException | OperationApplicationException e) { + Log.e(TAG, String.format("%s: %s", e, e.getMessage())); } // 失败则返回false return false; @@ -182,7 +178,7 @@ public class DataUtils { // 从Cursor对象中获取查询结果中count字段的值 count = cursor.getInt(0); } catch (IndexOutOfBoundsException e) { - Log.e(TAG, "get folder count failed:" + e.toString()); + Log.e(TAG, "get folder count failed:" + e); } finally { // 关闭游标 cursor.close(); @@ -314,7 +310,7 @@ public class DataUtils { HashSet set = null; if (c != null) { if (c.moveToFirst()) { - set = new HashSet(); + set = new HashSet<>(); do { try { // 从Cursor对象中获取查询结果中Widget的id和类型,并将其封装到AppWidgetAttribute对象中 @@ -354,7 +350,7 @@ public class DataUtils { try { return cursor.getString(0); } catch (IndexOutOfBoundsException e) { - Log.e(TAG, "Get call number fails " + e.toString()); + Log.e(TAG, "Get call number fails " + e); } finally { // 关闭游标 cursor.close(); @@ -386,7 +382,7 @@ public class DataUtils { try { return cursor.getLong(0); } catch (IndexOutOfBoundsException e) { - Log.e(TAG, "Get call note id fails " + e.toString()); + Log.e(TAG, "Get call note id fails " + e); } } // 关闭游标 diff --git a/app/src/main/java/net/micode/notes/tool/NoteHttpServer.java b/app/src/main/java/net/micode/notes/tool/NoteHttpServer.java index 0d5d201..857c141 100644 --- a/app/src/main/java/net/micode/notes/tool/NoteHttpServer.java +++ b/app/src/main/java/net/micode/notes/tool/NoteHttpServer.java @@ -9,22 +9,10 @@ import java.util.Iterator; public class NoteHttpServer { - public enum BodyType { - JSON, FORM_DATA - } - private final OkHttpClient client = new OkHttpClient(); - public static final String FROM_DATA = "formdata"; + public static final String FORM_DATA = "formdata"; public static final String JSON = "json"; - /** - * sync get - * - * @param url the url to send the request to - * @return the response body as a string - * @throws IOException if the request fails - */ - public String sendSyncGetRequest(HttpUrl url) throws IOException { Request req = new Request.Builder() .url(url) @@ -34,11 +22,6 @@ public class NoteHttpServer { } } - /** - * @param url the url to send the request to - * @param callback the callback to be executed *when the request is complete - * @return the response body as a string - */ public void sendAsyncGetRequest(HttpUrl url, Callback callback) { Request req = new Request.Builder() .url(url) @@ -46,39 +29,11 @@ public class NoteHttpServer { client.newCall(req).enqueue(callback); } - - /** - * sync post - * - * @param url the url to send the request to - * @param body the body of the request - * @param bodyType the type of the body - * @return the response body as a string - */ public String sendSyncPostRequest(HttpUrl url, String body, BodyType bodyType) throws IOException { - RequestBody requestBody; - switch (bodyType) { - case JSON: - requestBody = RequestBody.create(MediaType.parse("application/json"), body); - break; - case FORM_DATA: - FormBody.Builder formBuilder = new FormBody.Builder(); - try { - JSONObject jsonObject = new JSONObject(body); - Iterator keys = jsonObject.keys(); - while (keys.hasNext()) { - String key = keys.next(); - String value = jsonObject.getString(key); - formBuilder.add(key, value); - } - } catch (JSONException e) { - // Handle exception - return null; - } - requestBody = formBuilder.build(); - default: - // Invalid body type - return null; + RequestBody requestBody = createRequestBody(body, bodyType); + + if (requestBody == null) { + return null; } Request req = new Request.Builder() @@ -91,12 +46,22 @@ public class NoteHttpServer { } } - /** - * @param url the url to send the request to - * @param body the body of the request - * @param bodyType the type of the body - */ - public void sendAsyncPostRequest(HttpUrl url, String body, BodyType bodyType, Callback callback) throws JSONException, IllegalArgumentException { + public void sendAsyncPostRequest(HttpUrl url, String body, BodyType bodyType, Callback callback) { + RequestBody requestBody = createRequestBody(body, bodyType); + + if (requestBody == null) { + return; + } + + Request req = new Request.Builder() + .url(url) + .post(requestBody) + .build(); + + client.newCall(req).enqueue(callback); + } + + private RequestBody createRequestBody(String body, BodyType bodyType) { RequestBody requestBody; switch (bodyType) { case JSON: @@ -104,26 +69,27 @@ public class NoteHttpServer { break; case FORM_DATA: FormBody.Builder formBuilder = new FormBody.Builder(); - JSONObject jsonObject = new JSONObject(body); - Iterator keysIterator = jsonObject.keys(); - while (keysIterator.hasNext()) { - String key = keysIterator.next(); - String value = jsonObject.getString(key); - formBuilder.add(key, value); + try { + JSONObject jsonObject = new JSONObject(body); + Iterator keys = jsonObject.keys(); + while (keys.hasNext()) { + String key = keys.next(); + String value = jsonObject.getString(key); + formBuilder.add(key, value); + } + } catch (JSONException e) { + e.printStackTrace(); + return null; } requestBody = formBuilder.build(); break; default: - throw new IllegalArgumentException("Invalid content type: " + bodyType); + return null; } - - Request req = new Request.Builder() - .url(url) - .post(requestBody) - .build(); - - client.newCall(req).enqueue(callback); + return requestBody; } - + public enum BodyType { + JSON, FORM_DATA + } } diff --git a/app/src/main/java/net/micode/notes/tool/SyncNoteUtils.java b/app/src/main/java/net/micode/notes/tool/SyncNoteUtils.java index bda3626..f05c0d6 100644 --- a/app/src/main/java/net/micode/notes/tool/SyncNoteUtils.java +++ b/app/src/main/java/net/micode/notes/tool/SyncNoteUtils.java @@ -2,11 +2,7 @@ package net.micode.notes.tool; import android.app.Activity; import android.content.Context; -import android.nfc.Tag; -import android.util.Log; -import android.widget.Toast; import com.google.gson.Gson; -import net.micode.notes.callback.NoteCallback; import okhttp3.Call; import okhttp3.Callback; import okhttp3.HttpUrl; @@ -41,7 +37,7 @@ public class SyncNoteUtils { } @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + public void onResponse(@NotNull Call call, @NotNull Response response) { UIUtils.sendMsg((Activity) context, "同步成功"); } }); diff --git a/app/src/main/java/net/micode/notes/tool/UIUtils.java b/app/src/main/java/net/micode/notes/tool/UIUtils.java index e5b929a..bbdb2b5 100644 --- a/app/src/main/java/net/micode/notes/tool/UIUtils.java +++ b/app/src/main/java/net/micode/notes/tool/UIUtils.java @@ -1,20 +1,13 @@ package net.micode.notes.tool; import android.app.Activity; -import android.content.Context; import android.widget.Toast; import net.micode.notes.callback.NoteCallback; -import okhttp3.Callback; public class UIUtils { public static void runInUI(Activity activity, NoteCallback callback) { - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - callback.execute(); - } - }); + activity.runOnUiThread(callback::execute); } public static void sendMsg(Activity activity, String msg) { diff --git a/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java b/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java index d9505d2..54c789c 100644 --- a/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java +++ b/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java @@ -81,7 +81,7 @@ public class AlarmAlertActivity extends Activity implements OnClickListener, OnD // 获取 intent 中传递的笔记 ID,并根据 ID 获取笔记摘录 Intent intent = getIntent(); try { - mNoteId = Long.valueOf(intent.getData().getPathSegments().get(1)); + mNoteId = Long.parseLong(intent.getData().getPathSegments().get(1)); mSnippet = DataUtils.getSnippetById(this.getContentResolver(), mNoteId); // 将笔记摘录截取到预设的最大长度,并添加省略号 @@ -139,13 +139,7 @@ public class AlarmAlertActivity extends Activity implements OnClickListener, OnD mPlayer.prepare(); mPlayer.setLooping(true); mPlayer.start(); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (SecurityException e) { - e.printStackTrace(); - } catch (IllegalStateException e) { - e.printStackTrace(); - } catch (IOException e) { + } catch (IllegalArgumentException | SecurityException | IllegalStateException | IOException e) { e.printStackTrace(); } } @@ -177,16 +171,11 @@ public class AlarmAlertActivity extends Activity implements OnClickListener, OnD */ public void onClick(DialogInterface dialog, int which) { // 根据不同的按钮类型执行不同的操作 - switch (which) { - case DialogInterface.BUTTON_NEGATIVE: - // 如果点击了“进入”按钮,则打开笔记编辑界面并查看当前笔记 - Intent intent = new Intent(this, NoteEditActivity.class); - intent.setAction(Intent.ACTION_VIEW); - intent.putExtra(Intent.EXTRA_UID, mNoteId); - startActivity(intent); - break; - default: - break; + if (which == DialogInterface.BUTTON_NEGATIVE) {// 如果点击了“进入”按钮,则打开笔记编辑界面并查看当前笔记 + Intent intent = new Intent(this, NoteEditActivity.class); + intent.setAction(Intent.ACTION_VIEW); + intent.putExtra(Intent.EXTRA_UID, mNoteId); + startActivity(intent); } } diff --git a/app/src/main/java/net/micode/notes/ui/BackupListAdapter.java b/app/src/main/java/net/micode/notes/ui/BackupListAdapter.java index a35b59e..5ec6563 100644 --- a/app/src/main/java/net/micode/notes/ui/BackupListAdapter.java +++ b/app/src/main/java/net/micode/notes/ui/BackupListAdapter.java @@ -16,14 +16,13 @@ import java.util.ArrayList; public class BackupListAdapter extends CursorAdapter { - //tag private static final String TAG = "chenqy"; - private ArrayList mSelectedIndex; + private ArrayList mSelectedList; private OnAllCheckedListener mCallback; public BackupListAdapter(Context context, Cursor c, OnAllCheckedListener callback) { super(context, c, 0); - mSelectedIndex = new ArrayList<>(); + mSelectedList = new ArrayList<>(); this.mCallback = callback; } @@ -40,51 +39,48 @@ public class BackupListAdapter extends CursorAdapter { @SuppressLint("Range") @Override public void bindView(View view, Context context, Cursor cursor) { - TextView tv = (TextView) view.findViewById(R.id.note_menu_list_item_tv); + TextView tv = view.findViewById(R.id.note_menu_list_item_tv); tv.setText(cursor.getString(cursor.getColumnIndex(Notes.NoteColumns.SNIPPET))); - NoteCheckBox cb = (NoteCheckBox) view.findViewById(R.id.note_menu_list_item_cb); + NoteCheckBox cb = view.findViewById(R.id.note_menu_list_item_cb); cb.setNoteId(cursor.getLong(cursor.getColumnIndex(Notes.NoteColumns.ID))); - view.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Log.e(TAG, "getCount" + getCount()); - if (cb.isChecked()) { - mSelectedIndex.remove(cb.getNoteId()); - cb.setChecked(false); - } else { - mSelectedIndex.add(cb.getNoteId()); - cb.setChecked(true); - } - if (mSelectedIndex.size() == getCount()) { - mCallback.onAllChecked(true); - }else{ - mCallback.onAllChecked(false); - } - + view.setOnClickListener(v -> { + Log.e(TAG, "getCount" + getCount()); + if (cb.isChecked()) { + mSelectedList.remove(cb.getNoteId()); + cb.setChecked(false); + } else { + mSelectedList.add(cb.getNoteId()); + cb.setChecked(true); } + if (mSelectedList.size() == getCount()) { + mCallback.onAllChecked(true); + }else{ + mCallback.onAllChecked(false); + } + }); - cb.setChecked(mSelectedIndex.contains(cb.getNoteId())); + cb.setChecked(mSelectedList.contains(cb.getNoteId())); } public ArrayList getmSelectedIndex() { - return mSelectedIndex; + return mSelectedList; } @SuppressLint("Range") public void changeAll(boolean isChecked) { Log.e(TAG, "changeAll"); - mSelectedIndex.clear(); + mSelectedList.clear(); if (isChecked) { Cursor cursor = getCursor(); if (cursor != null) { cursor.moveToFirst(); while (!cursor.isAfterLast()) { - mSelectedIndex.add(cursor.getLong(cursor.getColumnIndex(Notes.NoteColumns.ID))); + mSelectedList.add(cursor.getLong(cursor.getColumnIndex(Notes.NoteColumns.ID))); cursor.moveToNext(); } } } - Log.e(TAG, "mselectedList" + mSelectedIndex.toString()); + Log.e(TAG, "selectedList" + mSelectedList.toString()); notifyDataSetChanged(); } diff --git a/app/src/main/java/net/micode/notes/ui/DateTimePicker.java b/app/src/main/java/net/micode/notes/ui/DateTimePicker.java index 496b0cd..cd10826 100644 --- a/app/src/main/java/net/micode/notes/ui/DateTimePicker.java +++ b/app/src/main/java/net/micode/notes/ui/DateTimePicker.java @@ -50,9 +50,9 @@ public class DateTimePicker extends FrameLayout { private final NumberPicker mHourSpinner; private final NumberPicker mMinuteSpinner; private final NumberPicker mAmPmSpinner; - private Calendar mDate; + private final Calendar mDate; - private String[] mDateDisplayValues = new String[DAYS_IN_ALL_WEEK]; + private final String[] mDateDisplayValues = new String[DAYS_IN_ALL_WEEK]; private boolean mIsAm; @@ -160,7 +160,7 @@ public class DateTimePicker extends FrameLayout { public interface OnDateTimeChangedListener { void onDateTimeChanged(DateTimePicker view, int year, int month, - int dayOfMonth, int hourOfDay, int minute); + int dayOfMonth, int hourOfDay, int minute); } public DateTimePicker(Context context) { @@ -178,21 +178,21 @@ public class DateTimePicker extends FrameLayout { mIsAm = getCurrentHourOfDay() >= HOURS_IN_HALF_DAY; inflate(context, R.layout.datetime_picker, this); - mDateSpinner = (NumberPicker) findViewById(R.id.date); + mDateSpinner = findViewById(R.id.date); mDateSpinner.setMinValue(DATE_SPINNER_MIN_VAL); mDateSpinner.setMaxValue(DATE_SPINNER_MAX_VAL); mDateSpinner.setOnValueChangedListener(mOnDateChangedListener); - mHourSpinner = (NumberPicker) findViewById(R.id.hour); + mHourSpinner = findViewById(R.id.hour); mHourSpinner.setOnValueChangedListener(mOnHourChangedListener); - mMinuteSpinner = (NumberPicker) findViewById(R.id.minute); + mMinuteSpinner = findViewById(R.id.minute); mMinuteSpinner.setMinValue(MINUT_SPINNER_MIN_VAL); mMinuteSpinner.setMaxValue(MINUT_SPINNER_MAX_VAL); mMinuteSpinner.setOnLongPressUpdateInterval(100); mMinuteSpinner.setOnValueChangedListener(mOnMinuteChangedListener); String[] stringsForAmPm = new DateFormatSymbols().getAmPmStrings(); - mAmPmSpinner = (NumberPicker) findViewById(R.id.amPm); + mAmPmSpinner = findViewById(R.id.amPm); mAmPmSpinner.setMinValue(AMPM_SPINNER_MIN_VAL); mAmPmSpinner.setMaxValue(AMPM_SPINNER_MAX_VAL); mAmPmSpinner.setDisplayedValues(stringsForAmPm); @@ -256,14 +256,14 @@ public class DateTimePicker extends FrameLayout { /** * Set the current date * - * @param year The current year - * @param month The current month + * @param year The current year + * @param month The current month * @param dayOfMonth The current dayOfMonth - * @param hourOfDay The current hourOfDay - * @param minute The current minute + * @param hourOfDay The current hourOfDay + * @param minute The current minute */ public void setCurrentDate(int year, int month, - int dayOfMonth, int hourOfDay, int minute) { + int dayOfMonth, int hourOfDay, int minute) { setCurrentYear(year); setCurrentMonth(month); setCurrentDay(dayOfMonth); @@ -342,6 +342,7 @@ public class DateTimePicker extends FrameLayout { /** * Get current hour in 24 hour mode, in the range (0~23) + * * @return The current hour in 24 hour mode */ public int getCurrentHourOfDay() { @@ -349,7 +350,7 @@ public class DateTimePicker extends FrameLayout { } private int getCurrentHour() { - if (mIs24HourView){ + if (mIs24HourView) { return getCurrentHourOfDay(); } else { int hour = getCurrentHourOfDay(); @@ -363,7 +364,6 @@ public class DateTimePicker extends FrameLayout { /** * Set current hour in 24 hour mode, in the range (0~23) - * * @param hourOfDay */ public void setCurrentHour(int hourOfDay) { @@ -413,7 +413,7 @@ public class DateTimePicker extends FrameLayout { /** * @return true if this is in 24 hour view else false. */ - public boolean is24HourView () { + public boolean is24HourView() { return mIs24HourView; } @@ -470,6 +470,7 @@ public class DateTimePicker extends FrameLayout { /** * Set the callback that indicates the 'Set' button has been pressed. + * * @param callback the callback, if null will do nothing */ public void setOnDateTimeChangedListener(OnDateTimeChangedListener callback) { diff --git a/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java b/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java index 2c47ba4..b924c58 100644 --- a/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java +++ b/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java @@ -16,18 +16,15 @@ package net.micode.notes.ui; -import java.util.Calendar; - -import net.micode.notes.R; -import net.micode.notes.ui.DateTimePicker; -import net.micode.notes.ui.DateTimePicker.OnDateTimeChangedListener; - import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.text.format.DateFormat; import android.text.format.DateUtils; +import net.micode.notes.R; + +import java.util.Calendar; public class DateTimePickerDialog extends AlertDialog implements OnClickListener { @@ -44,22 +41,19 @@ public class DateTimePickerDialog extends AlertDialog implements OnClickListener super(context); mDateTimePicker = new DateTimePicker(context); setView(mDateTimePicker); - mDateTimePicker.setOnDateTimeChangedListener(new OnDateTimeChangedListener() { - public void onDateTimeChanged(DateTimePicker view, int year, int month, - int dayOfMonth, int hourOfDay, int minute) { - mDate.set(Calendar.YEAR, year); - mDate.set(Calendar.MONTH, month); - mDate.set(Calendar.DAY_OF_MONTH, dayOfMonth); - mDate.set(Calendar.HOUR_OF_DAY, hourOfDay); - mDate.set(Calendar.MINUTE, minute); - updateTitle(mDate.getTimeInMillis()); - } + mDateTimePicker.setOnDateTimeChangedListener((view, year, month, dayOfMonth, hourOfDay, minute) -> { + mDate.set(Calendar.YEAR, year); + mDate.set(Calendar.MONTH, month); + mDate.set(Calendar.DAY_OF_MONTH, dayOfMonth); + mDate.set(Calendar.HOUR_OF_DAY, hourOfDay); + mDate.set(Calendar.MINUTE, minute); + updateTitle(mDate.getTimeInMillis()); }); mDate.setTimeInMillis(date); mDate.set(Calendar.SECOND, 0); mDateTimePicker.setCurrentDate(mDate.getTimeInMillis()); setButton(context.getString(R.string.datetime_dialog_ok), this); - setButton2(context.getString(R.string.datetime_dialog_cancel), (OnClickListener)null); + setButton(context.getString(R.string.datetime_dialog_cancel), (OnClickListener) null); set24HourView(DateFormat.is24HourFormat(this.getContext())); updateTitle(mDate.getTimeInMillis()); } @@ -77,7 +71,7 @@ public class DateTimePickerDialog extends AlertDialog implements OnClickListener DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME; - flag |= mIs24HourView ? DateUtils.FORMAT_24HOUR : DateUtils.FORMAT_24HOUR; + flag |= DateUtils.FORMAT_24HOUR; setTitle(DateUtils.formatDateTime(this.getContext(), date, flag)); } diff --git a/app/src/main/java/net/micode/notes/ui/DropdownMenu.java b/app/src/main/java/net/micode/notes/ui/DropdownMenu.java index 613dc74..8fedab9 100644 --- a/app/src/main/java/net/micode/notes/ui/DropdownMenu.java +++ b/app/src/main/java/net/micode/notes/ui/DropdownMenu.java @@ -19,18 +19,15 @@ package net.micode.notes.ui; import android.content.Context; import android.view.Menu; import android.view.MenuItem; -import android.view.View; -import android.view.View.OnClickListener; import android.widget.Button; import android.widget.PopupMenu; import android.widget.PopupMenu.OnMenuItemClickListener; - import net.micode.notes.R; public class DropdownMenu { - private Button mButton; - private PopupMenu mPopupMenu; - private Menu mMenu; + private final Button mButton; + private final PopupMenu mPopupMenu; + private final Menu mMenu; public DropdownMenu(Context context, Button button, int menuId) { mButton = button; @@ -38,11 +35,7 @@ public class DropdownMenu { mPopupMenu = new PopupMenu(context, mButton); mMenu = mPopupMenu.getMenu(); mPopupMenu.getMenuInflater().inflate(menuId, mMenu); - mButton.setOnClickListener(new OnClickListener() { - public void onClick(View v) { - mPopupMenu.show(); - } - }); + mButton.setOnClickListener(v -> mPopupMenu.show()); } public void setOnDropdownMenuItemClickListener(OnMenuItemClickListener listener) { diff --git a/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java b/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java index 96b77da..8f81a89 100644 --- a/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java +++ b/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java @@ -63,13 +63,13 @@ public class FoldersListAdapter extends CursorAdapter { .getString(R.string.menu_move_parent_folder) : cursor.getString(NAME_COLUMN); } - private class FolderListItem extends LinearLayout { - private TextView mName; + private static class FolderListItem extends LinearLayout { + private final TextView mName; public FolderListItem(Context context) { super(context); inflate(context, R.layout.folder_list_item, this); - mName = (TextView) findViewById(R.id.tv_folder_name); + mName = findViewById(R.id.tv_folder_name); } public void bind(String name) { diff --git a/app/src/main/java/net/micode/notes/ui/NbButton.java b/app/src/main/java/net/micode/notes/ui/NbButton.java index 661117e..3cf2e86 100644 --- a/app/src/main/java/net/micode/notes/ui/NbButton.java +++ b/app/src/main/java/net/micode/notes/ui/NbButton.java @@ -11,13 +11,8 @@ import android.graphics.drawable.GradientDrawable; import android.util.AttributeSet; import android.view.View; import android.view.animation.LinearInterpolator; -import android.widget.Button; import net.micode.notes.R; -/** - * Created by tong.zhang on 2017/12/1. - */ - public class NbButton extends androidx.appcompat.widget.AppCompatButton { private int width; @@ -34,30 +29,28 @@ public class NbButton extends androidx.appcompat.widget.AppCompatButton { public NbButton(Context context) { super(context); - init(context); + init(); } public NbButton(Context context, AttributeSet attrs) { super(context, attrs); - init(context); + init(); } public NbButton(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - init(context); + init(); } - private void init(Context context) { + private void init() { isMorphing=false; backDrawable=new GradientDrawable(); - int colorDrawable=getResources().getColor(R.color.cutePink); + int colorDrawable= getResources().getColor(R.color.cutePink); backDrawable.setColor(colorDrawable); backDrawable.setCornerRadius(120); setBackgroundDrawable(backDrawable); -// setText("登陆"); - paint=new Paint(); paint.setColor(getResources().getColor(R.color.white)); paint.setStrokeWidth(4); @@ -88,25 +81,20 @@ public class NbButton extends androidx.appcompat.widget.AppCompatButton { setText(""); ValueAnimator valueAnimator=ValueAnimator.ofInt(width,heigh); - valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - @Override - public void onAnimationUpdate(ValueAnimator animation) { - int value= (int) animation.getAnimatedValue(); - int leftOffset=(width-value)/2; - int rightOffset=width-leftOffset; + valueAnimator.addUpdateListener(animation -> { + int value= (int) animation.getAnimatedValue(); + int leftOffset=(width-value)/2; + int rightOffset=width-leftOffset; - backDrawable.setBounds(leftOffset,0,rightOffset,heigh); - } + backDrawable.setBounds(leftOffset,0,rightOffset,heigh); }); - ObjectAnimator objectAnimator=ObjectAnimator.ofFloat(backDrawable,"cornerRadius",120,heigh/2); + ObjectAnimator objectAnimator=ObjectAnimator.ofFloat(backDrawable,"cornerRadius",120, (float) heigh /2); AnimatorSet animatorSet=new AnimatorSet(); animatorSet.setDuration(500); animatorSet.playTogether(valueAnimator,objectAnimator); animatorSet.start(); - //画中间的白色圆圈 - showArc(); } public void gotoNew(){ @@ -121,19 +109,14 @@ public class NbButton extends androidx.appcompat.widget.AppCompatButton { backDrawable.setBounds(0,0,width,heigh); backDrawable.setCornerRadius(24); setBackgroundDrawable(backDrawable); -// setBackground(backDrawable); -// setText("登陆"); isMorphing=false; } private void showArc() { arcValueAnimator=ValueAnimator.ofInt(0,1080); - arcValueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - @Override - public void onAnimationUpdate(ValueAnimator animation) { - startAngle= (int) animation.getAnimatedValue(); - invalidate(); - } + arcValueAnimator.addUpdateListener(animation -> { + startAngle= (int) animation.getAnimatedValue(); + invalidate(); }); arcValueAnimator.setInterpolator(new LinearInterpolator()); arcValueAnimator.setRepeatCount(ValueAnimator.INFINITE); @@ -147,8 +130,8 @@ public class NbButton extends androidx.appcompat.widget.AppCompatButton { protected void onDraw(final Canvas canvas) { super.onDraw(canvas); - if (isMorphing==true){ - final RectF rectF=new RectF(getWidth()*5/12,getHeight()/7,getWidth()*7/12,getHeight()-getHeight()/7); + if (isMorphing){ + final RectF rectF=new RectF((float) (getWidth() * 5) /12, (float) getHeight() /7, (float) (getWidth() * 7) /12,getHeight()-getHeight()/7); canvas.drawArc(rectF,startAngle,270,false,paint); } } diff --git a/app/src/main/java/net/micode/notes/ui/NoteCheckBox.java b/app/src/main/java/net/micode/notes/ui/NoteCheckBox.java index 58a6953..683899f 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteCheckBox.java +++ b/app/src/main/java/net/micode/notes/ui/NoteCheckBox.java @@ -6,13 +6,11 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.util.Log; -import android.widget.CheckBox; import android.widget.CompoundButton; import net.micode.notes.R; public class NoteCheckBox extends androidx.appcompat.widget.AppCompatCheckBox implements CompoundButton.OnCheckedChangeListener { - //tag private static final String TAG = "chenqy"; private long note_id; @@ -34,7 +32,6 @@ public class NoteCheckBox extends androidx.appcompat.widget.AppCompatCheckBox im @Override protected void onAttachedToWindow() { init(); -// setEnabled(false); super.onAttachedToWindow(); } @@ -57,10 +54,10 @@ public class NoteCheckBox extends androidx.appcompat.widget.AppCompatCheckBox im public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { Log.e(TAG, "onCheckedChanged "); if (isChecked) { - Log.e(TAG, "onCheckedChanged: " + isChecked); + Log.e(TAG, "onCheckedChanged: " + true); this.setCompoundDrawablesWithIntrinsicBounds(null, null, bitmapDrawable, null); } else { - Log.e(TAG, "onCheckedChanged: " + isChecked); + Log.e(TAG, "onCheckedChanged: " + false); this.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); } } diff --git a/app/src/main/java/net/micode/notes/ui/NoteEditText.java b/app/src/main/java/net/micode/notes/ui/NoteEditText.java index 8f88208..c9100f8 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteEditText.java +++ b/app/src/main/java/net/micode/notes/ui/NoteEditText.java @@ -30,8 +30,6 @@ import android.view.KeyEvent; import android.view.MenuItem; import android.view.MenuItem.OnMenuItemClickListener; import android.view.MotionEvent; -import android.widget.EditText; - import net.micode.notes.R; import java.util.HashMap; @@ -46,7 +44,7 @@ public class NoteEditText extends androidx.appcompat.widget.AppCompatEditText { private static final String SCHEME_HTTP = "http:" ; private static final String SCHEME_EMAIL = "mailto:" ; - private static final Map sSchemaActionResMap = new HashMap(); + private static final Map sSchemaActionResMap = new HashMap<>(); static { sSchemaActionResMap.put(SCHEME_TEL, R.string.note_link_tel); sSchemaActionResMap.put(SCHEME_HTTP, R.string.note_link_web); @@ -101,21 +99,18 @@ public class NoteEditText extends androidx.appcompat.widget.AppCompatEditText { @Override public boolean onTouchEvent(MotionEvent event) { - switch (event.getAction()) { - case MotionEvent.ACTION_DOWN: - - int x = (int) event.getX(); - int y = (int) event.getY(); - x -= getTotalPaddingLeft(); - y -= getTotalPaddingTop(); - x += getScrollX(); - y += getScrollY(); - - Layout layout = getLayout(); - int line = layout.getLineForVertical(y); - int off = layout.getOffsetForHorizontal(line, x); - Selection.setSelection(getText(), off); - break; + if (event.getAction() == MotionEvent.ACTION_DOWN) { + int x = (int) event.getX(); + int y = (int) event.getY(); + x -= getTotalPaddingLeft(); + y -= getTotalPaddingTop(); + x += getScrollX(); + y += getScrollY(); + + Layout layout = getLayout(); + int line = layout.getLineForVertical(y); + int off = layout.getOffsetForHorizontal(line, x); + Selection.setSelection(getText(), off); } return super.onTouchEvent(event); @@ -170,29 +165,25 @@ public class NoteEditText extends androidx.appcompat.widget.AppCompatEditText { @Override protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { if (mOnTextViewChangeListener != null) { - if (!focused && TextUtils.isEmpty(getText())) { - mOnTextViewChangeListener.onTextChange(mIndex, false); - } else { - mOnTextViewChangeListener.onTextChange(mIndex, true); - } + mOnTextViewChangeListener.onTextChange(mIndex, focused || !TextUtils.isEmpty(getText())); } super.onFocusChanged(focused, direction, previouslyFocusedRect); } @Override protected void onCreateContextMenu(ContextMenu menu) { - if (getText() instanceof Spanned) { + if (getText() != null) { int selStart = getSelectionStart(); int selEnd = getSelectionEnd(); int min = Math.min(selStart, selEnd); int max = Math.max(selStart, selEnd); - final URLSpan[] urls = ((Spanned) getText()).getSpans(min, max, URLSpan.class); + final URLSpan[] urls = getText().getSpans(min, max, URLSpan.class); if (urls.length == 1) { int defaultResId = 0; for(String schema: sSchemaActionResMap.keySet()) { - if(urls[0].getURL().indexOf(schema) >= 0) { + if(urls[0].getURL().contains(schema)) { defaultResId = sSchemaActionResMap.get(schema); break; } @@ -203,12 +194,10 @@ public class NoteEditText extends androidx.appcompat.widget.AppCompatEditText { } menu.add(0, 0, 0, defaultResId).setOnMenuItemClickListener( - new OnMenuItemClickListener() { - public boolean onMenuItemClick(MenuItem item) { - // goto a new intent - urls[0].onClick(NoteEditText.this); - return true; - } + item -> { + // goto a new intent + urls[0].onClick(NoteEditText.this); + return true; }); } } diff --git a/app/src/main/java/net/micode/notes/ui/NoteLoginActivity.java b/app/src/main/java/net/micode/notes/ui/NoteLoginActivity.java index 0a7b604..ee8acd7 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteLoginActivity.java +++ b/app/src/main/java/net/micode/notes/ui/NoteLoginActivity.java @@ -15,12 +15,14 @@ import android.widget.EditText; import android.widget.RelativeLayout; import android.widget.Toast; import net.micode.notes.R; -import net.micode.notes.callback.NoteCallback; import net.micode.notes.data.Auth; import net.micode.notes.tool.NoteHttpServer; import net.micode.notes.tool.NoteRemoteConfig; import net.micode.notes.tool.UIUtils; -import okhttp3.*; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.HttpUrl; +import okhttp3.Response; import org.jetbrains.annotations.NotNull; import org.json.JSONException; import org.json.JSONObject; @@ -33,7 +35,6 @@ public class NoteLoginActivity extends Activity { private static final String TAG = "chenqy"; private NoteHttpServer server; private NbButton btn_login; - private Button btn_verification; private EditText note_login_phone_num; private EditText note_verification_code; private RelativeLayout rlContent; @@ -52,19 +53,17 @@ public class NoteLoginActivity extends Activity { initResources(); try { checkLogin(); - } catch (JSONException e) { - throw new RuntimeException(e); - } catch (IOException e) { + } catch (JSONException | IOException e) { throw new RuntimeException(e); } } private void bindViews() { - btn_login = (NbButton) findViewById(R.id.btn_login); - note_verification_code = (EditText) findViewById(R.id.note_verification_code); - note_login_phone_num = (EditText) findViewById(R.id.note_login_phone_num); - rlContent = (RelativeLayout) findViewById(R.id.btn_login_area); + btn_login = findViewById(R.id.btn_login); + note_verification_code = findViewById(R.id.note_verification_code); + note_login_phone_num = findViewById(R.id.note_login_phone_num); + rlContent = findViewById(R.id.btn_login_area); rlContent.getBackground().setAlpha(0); handler = new Handler(); @@ -74,17 +73,12 @@ public class NoteLoginActivity extends Activity { context = this; server = new NoteHttpServer(); - btn_login.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - //check verifycode是否合法 合法就跳转 - try { - checkVerifyCode(); - } catch (IOException e) { - throw new RuntimeException(e); - } catch (JSONException e) { - throw new RuntimeException(e); - } + btn_login.setOnClickListener(v -> { + //check verifycode是否合法 合法就跳转 + try { + checkVerifyCode(); + } catch (IOException | JSONException e) { + throw new RuntimeException(e); } }); } @@ -104,14 +98,14 @@ public class NoteLoginActivity extends Activity { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { String resStr = response.body().string(); - JSONObject resJson = null; + JSONObject resJson; try { resJson = new JSONObject(resStr); } catch (JSONException e) { Log.e(TAG, "NoteListActivity checkLogin JSONObject转化失败"); return; } - int code = 0; + int code; try { code = resJson.getInt("code"); } catch (JSONException e) { @@ -138,7 +132,6 @@ public class NoteLoginActivity extends Activity { JSONObject jsonObject = new JSONObject(); jsonObject.put("phone", phone_num); jsonObject.put("verifycode", verify_code); - String status = ""; server.sendAsyncPostRequest(url, jsonObject.toString(), NoteHttpServer.BodyType.FORM_DATA, new Callback() { @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { @@ -147,20 +140,20 @@ public class NoteLoginActivity extends Activity { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - JSONObject responseJson = null; + JSONObject responseJson; try { responseJson = new JSONObject(response.body().string()); } catch (JSONException e) { throw new RuntimeException(e); } - int code = -1; + int code; try { code = responseJson.getInt("code"); } catch (JSONException e) { throw new RuntimeException(e); } if (code == NoteRemoteConfig.RESPONSE_SUCCESS) { - String token = null; + String token; try { token = responseJson.getString("data"); } catch (JSONException e) { @@ -188,23 +181,18 @@ public class NoteLoginActivity extends Activity { private void gotoNew() { btn_login.gotoNew(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - int xc = (btn_login.getLeft() + btn_login.getRight()) / 2; - int yc = (btn_login.getTop() + btn_login.getBottom()) / 2; - animator = ViewAnimationUtils.createCircularReveal(rlContent, xc, yc, 0, 1111); - } + int xc = (btn_login.getLeft() + btn_login.getRight()) / 2; + int yc = (btn_login.getTop() + btn_login.getBottom()) / 2; + animator = ViewAnimationUtils.createCircularReveal(rlContent, xc, yc, 0, 1111); animator.setDuration(300); animator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { - handler.postDelayed(new Runnable() { - @Override - public void run() { - goNoteList(); - overridePendingTransition(R.anim.anim_in, R.anim.anim_out); + handler.postDelayed(() -> { + goNoteList(); + overridePendingTransition(R.anim.anim_in, R.anim.anim_out); - } }, 200); } @@ -248,7 +236,6 @@ public class NoteLoginActivity extends Activity { if (System.currentTimeMillis() - mExitTime > 2000) { Toast.makeText(this, R.string.press_again_exit, Toast.LENGTH_SHORT).show(); mExitTime = System.currentTimeMillis(); - return; } else { super.onBackPressed(); } diff --git a/app/src/main/java/net/micode/notes/ui/NoteLoginButton.java b/app/src/main/java/net/micode/notes/ui/NoteLoginButton.java deleted file mode 100644 index 18f9175..0000000 --- a/app/src/main/java/net/micode/notes/ui/NoteLoginButton.java +++ /dev/null @@ -1,104 +0,0 @@ -package net.micode.notes.ui; - -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; -import android.animation.AnimatorSet; -import android.animation.ObjectAnimator; -import android.app.Activity; -import android.content.Context; -import android.content.Intent; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; -import android.os.Handler; -import android.util.AttributeSet; -import android.util.Log; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import net.micode.notes.R; - -public class NoteLoginButton extends androidx.appcompat.widget.AppCompatButton implements View.OnClickListener { - - - //tag - private static final String TAG = "chenqy"; - private static final int ANIMATION_DURATION = 500; - private static final int FADE_DURATION = 300; - private static final int CROSS_LENGTH = 120; - private static final int BTN_BG_COLOR = R.color.black; - private Handler handler; - private View btn_mask; - - - public NoteLoginButton(Context context) { - super(context); - } - - public NoteLoginButton(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public NoteLoginButton(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); - init(); - } - - @Override - protected void onDraw(Canvas canvas) { - Log.e(TAG, "onDraw"); - // 在此处绘制按钮的图形 - super.onDraw(canvas); - Paint paint = new Paint(); - paint.setColor(getResources().getColor(BTN_BG_COLOR)); - paint.setAntiAlias(true); - canvas.drawCircle(getWidth() / 2, getHeight() / 2, Math.min(getWidth(), getHeight()) / 2, paint); - paint.setColor(Color.WHITE); - paint.setStrokeWidth(15); - canvas.drawLine(getWidth() / 2, getHeight() / 2 - CROSS_LENGTH / 2, getWidth() / 2, getWidth() / 2 + CROSS_LENGTH / 2, paint); - canvas.drawLine(getWidth() / 2 - CROSS_LENGTH / 2, getHeight() / 2, getWidth() / 2 + CROSS_LENGTH / 2, getHeight() / 2, paint); - } - - private void init() { - // 将 btn_cover 转换为 ViewGroup 类型 - ViewGroup parentLayout = (ViewGroup) getParent(); -// btn_mask = parentLayout.findViewById(R.id.btn_mask); - handler = new Handler(); - setOnClickListener(this); - } - - @Override - public void onClick(View v) { - btn_mask.setVisibility(VISIBLE); - ObjectAnimator scaleX = ObjectAnimator.ofFloat(btn_mask, "scaleX", 1f, 40f); - ObjectAnimator scaleY = ObjectAnimator.ofFloat(btn_mask, "scaleY", 1f, 40f); - ObjectAnimator alpha = ObjectAnimator.ofFloat(btn_mask, "alpha", 1f, 0f); - AnimatorSet animatorSet = new AnimatorSet(); - animatorSet.play(scaleX).with(scaleY); - animatorSet.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - animatorSet.play(alpha); - Intent it = new Intent(getContext(), NoteLoginActivity.class); - it.setAction(Intent.ACTION_VIEW); - getContext().startActivity(it); - ((Activity) getContext()).overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); - handler.postDelayed(new Runnable() { - @Override - public void run() { - btn_mask.setVisibility(GONE); - btn_mask.setScaleX(1f); - btn_mask.setScaleY(1f); - btn_mask.setAlpha(1f); - } - }, 500); - } - }); - animatorSet.start(); - } -} diff --git a/app/src/main/java/net/micode/notes/ui/NoteMenuButton.java b/app/src/main/java/net/micode/notes/ui/NoteMenuButton.java index 33736a3..047d308 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteMenuButton.java +++ b/app/src/main/java/net/micode/notes/ui/NoteMenuButton.java @@ -1,38 +1,25 @@ package net.micode.notes.ui; import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.app.Activity; import android.app.FragmentManager; import android.content.Context; -import android.os.Bundle; import android.util.AttributeSet; -import android.util.DisplayMetrics; import android.util.Log; -import android.view.Gravity; -import android.view.MotionEvent; import android.view.View; import android.view.animation.AlphaAnimation; -import android.widget.Button; -import android.widget.PopupWindow; import android.widget.RelativeLayout; import net.micode.notes.R; public class NoteMenuButton extends androidx.appcompat.widget.AppCompatButton implements View.OnClickListener { + private static final String TAG = "chenqy"; - - //tag - private static final String TAG = "chenqy"; - - //TODO 定制menu - private Context context; private boolean isClickable = true; private RelativeLayout note_menu; - private FragmentManager fm ; - - - - + private FragmentManager fm; + private Context context; public NoteMenuButton(Context context) { super(context); @@ -55,89 +42,60 @@ public class NoteMenuButton extends androidx.appcompat.widget.AppCompatButton im init(); } - private void init(){ - fm = ((Activity)context).getFragmentManager(); - note_menu = ((Activity)context).findViewById(R.id.note_menu); + private void init() { + fm = ((Activity) context).getFragmentManager(); + note_menu = ((Activity) context).findViewById(R.id.note_menu); setOnClickListener(this); } -// @Override -// public void onClick(View v) { -// if(!isClickable) return; -// Log.e(TAG, "onClick"); -// initPopMenu(v); -// } - @Override public void onClick(View v) { - if (!isClickable) return; + if (!isClickable) { + return; + } isClickable = false; Log.e(TAG, "onClick"); - AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f); + + AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f); anim.setDuration(200); note_menu.startAnimation(anim); note_menu.setVisibility(View.VISIBLE); - View container = note_menu.findViewById(R.id.note_menu_container); + NoteMenuMainFragment noteMenuMainFragment = new NoteMenuMainFragment(); noteMenuMainFragment.setCloseListener(() -> { isClickable = true; addEndAnimation(); }); - fm.beginTransaction().replace(R.id.note_menu_container, new NoteMenuMainFragment()).commit(); - // 添加渐变动画效果 + fm.beginTransaction().replace(R.id.note_menu_container, noteMenuMainFragment).commit(); + addStartAnimation(); } - - - public void addStartAnimation(){ + private void addStartAnimation() { ValueAnimator valueAnimator = ValueAnimator.ofFloat(1f, 0.8f); valueAnimator.setDuration(300); - valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - @Override - public void onAnimationUpdate(ValueAnimator animation) { - float scale = (float) animation.getAnimatedValue(); - NoteMenuButton.this.setScaleX(scale); - NoteMenuButton.this.setScaleY(scale); - } + valueAnimator.addUpdateListener(animation -> { + float scale = (float) animation.getAnimatedValue(); + setScaleX(scale); + setScaleY(scale); }); valueAnimator.start(); } - public void addEndAnimation(){ - // 添加渐变动画效果 + private void addEndAnimation() { ValueAnimator valueAnimator = ValueAnimator.ofFloat(0.8f, 1f); valueAnimator.setDuration(300); - valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - @Override - public void onAnimationUpdate(ValueAnimator animation) { - float scale = (float) animation.getAnimatedValue(); - NoteMenuButton.this.setScaleX(scale); - NoteMenuButton.this.setScaleY(scale); - } + valueAnimator.addUpdateListener(animation -> { + float scale = (float) animation.getAnimatedValue(); + setScaleX(scale); + setScaleY(scale); }); - valueAnimator.addListener(new Animator.AnimatorListener() { - @Override - public void onAnimationStart(Animator animation) { - - } - + valueAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { isClickable = true; } - - @Override - public void onAnimationCancel(Animator animation) { - - } - - @Override - public void onAnimationRepeat(Animator animation) { - - } }); valueAnimator.start(); } - } diff --git a/app/src/main/java/net/micode/notes/ui/NoteMenuListFragment.java b/app/src/main/java/net/micode/notes/ui/NoteMenuListFragment.java index 5f9ac8b..4d1b944 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteMenuListFragment.java +++ b/app/src/main/java/net/micode/notes/ui/NoteMenuListFragment.java @@ -12,7 +12,6 @@ import android.content.SharedPreferences; import android.database.Cursor; import android.os.Build; import android.os.Bundle; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -21,8 +20,6 @@ import android.widget.Button; import android.widget.ListView; import android.widget.Switch; import androidx.appcompat.app.AlertDialog; -import com.google.gson.Gson; -import com.google.gson.reflect.TypeToken; import net.micode.notes.R; import net.micode.notes.data.Auth; import net.micode.notes.data.Notes; @@ -34,7 +31,6 @@ import okhttp3.HttpUrl; import okhttp3.Response; import org.jetbrains.annotations.NotNull; import org.json.JSONException; -import org.json.JSONObject; import java.io.IOException; import java.util.ArrayList; @@ -42,14 +38,11 @@ import java.util.List; public class NoteMenuListFragment extends Fragment implements View.OnClickListener { - //tag private static final String TAG = "chenqy"; private ListView lv_note_list; private Button btn_back; private Button btn_close; - //备份按钮 private Button btn_backup; - //同步按钮 private Button btn_sync; private BackupListAdapter backupListAdapter; private SyncListAdapter syncListAdapter; @@ -57,24 +50,22 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen private Switch note_pop_menu_list_switch; private int now_list_type; - public static final String SELECTED_ID_LIST_KEY = "selected_backup_list"; public static final String SHOW_LIST_KEY = "show_list_key"; public static final int SHOW_BACKUP_LIST = 0; public static final int SHOW_SYNC_LIST = 1; - @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - now_list_type = (int) getArguments().get(SHOW_LIST_KEY); + now_list_type = getArguments().getInt(SHOW_LIST_KEY); View view = null; - switch (now_list_type){ + switch (now_list_type) { case SHOW_BACKUP_LIST: - //TODO 需要备份的note清单列表 + // TODO: Display backup note list view = inflater.inflate(R.layout.note_pop_menu_backup_list, container, false); break; case SHOW_SYNC_LIST: - //TODO 需要同步的note清单列表 + // TODO: Display sync note list view = inflater.inflate(R.layout.note_pop_menu_sync_list, container, false); break; } @@ -83,16 +74,16 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen } private void bindView(View container) { - switch (now_list_type){ + switch (now_list_type) { case SHOW_BACKUP_LIST: - //TODO 需要备份的note清单列表 + // TODO: Bind views for backup note list btn_backup = container.findViewById(R.id.note_pop_menu_list_btn_backup); note_pop_menu_list_switch = container.findViewById(R.id.note_pop_menu_list_switch); note_pop_menu_list_switch.setOnCheckedChangeListener((buttonView, isChecked) -> backupListAdapter.changeAll(isChecked)); btn_backup.setOnClickListener(this); break; case SHOW_SYNC_LIST: - //TODO 需要同步的note清单列表 + // TODO: Bind views for sync note list btn_sync = container.findViewById(R.id.note_pop_menu_list_btn_sync); btn_sync.setOnClickListener(this); break; @@ -107,27 +98,23 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen fm = getActivity().getFragmentManager(); btn_back.setOnClickListener(this); btn_close.setOnClickListener(this); - } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - switch (now_list_type){ + switch (now_list_type) { case SHOW_BACKUP_LIST: - //TODO 需要备份的note清单列表 + // TODO: Show backup note list lv_note_list = getActivity().findViewById(R.id.note_pop_menu_lv); - //Cursor cursor = getActivity().getContentResolver().query(Notes.CONTENT_NOTE_URI, null, null, null, null); Cursor cursor = getActivity().getContentResolver().query(Notes.CONTENT_NOTE_URI, null, Notes.NoteColumns.ID + " > ?", new String[]{"0"}, null); - //遍历cursor 将id 放入list backupListAdapter = new BackupListAdapter(getActivity(), cursor, isChecked -> note_pop_menu_list_switch.setChecked(isChecked)); lv_note_list.setAdapter(backupListAdapter); break; case SHOW_SYNC_LIST: - //TODO sync - //从sp获取phone + // TODO: Show sync note list SharedPreferences sp = getActivity().getSharedPreferences(Auth.AUTH_SHARED_NAME, Context.MODE_PRIVATE); - SharedPreferences.Editor editor = sp.edit(); +// SharedPreferences.Editor editor = sp.edit(); String phone = sp.getString(Auth.AUTH_PHONE_KEY, ""); HttpUrl url = HttpUrl.parse(NoteRemoteConfig.generateUrl("/note/getnotes?user_id=" + phone)); NoteHttpServer server = new NoteHttpServer(); @@ -140,20 +127,18 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { String resStr = response.body().string(); + List noteDtos; try { - List noteDtos = SyncNoteUtils.extractNoteData(resStr); - syncListAdapter = new SyncListAdapter(noteDtos,getActivity()); - UIUtils.runInUI(getActivity(), () -> lv_note_list.setAdapter(syncListAdapter)); + noteDtos = SyncNoteUtils.extractNoteData(resStr); } catch (JSONException e) { - UIUtils.sendMsg(getActivity(), "网络错误,获取同步列表失败"); + throw new RuntimeException(e); } - + syncListAdapter = new SyncListAdapter(noteDtos, getActivity()); + UIUtils.runInUI(getActivity(), () -> lv_note_list.setAdapter(syncListAdapter)); } }); - break; } - } @SuppressLint("Range") @@ -162,33 +147,22 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen final int id = v.getId(); switch (id) { case R.id.note_pop_menu_list_btn_backup: - //TODO 启动 backupService 将笔记备份到云端 + // TODO: Start backupService to backup notes to the cloud Intent it = new Intent(NotesListActivity.BACKUP_ACTION); - //从lv_note_list 获得勾选的笔记的id ArrayList selectedIndex = backupListAdapter.getmSelectedIndex(); Bundle args = new Bundle(); - long[] arg_list; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - args.putLongArray(SELECTED_ID_LIST_KEY, selectedIndex.stream().mapToLong(Long::longValue).toArray()); - } else { - arg_list = new long[selectedIndex.size()]; - for (int i = 0; i < selectedIndex.size(); i++) { - arg_list[i] = selectedIndex.get(i); - } - args.putLongArray(SELECTED_ID_LIST_KEY, arg_list); - } + args.putLongArray(SELECTED_ID_LIST_KEY, selectedIndex.stream().mapToLong(Long::longValue).toArray()); it.putExtras(args); getActivity().sendBroadcast(it); break; case R.id.note_pop_menu_list_btn_back: - //TODO 回退到上一级 + // TODO: Navigate back to the previous fragment FragmentTransaction ft = fm.beginTransaction(); ft.setCustomAnimations(android.R.animator.fade_in, android.R.animator.fade_out, android.R.animator.fade_in, android.R.animator.fade_out); ft.replace(R.id.note_menu_container, new NoteMenuMainFragment()).commit(); break; case R.id.note_pop_menu_list_btn_close: - //TODO 关闭当前页面 -// getActivity().findViewById(R.) + // TODO: Close the current page View note_menu = getActivity().findViewById(R.id.note_menu); AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0); alphaAnimation.setDuration(200); @@ -196,25 +170,19 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen note_menu.setVisibility(View.GONE); break; case R.id.note_pop_menu_list_btn_sync: - //TODO sync + // TODO: Perform sync UIUtils.sendMsg(getActivity(), "同步中..."); List selectedList = syncListAdapter.getSelectedList(); int count = 0; for (SyncNoteUtils.SyncNoteItemData itemData : selectedList) { count++; - //根据SyncNoteItemData中的token 查找数据库中是否存在对应的笔记 Cursor cursor = getActivity().getContentResolver().query(Notes.CONTENT_DATA_URI, null, Notes.DataColumns.DATA5 + " = ?", new String[]{itemData.getNote_token()}, null); - //如果存在 - if(cursor.moveToNext()){ - //获取这个笔记的id + if (cursor.moveToNext()) { long noteId = cursor.getLong(cursor.getColumnIndex(Notes.DataColumns.NOTE_ID)); - //触发alert提示用户 同步 这个笔记会覆盖原来的笔记 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle("同步提示"); - builder.setMessage("同步第"+ count +"条笔记会覆盖原来的笔记,是否继续?"); + builder.setMessage("同步第" + count + "条笔记会覆盖原来的笔记,是否继续?"); builder.setPositiveButton("继续", (dialog, which) -> { - //TODO 继续同步 - //将这个笔记的内容更新到数据库 ContentValues values = new ContentValues(); values.put(Notes.DataColumns.CONTENT, itemData.getContent()); getActivity().getContentResolver().update(Notes.CONTENT_DATA_URI, values, Notes.DataColumns.DATA5 + " = ?", new String[]{itemData.getNote_token()}); @@ -224,19 +192,12 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen UIUtils.sendMsg(getActivity(), "同步成功"); dialog.cancel(); }); - builder.setNegativeButton("取消", (dialog, which) -> { - //TODO 取消同步 - dialog.cancel(); - }); + builder.setNegativeButton("取消", (dialog, which) -> dialog.cancel()); builder.show(); - }else{ - // 创建一个新的 WorkingNote 对象,并将读取到的文本内容设置为其正文 - WorkingNote note = WorkingNote.createEmptyNote(getActivity(), Notes.ID_ROOT_FOLDER, - AppWidgetManager.INVALID_APPWIDGET_ID, Notes.TYPE_WIDGET_INVALIDE, - ResourceParser.YELLOW); + } else { + WorkingNote note = WorkingNote.createEmptyNote(getActivity(), Notes.ID_ROOT_FOLDER, AppWidgetManager.INVALID_APPWIDGET_ID, Notes.TYPE_WIDGET_INVALIDE, ResourceParser.YELLOW); note.setWorkingText(itemData.getContent()); note.saveNote(); - //更新这条笔记的token和version ContentValues values = new ContentValues(); values.put(Notes.DataColumns.DATA5, itemData.getNote_token()); getActivity().getContentResolver().update(Notes.CONTENT_DATA_URI, values, Notes.DataColumns.NOTE_ID + " = ?", new String[]{String.valueOf(note.getNoteId())}); @@ -245,11 +206,9 @@ public class NoteMenuListFragment extends Fragment implements View.OnClickListen getActivity().getContentResolver().update(Notes.CONTENT_NOTE_URI, values, Notes.NoteColumns.ID + " = ?", new String[]{String.valueOf(note.getNoteId())}); UIUtils.sendMsg(getActivity(), "同步成功"); } - } - - break; } } } + diff --git a/app/src/main/java/net/micode/notes/ui/NoteMenuMainFragment.java b/app/src/main/java/net/micode/notes/ui/NoteMenuMainFragment.java index f1baa6d..4918177 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteMenuMainFragment.java +++ b/app/src/main/java/net/micode/notes/ui/NoteMenuMainFragment.java @@ -5,7 +5,6 @@ import android.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.content.Context; -import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/net/micode/notes/ui/NoteVerificationButton.java b/app/src/main/java/net/micode/notes/ui/NoteVerificationButton.java index f203b2a..2a6f2ad 100644 --- a/app/src/main/java/net/micode/notes/ui/NoteVerificationButton.java +++ b/app/src/main/java/net/micode/notes/ui/NoteVerificationButton.java @@ -40,48 +40,41 @@ public class NoteVerificationButton extends androidx.appcompat.widget.AppCompatB public NoteVerificationButton(Context context) { super(context); + init(); } public NoteVerificationButton(Context context, AttributeSet attrs) { super(context, attrs); + init(); } public NoteVerificationButton(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - } - - @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); init(); } private void init() { - note_login_phone_num = ((Activity) getContext()).findViewById(R.id.note_login_phone_num); - note_verification_code = ((Activity) getContext()).findViewById(R.id.note_verification_code); server = new NoteHttpServer(); this.setOnClickListener(this); } - @Override public void onClick(View v) { Log.e(TAG, "onClick: "); - if (isClickable) { // only execute if the button is clickable - HttpUrl url = HttpUrl.parse(NoteRemoteConfig.generateUrl(VERIFICATION_ENDPOINT)); - String phone = note_login_phone_num.getText().toString(); - //验证手机号是否合法 - if (!Validator.isPhoneNum(phone)) { - UIUtils.sendMsg((Activity) getContext(), "手机号不合法"); - return; - } - disableButton(); // disable the button and start the countdown timer + if (!isClickable) return; + + note_login_phone_num = ((Activity) getContext()).findViewById(R.id.note_login_phone_num); + note_verification_code = ((Activity) getContext()).findViewById(R.id.note_verification_code); - //发送验证码 - sendVerificationCode(phone); - //输入框聚焦在验证码输入框 - note_verification_code.requestFocus(); + String phone = note_login_phone_num.getText().toString(); + if (!Validator.isPhoneNum(phone)) { + UIUtils.sendMsg((Activity) getContext(), "手机号不合法"); + return; } + + disableButton(); + sendVerificationCode(phone); + note_verification_code.requestFocus(); } private void sendVerificationCode(String phone) { @@ -90,51 +83,38 @@ public class NoteVerificationButton extends androidx.appcompat.widget.AppCompatB server.sendAsyncGetRequest(url, new Callback() { @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { - enableButton(); // enable the button if the request fails - ((Activity) getContext()).runOnUiThread(new Runnable() { - @Override - public void run() { - Toast.makeText(getContext(), "发送失败", Toast.LENGTH_SHORT).show(); - } - }); + enableButton(); + ((Activity) getContext()).runOnUiThread(() -> Toast.makeText(getContext(), "发送失败", Toast.LENGTH_SHORT).show()); } @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - enableButton(); // enable the button if the request succeeds - ((Activity) getContext()).runOnUiThread(new Runnable() { - @Override - public void run() { - Toast.makeText(getContext(), "发送成功", Toast.LENGTH_SHORT).show(); - } - }); + enableButton(); + ((Activity) getContext()).runOnUiThread(() -> Toast.makeText(getContext(), "发送成功", Toast.LENGTH_SHORT).show()); } }); } private void disableButton() { isClickable = false; - countDownTimer = new CountDownTimer(5000, 1000) { // start a countdown timer for 60 seconds + countDownTimer = new CountDownTimer(5000, 1000) { @Override public void onTick(long millisUntilFinished) { - long remainingSeconds = (millisUntilFinished + 999) / 1000; // round up the remaining milliseconds to seconds - long seconds = remainingSeconds % 60; - UIUtils.runInUI((Activity) getContext(), () -> { - setText(String.format(Locale.getDefault(), "%ds", seconds)); // set the button text to show the remaining time - }); - + long seconds = (millisUntilFinished + 999) / 1000; + UIUtils.runInUI((Activity) getContext(), () -> setText(String.format(Locale.getDefault(), "%ds", seconds))); } @Override public void onFinish() { - enableButton(); // enable the button when the timer finishes + enableButton(); } }.start(); } private void enableButton() { isClickable = true; - countDownTimer.cancel(); // cancel the countdown timer if it's still running + countDownTimer.cancel(); UIUtils.sendMsg((Activity) getContext(), "获取验证码"); } } + diff --git a/app/src/main/java/net/micode/notes/ui/NotesListActivity.java b/app/src/main/java/net/micode/notes/ui/NotesListActivity.java index b926623..7473030 100644 --- a/app/src/main/java/net/micode/notes/ui/NotesListActivity.java +++ b/app/src/main/java/net/micode/notes/ui/NotesListActivity.java @@ -31,7 +31,6 @@ import android.preference.PreferenceManager; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; -import android.util.DisplayMetrics; import android.util.Log; import android.view.*; import android.view.ContextMenu.ContextMenuInfo; @@ -43,13 +42,10 @@ import android.view.inputmethod.InputMethodManager; import android.widget.*; import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemLongClickListener; - import net.micode.notes.R; -import net.micode.notes.data.Auth; import net.micode.notes.data.Notes; import net.micode.notes.data.Notes.NoteColumns; import net.micode.notes.gtask.remote.GTaskSyncService; -import net.micode.notes.model.Note; import net.micode.notes.model.WorkingNote; import net.micode.notes.service.BackupBoundService; import net.micode.notes.tool.BackupUtils; @@ -58,12 +54,7 @@ import net.micode.notes.tool.ResourceParser; import net.micode.notes.ui.NotesListAdapter.AppWidgetAttribute; import net.micode.notes.widget.NoteWidgetProvider_2x; import net.micode.notes.widget.NoteWidgetProvider_4x; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Response; -import org.jetbrains.annotations.NotNull; import org.json.JSONException; -import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; @@ -93,8 +84,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt NOTE_LIST, SUB_FOLDER, CALL_RECORD_FOLDER } - ; - private ListEditState mState; private BackgroundQueryHandler mBackgroundQueryHandler; @@ -121,8 +110,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt private static final String TAG = "chenqy"; - public static final int NOTES_LISTVIEW_SCROLL_RATE = 30; - private NoteItemData mFocusNoteDataItem; private static final String NORMAL_SELECTION = NoteColumns.PARENT_ID + "=?"; @@ -139,14 +126,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt //Customized by chenqy //弹出菜单 - private PopupWindow mPopupWindow; private long mExitTime = 0; //注册广播 public static final String BACKUP_ACTION = "net.micode.notes.backup"; - public static final String MENU_DISMISS = "shutdown_pop_menu"; -// ------------------------------------- C Q Y --------------------------------------------------------- + // ------------------------------------- C Q Y --------------------------------------------------------- //绑定状态 private boolean is_bind_backup_service = false; //服务对象 @@ -173,20 +158,16 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } - private BroadcastReceiver receiver = new BroadcastReceiver() { + private final BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); - switch (action) { - case BACKUP_ACTION: - try { - startBackup(intent); - } catch (JSONException e) { - throw new RuntimeException(e); - } - break; - default: - break; + if (action.equals(BACKUP_ACTION)) { + try { + startBackup(intent); + } catch (JSONException e) { + throw new RuntimeException(e); + } } } }; @@ -204,14 +185,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt Bundle args = intent.getExtras(); long[] long_list = (long[]) args.get(NoteMenuListFragment.SELECTED_ID_LIST_KEY); ArrayList selected_list; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - selected_list = Arrays.stream(long_list).boxed().collect(Collectors.toCollection(ArrayList::new)); - } else { - selected_list = new ArrayList<>(); - for (long id : long_list) { - selected_list.add(id); - } - } + selected_list = Arrays.stream(long_list).boxed().collect(Collectors.toCollection(ArrayList::new)); return selected_list; } @@ -224,11 +198,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt setContentView(R.layout.note_list); initResources(); initCustom(); - /** - * Insert an introduction when user firstly use this application - */ + //Insert an introduction when user firstly use this application setAppInfoFromRawRes(); -// SqliteStudio } @@ -290,11 +261,10 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt // 如果保存笔记成功,则将添加介绍信息的标志设置为 true if (note.saveNote()) { - sp.edit().putBoolean(PREFERENCE_ADD_INTRODUCTION, true).commit(); + sp.edit().putBoolean(PREFERENCE_ADD_INTRODUCTION, true).apply(); } else { // 如果保存笔记失败,则记录日志并退出方法 Log.e(TAG, "Save introduction note error"); - return; } } } @@ -333,20 +303,20 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt mContentResolver = this.getContentResolver(); mBackgroundQueryHandler = new BackgroundQueryHandler(this.getContentResolver()); mCurrentFolderId = Notes.ID_ROOT_FOLDER; - mNotesListView = (ListView) findViewById(R.id.notes_list); + mNotesListView = findViewById(R.id.notes_list); mNotesListView.addFooterView(LayoutInflater.from(this).inflate(R.layout.note_list_footer, null), null, false); mNotesListView.setOnItemClickListener(new OnListItemClickListener()); mNotesListView.setOnItemLongClickListener(this); mNotesListAdapter = new NotesListAdapter(this); mNotesListView.setAdapter(mNotesListAdapter); - mAddNewNote = (Button) findViewById(R.id.btn_new_note); + mAddNewNote = findViewById(R.id.btn_new_note); mAddNewNote.setOnClickListener(this); mAddNewNote.setOnTouchListener(new NewNoteOnTouchListener()); mDispatch = false; mDispatchY = 0; mOriginY = 0; - mTitleBar = (TextView) findViewById(R.id.tv_title_bar); + mTitleBar = findViewById(R.id.tv_title_bar); mState = ListEditState.NOTE_LIST; mModeCallBack = new ModeCallback(); } @@ -360,12 +330,11 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener { private DropdownMenu mDropDownMenu; private ActionMode mActionMode; - private MenuItem mMoveMenu; public boolean onCreateActionMode(ActionMode mode, Menu menu) { getMenuInflater().inflate(R.menu.note_list_options, menu); menu.findItem(R.id.delete).setOnMenuItemClickListener(this); - mMoveMenu = menu.findItem(R.id.move); + MenuItem mMoveMenu = menu.findItem(R.id.move); if (mFocusNoteDataItem.getParentId() == Notes.ID_CALL_RECORD_FOLDER || DataUtils.getUserFolderCount(mContentResolver) == 0) { mMoveMenu.setVisible(false); @@ -382,15 +351,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt R.layout.note_list_dropdown_menu, null); mode.setCustomView(customView); mDropDownMenu = new DropdownMenu(NotesListActivity.this, - (Button) customView.findViewById(R.id.selection_menu), + customView.findViewById(R.id.selection_menu), R.menu.note_list_dropdown); - mDropDownMenu.setOnDropdownMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { - public boolean onMenuItemClick(MenuItem item) { - mNotesListAdapter.selectAll(!mNotesListAdapter.isAllSelected()); - updateMenu(); - return true; - } - + mDropDownMenu.setOnDropdownMenuItemClickListener(item -> { + mNotesListAdapter.selectAll(!mNotesListAdapter.isAllSelected()); + updateMenu(); + return true; }); return true; } @@ -477,9 +443,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt int newNoteViewHeight = mAddNewNote.getHeight(); int start = screenHeight - newNoteViewHeight; int eventY = start + (int) event.getY(); - /** - * Minus TitleBar's height - */ + //Minus TitleBar's height if (mState == ListEditState.SUB_FOLDER) { eventY -= mTitleBar.getHeight(); start -= mTitleBar.getHeight(); @@ -529,7 +493,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } - ; private void startAsyncNotesListQuery() { String selection = (mCurrentFolderId == Notes.ID_ROOT_FOLDER) ? ROOT_FOLDER_SELECTION @@ -559,7 +522,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } break; default: - return; } } } @@ -568,19 +530,16 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt AlertDialog.Builder builder = new AlertDialog.Builder(NotesListActivity.this); builder.setTitle(R.string.menu_title_select_folder); final FoldersListAdapter adapter = new FoldersListAdapter(this, cursor); - builder.setAdapter(adapter, new DialogInterface.OnClickListener() { - - public void onClick(DialogInterface dialog, int which) { - DataUtils.batchMoveToFolder(mContentResolver, - mNotesListAdapter.getSelectedItemIds(), adapter.getItemId(which)); - Toast.makeText( - NotesListActivity.this, - getString(R.string.format_move_notes_to_folder, - mNotesListAdapter.getSelectedCount(), - adapter.getFolderName(NotesListActivity.this, which)), - Toast.LENGTH_SHORT).show(); - mModeCallBack.finishActionMode(); - } + builder.setAdapter(adapter, (dialog, which) -> { + DataUtils.batchMoveToFolder(mContentResolver, + mNotesListAdapter.getSelectedItemIds(), adapter.getItemId(which)); + Toast.makeText( + NotesListActivity.this, + getString(R.string.format_move_notes_to_folder, + mNotesListAdapter.getSelectedCount(), + adapter.getFolderName(NotesListActivity.this, which)), + Toast.LENGTH_SHORT).show(); + mModeCallBack.finishActionMode(); }); builder.show(); } @@ -645,7 +604,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt return; } - HashSet ids = new HashSet(); + HashSet ids = new HashSet<>(); ids.add(folderId); HashSet widgets = DataUtils.getFolderNoteWidget(mContentResolver, folderId); @@ -691,12 +650,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } public void onClick(View v) { - switch (v.getId()) { - case R.id.btn_new_note: - createNewNote(); - break; - default: - break; + if (v.getId() == R.id.btn_new_note) { + createNewNote(); } } @@ -715,7 +670,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt private void showCreateOrModifyFolderDialog(final boolean create) { final AlertDialog.Builder builder = new AlertDialog.Builder(this); View view = LayoutInflater.from(this).inflate(R.layout.dialog_edit_text, null); - final EditText etName = (EditText) view.findViewById(R.id.et_foler_name); + final EditText etName = view.findViewById(R.id.et_foler_name); showSoftInput(); if (!create) { if (mFocusNoteDataItem != null) { @@ -731,51 +686,43 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } builder.setPositiveButton(android.R.string.ok, null); - builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - hideSoftInput(etName); - } - }); + builder.setNegativeButton(android.R.string.cancel, (dialog, which) -> hideSoftInput(etName)); final Dialog dialog = builder.setView(view).show(); - final Button positive = (Button) dialog.findViewById(android.R.id.button1); - positive.setOnClickListener(new OnClickListener() { - public void onClick(View v) { - hideSoftInput(etName); - String name = etName.getText().toString(); - if (DataUtils.checkVisibleFolderName(mContentResolver, name)) { - Toast.makeText(NotesListActivity.this, getString(R.string.folder_exist, name), - Toast.LENGTH_LONG).show(); - etName.setSelection(0, etName.length()); - return; - } - if (!create) { - if (!TextUtils.isEmpty(name)) { - ContentValues values = new ContentValues(); - values.put(NoteColumns.SNIPPET, name); - values.put(NoteColumns.TYPE, Notes.TYPE_FOLDER); - values.put(NoteColumns.LOCAL_MODIFIED, 1); - mContentResolver.update(Notes.CONTENT_NOTE_URI, values, NoteColumns.ID - + "=?", new String[]{ - String.valueOf(mFocusNoteDataItem.getId()) - }); - } - } else if (!TextUtils.isEmpty(name)) { + final Button positive = dialog.findViewById(android.R.id.button1); + positive.setOnClickListener(v -> { + hideSoftInput(etName); + String name = etName.getText().toString(); + if (DataUtils.checkVisibleFolderName(mContentResolver, name)) { + Toast.makeText(NotesListActivity.this, getString(R.string.folder_exist, name), + Toast.LENGTH_LONG).show(); + etName.setSelection(0, etName.length()); + return; + } + if (!create) { + if (!TextUtils.isEmpty(name)) { ContentValues values = new ContentValues(); values.put(NoteColumns.SNIPPET, name); values.put(NoteColumns.TYPE, Notes.TYPE_FOLDER); - mContentResolver.insert(Notes.CONTENT_NOTE_URI, values); + values.put(NoteColumns.LOCAL_MODIFIED, 1); + mContentResolver.update(Notes.CONTENT_NOTE_URI, values, NoteColumns.ID + + "=?", new String[]{ + String.valueOf(mFocusNoteDataItem.getId()) + }); } - dialog.dismiss(); + } else if (!TextUtils.isEmpty(name)) { + ContentValues values = new ContentValues(); + values.put(NoteColumns.SNIPPET, name); + values.put(NoteColumns.TYPE, Notes.TYPE_FOLDER); + mContentResolver.insert(Notes.CONTENT_NOTE_URI, values); } + dialog.dismiss(); }); if (TextUtils.isEmpty(etName.getText())) { positive.setEnabled(false); } - /** - * When the name edit text is null, disable the positive button - */ + //When the name edit text is null, disable the positive button etName.addTextChangedListener(new TextWatcher() { public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub @@ -783,11 +730,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } public void onTextChanged(CharSequence s, int start, int before, int count) { - if (TextUtils.isEmpty(etName.getText())) { - positive.setEnabled(false); - } else { - positive.setEnabled(true); - } + positive.setEnabled(!TextUtils.isEmpty(etName.getText())); } public void afterTextChanged(Editable s) { @@ -881,11 +824,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt builder.setIcon(android.R.drawable.ic_dialog_alert); builder.setMessage(getString(R.string.alert_message_delete_folder)); builder.setPositiveButton(android.R.string.ok, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - deleteFolder(mFocusNoteDataItem.getId()); - } - }); + (dialog, which) -> deleteFolder(mFocusNoteDataItem.getId())); builder.setNegativeButton(android.R.string.cancel, null); builder.show(); break; @@ -963,6 +902,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt return true; } + @SuppressLint("StaticFieldLeak") private void exportNoteToText() { final BackupUtils backup = BackupUtils.getInstance(NotesListActivity.this); new AsyncTask() { diff --git a/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java b/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java index fe3dbca..8575db5 100644 --- a/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java +++ b/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java @@ -40,17 +40,16 @@ public class NotesListAdapter extends CursorAdapter { public NotesListAdapter(Context context, Cursor c) { super(context, c); - this.mContext = mContext; } public static class AppWidgetAttribute { public int widgetId; public int widgetType; - }; + } public NotesListAdapter(Context context) { super(context, null); - mSelectedIndex = new HashMap(); + mSelectedIndex = new HashMap<>(); mContext = context; mNotesCount = 0; } @@ -169,11 +168,11 @@ public class NotesListAdapter extends CursorAdapter { * @return 返回一个包含已选项目 ID 的 HashSet。 */ public HashSet getSelectedItemIds() { - HashSet itemSet = new HashSet(); + HashSet itemSet = new HashSet<>(); // 遍历已选项目列表,并将所有已选项目的 ID 添加到 HashSet 中 for (Integer position : mSelectedIndex.keySet()) { - if (mSelectedIndex.get(position) == true) { - Long id = getItemId(position); + if (Boolean.TRUE.equals(mSelectedIndex.get(position))) { + long id = getItemId(position); if (id == Notes.ID_ROOT_FOLDER) { Log.d(TAG, "Wrong item id, should not happen"); } else { @@ -191,10 +190,10 @@ public class NotesListAdapter extends CursorAdapter { * @return 返回一个包含已选项目小部件信息的 HashSet。 */ public HashSet getSelectedWidget() { - HashSet itemSet = new HashSet(); + HashSet itemSet = new HashSet<>(); // 遍历已选项目列表,并将所有已选项目的小部件信息添加到 HashSet 中 for (Integer position : mSelectedIndex.keySet()) { - if (mSelectedIndex.get(position) == true) { + if (Boolean.TRUE.equals(mSelectedIndex.get(position))) { Cursor c = (Cursor) getItem(position); if (c != null) { AppWidgetAttribute widget = new AppWidgetAttribute(); @@ -219,13 +218,10 @@ public class NotesListAdapter extends CursorAdapter { */ public int getSelectedCount() { Collection values = mSelectedIndex.values(); - if (null == values) { - return 0; - } Iterator iter = values.iterator(); int count = 0; while (iter.hasNext()) { - if (true == iter.next()) { + if (iter.next()) { count++; } } @@ -252,7 +248,7 @@ public class NotesListAdapter extends CursorAdapter { if (null == mSelectedIndex.get(position)) { return false; } - return mSelectedIndex.get(position); + return Boolean.TRUE.equals(mSelectedIndex.get(position)); } diff --git a/app/src/main/java/net/micode/notes/ui/NotesListItem.java b/app/src/main/java/net/micode/notes/ui/NotesListItem.java index bcaee7f..93efaf5 100644 --- a/app/src/main/java/net/micode/notes/ui/NotesListItem.java +++ b/app/src/main/java/net/micode/notes/ui/NotesListItem.java @@ -16,6 +16,7 @@ package net.micode.notes.ui; +import android.annotation.SuppressLint; import android.content.Context; import android.text.format.DateUtils; import android.view.View; @@ -31,21 +32,21 @@ import net.micode.notes.tool.ResourceParser.NoteItemBgResources; public class NotesListItem extends LinearLayout { - private ImageView mAlert; - private TextView mTitle; - private TextView mTime; - private TextView mCallName; + private final ImageView mAlert; + private final TextView mTitle; + private final TextView mTime; + private final TextView mCallName; private NoteItemData mItemData; - private CheckBox mCheckBox; + private final CheckBox mCheckBox; public NotesListItem(Context context) { super(context); inflate(context, R.layout.note_item, this); - mAlert = (ImageView) findViewById(R.id.iv_alert_icon); - mTitle = (TextView) findViewById(R.id.tv_title); - mTime = (TextView) findViewById(R.id.tv_time); - mCallName = (TextView) findViewById(R.id.tv_name); - mCheckBox = (CheckBox) findViewById(android.R.id.checkbox); + mAlert = findViewById(R.id.iv_alert_icon); + mTitle = findViewById(R.id.tv_title); + mTime = findViewById(R.id.tv_time); + mCallName = findViewById(R.id.tv_name); + mCheckBox = findViewById(android.R.id.checkbox); } @@ -72,8 +73,7 @@ public class NotesListItem extends LinearLayout { mCallName.setVisibility(View.GONE); // 隐藏通话名称TextView。 mAlert.setVisibility(View.VISIBLE); // 显示警报图标。 mTitle.setTextAppearance(context, R.style.TextAppearancePrimaryItem); // 将标题样式设置为主要项样式。 - mTitle.setText(context.getString(R.string.call_record_folder_name) // 设置标题文本为通话记录文件夹名称和文件夹中文件数量。 - + context.getString(R.string.format_folder_files_count, data.getNotesCount())); + mTitle.setText(context.getString(R.string.call_record_folder_name) + context.getString(R.string.format_folder_files_count, data.getNotesCount())); mAlert.setImageResource(R.drawable.call_record); // 将警报图标设置为电话记录图标。 } else if (data.getParentId() == Notes.ID_CALL_RECORD_FOLDER) { // 如果笔记项是通话记录文件夹的子项, mCallName.setVisibility(View.VISIBLE); // 显示通话名称TextView。 @@ -105,9 +105,9 @@ public class NotesListItem extends LinearLayout { } } } - // 设置时间文本为笔记项修改日期的相对时间跨度。 + // 设置时间文本为笔记项修改日期的相对时间跨度。 mTime.setText(DateUtils.getRelativeTimeSpanString(data.getModifiedDate())); - // 根据笔记项类型设置ViewHolder的背景色。 + // 根据笔记项类型设置ViewHolder的背景色。 setBackground(data); } diff --git a/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java b/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java index 07c5f7e..0fef7df 100644 --- a/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java +++ b/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java @@ -18,15 +18,8 @@ package net.micode.notes.ui; import android.accounts.Account; import android.accounts.AccountManager; -import android.app.ActionBar; import android.app.AlertDialog; -import android.content.BroadcastReceiver; -import android.content.ContentValues; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; +import android.content.*; import android.os.Bundle; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; @@ -35,13 +28,11 @@ import android.preference.PreferenceCategory; import android.text.TextUtils; import android.text.format.DateFormat; import android.view.LayoutInflater; -import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; - import net.micode.notes.R; import net.micode.notes.data.Notes; import net.micode.notes.data.Notes.NoteColumns; diff --git a/app/src/main/java/net/micode/notes/ui/SyncListAdapter.java b/app/src/main/java/net/micode/notes/ui/SyncListAdapter.java index c5be8d2..40c21c6 100644 --- a/app/src/main/java/net/micode/notes/ui/SyncListAdapter.java +++ b/app/src/main/java/net/micode/notes/ui/SyncListAdapter.java @@ -21,7 +21,7 @@ public class SyncListAdapter extends BaseAdapter { public SyncListAdapter(List data, Context context) { mData = data; mContext = context; - mSelectedList= new ArrayList<>(); + mSelectedList = new ArrayList<>(); } @Override @@ -41,9 +41,9 @@ public class SyncListAdapter extends BaseAdapter { @Override public View getView(int position, View convertView, ViewGroup parent) { - ViewHolder vh = null; + ViewHolder vh; if (convertView == null) { - convertView = LayoutInflater.from(mContext).inflate(R.layout.test_list_item, null, false); + convertView = LayoutInflater.from(mContext).inflate(R.layout.test_list_item, parent, false); vh = new ViewHolder(); vh.tv_note_id = convertView.findViewById(R.id.numberTextView); vh.tv_note_snippet = convertView.findViewById(R.id.textTextView); @@ -52,19 +52,22 @@ public class SyncListAdapter extends BaseAdapter { } else { vh = (ViewHolder) convertView.getTag(); } - vh.tv_note_id.setText(String.valueOf(position+1)+"."); - vh.tv_note_snippet.setText((CharSequence) mData.get(position).getContent()); - vh.checkBox.setTag( mData.get(position)); - ViewHolder finalVh = vh; + + SyncNoteUtils.SyncNoteItemData item = mData.get(position); + vh.tv_note_id.setText(String.valueOf(position + 1) + "."); + vh.tv_note_snippet.setText(item.getContent()); + vh.checkBox.setTag(item); + convertView.setOnClickListener(v -> { - if (finalVh.checkBox.isChecked()) { - finalVh.checkBox.setChecked(false); - mSelectedList.remove(mData.get(position)); + if (vh.checkBox.isChecked()) { + vh.checkBox.setChecked(false); + mSelectedList.remove(item); } else { - finalVh.checkBox.setChecked(true); - mSelectedList.add(mData.get(position)); + vh.checkBox.setChecked(true); + mSelectedList.add(item); } }); + return convertView; } @@ -73,12 +76,8 @@ public class SyncListAdapter extends BaseAdapter { } static class ViewHolder { - //TODO private TextView tv_note_id; private TextView tv_note_snippet; private CheckBox checkBox; - } - - }