├── settings.gradle ├── example ├── sc1.png ├── sc2.png ├── sc3.png ├── sc4.png └── icon.png ├── app ├── src │ └── main │ │ ├── res │ │ ├── xml │ │ │ ├── shortcuts.xml │ │ │ ├── filepaths.xml │ │ │ ├── general_appwidget_info.xml │ │ │ ├── prefs_time.xml │ │ │ ├── prefs_headers.xml │ │ │ ├── prefs_notifications.xml │ │ │ ├── prefs_auto_backup.xml │ │ │ ├── prefs_general.xml │ │ │ └── prefs_info.xml │ │ ├── values-v14 │ │ │ └── dimens.xml │ │ ├── drawable │ │ │ ├── disabled_button.png │ │ │ ├── enabled_button.png │ │ │ ├── notification_ticker_bar.png │ │ │ └── baseline_error_outline_black_18.png │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── drawable-hdpi │ │ │ ├── ic_add_white_48dp.png │ │ │ ├── ic_clear_white_24dp.png │ │ │ ├── ic_delete_black_36dp.png │ │ │ ├── ic_delete_white_48dp.png │ │ │ ├── ic_info_black_24dp.png │ │ │ ├── ic_share_white_24dp.png │ │ │ ├── sharp_clear_black_24.png │ │ │ ├── baseline_info_white_24.png │ │ │ ├── baseline_link_black_24.png │ │ │ ├── baseline_link_black_48.png │ │ │ ├── ic_settings_black_24dp.png │ │ │ ├── baseline_build_black_24.png │ │ │ ├── baseline_build_white_24.png │ │ │ ├── baseline_clear_black_24.png │ │ │ ├── baseline_email_black_24.png │ │ │ ├── baseline_email_black_48.png │ │ │ ├── baseline_phone_black_24.png │ │ │ ├── baseline_phone_black_48.png │ │ │ ├── baseline_share_black_24.png │ │ │ ├── baseline_warning_black_48.png │ │ │ ├── ic_access_time_black_24dp.png │ │ │ ├── baseline_more_vert_black_24.png │ │ │ ├── baseline_more_vert_white_24.png │ │ │ ├── baseline_save_alt_black_24.png │ │ │ ├── baseline_save_alt_white_24.png │ │ │ ├── ic_notifications_black_24dp.png │ │ │ ├── ic_notifications_white_48dp.png │ │ │ ├── outline_file_copy_black_24.png │ │ │ ├── outline_file_copy_white_24.png │ │ │ ├── baseline_access_time_white_24.png │ │ │ ├── ic_open_in_browser_white_48dp.png │ │ │ ├── baseline_notifications_white_24.png │ │ │ ├── ic_notifications_off_white_48dp.png │ │ │ ├── baseline_notifications_off_black_24.png │ │ │ ├── baseline_notifications_active_black_24.png │ │ │ └── baseline_notifications_active_white_24.png │ │ ├── drawable-mdpi │ │ │ ├── ic_add_white_48dp.png │ │ │ ├── ic_clear_white_24dp.png │ │ │ ├── ic_delete_black_36dp.png │ │ │ ├── ic_delete_white_48dp.png │ │ │ ├── ic_info_black_24dp.png │ │ │ ├── ic_share_white_24dp.png │ │ │ ├── sharp_clear_black_24.png │ │ │ ├── baseline_info_white_24.png │ │ │ ├── baseline_link_black_24.png │ │ │ ├── baseline_link_black_48.png │ │ │ ├── ic_settings_black_24dp.png │ │ │ ├── baseline_build_black_24.png │ │ │ ├── baseline_build_white_24.png │ │ │ ├── baseline_clear_black_24.png │ │ │ ├── baseline_email_black_24.png │ │ │ ├── baseline_email_black_48.png │ │ │ ├── baseline_phone_black_24.png │ │ │ ├── baseline_phone_black_48.png │ │ │ ├── baseline_share_black_24.png │ │ │ ├── baseline_warning_black_48.png │ │ │ ├── ic_access_time_black_24dp.png │ │ │ ├── baseline_more_vert_black_24.png │ │ │ ├── baseline_more_vert_white_24.png │ │ │ ├── baseline_save_alt_black_24.png │ │ │ ├── baseline_save_alt_white_24.png │ │ │ ├── ic_notifications_black_24dp.png │ │ │ ├── ic_notifications_white_48dp.png │ │ │ ├── outline_file_copy_black_24.png │ │ │ ├── outline_file_copy_white_24.png │ │ │ ├── baseline_access_time_white_24.png │ │ │ ├── ic_open_in_browser_white_48dp.png │ │ │ ├── baseline_notifications_white_24.png │ │ │ ├── ic_notifications_off_white_48dp.png │ │ │ ├── baseline_notifications_off_black_24.png │ │ │ ├── baseline_notifications_active_black_24.png │ │ │ └── baseline_notifications_active_white_24.png │ │ ├── drawable-xhdpi │ │ │ ├── ic_add_white_48dp.png │ │ │ ├── ic_clear_white_24dp.png │ │ │ ├── ic_info_black_24dp.png │ │ │ ├── ic_share_white_24dp.png │ │ │ ├── ic_delete_black_36dp.png │ │ │ ├── ic_delete_white_48dp.png │ │ │ ├── sharp_clear_black_24.png │ │ │ ├── baseline_build_black_24.png │ │ │ ├── baseline_build_white_24.png │ │ │ ├── baseline_clear_black_24.png │ │ │ ├── baseline_email_black_24.png │ │ │ ├── baseline_email_black_48.png │ │ │ ├── baseline_info_white_24.png │ │ │ ├── baseline_link_black_24.png │ │ │ ├── baseline_link_black_48.png │ │ │ ├── baseline_phone_black_24.png │ │ │ ├── baseline_phone_black_48.png │ │ │ ├── baseline_share_black_24.png │ │ │ ├── ic_settings_black_24dp.png │ │ │ ├── baseline_save_alt_black_24.png │ │ │ ├── baseline_save_alt_white_24.png │ │ │ ├── baseline_warning_black_48.png │ │ │ ├── ic_access_time_black_24dp.png │ │ │ ├── outline_file_copy_black_24.png │ │ │ ├── outline_file_copy_white_24.png │ │ │ ├── baseline_access_time_white_24.png │ │ │ ├── baseline_more_vert_black_24.png │ │ │ ├── baseline_more_vert_white_24.png │ │ │ ├── ic_notifications_black_24dp.png │ │ │ ├── ic_notifications_white_48dp.png │ │ │ ├── ic_open_in_browser_white_48dp.png │ │ │ ├── baseline_notifications_white_24.png │ │ │ ├── ic_notifications_off_white_48dp.png │ │ │ ├── baseline_notifications_off_black_24.png │ │ │ ├── baseline_notifications_active_black_24.png │ │ │ └── baseline_notifications_active_white_24.png │ │ ├── drawable-xxhdpi │ │ │ ├── ic_add_white_48dp.png │ │ │ ├── ic_info_black_24dp.png │ │ │ ├── ic_clear_white_24dp.png │ │ │ ├── ic_delete_black_36dp.png │ │ │ ├── ic_delete_white_48dp.png │ │ │ ├── ic_share_white_24dp.png │ │ │ ├── sharp_clear_black_24.png │ │ │ ├── baseline_build_black_24.png │ │ │ ├── baseline_build_white_24.png │ │ │ ├── baseline_clear_black_24.png │ │ │ ├── baseline_email_black_24.png │ │ │ ├── baseline_email_black_48.png │ │ │ ├── baseline_info_white_24.png │ │ │ ├── baseline_link_black_24.png │ │ │ ├── baseline_link_black_48.png │ │ │ ├── baseline_phone_black_24.png │ │ │ ├── baseline_phone_black_48.png │ │ │ ├── baseline_share_black_24.png │ │ │ ├── ic_settings_black_24dp.png │ │ │ ├── baseline_warning_black_48.png │ │ │ ├── ic_access_time_black_24dp.png │ │ │ ├── baseline_more_vert_black_24.png │ │ │ ├── baseline_more_vert_white_24.png │ │ │ ├── baseline_save_alt_black_24.png │ │ │ ├── baseline_save_alt_white_24.png │ │ │ ├── ic_notifications_black_24dp.png │ │ │ ├── ic_notifications_white_48dp.png │ │ │ ├── outline_file_copy_black_24.png │ │ │ ├── outline_file_copy_white_24.png │ │ │ ├── baseline_access_time_white_24.png │ │ │ ├── ic_open_in_browser_white_48dp.png │ │ │ ├── baseline_notifications_white_24.png │ │ │ ├── ic_notifications_off_white_48dp.png │ │ │ ├── baseline_notifications_off_black_24.png │ │ │ ├── baseline_notifications_active_black_24.png │ │ │ └── baseline_notifications_active_white_24.png │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_add_white_48dp.png │ │ │ ├── ic_clear_white_24dp.png │ │ │ ├── ic_info_black_24dp.png │ │ │ ├── ic_share_white_24dp.png │ │ │ ├── baseline_info_white_24.png │ │ │ ├── baseline_link_black_24.png │ │ │ ├── baseline_link_black_48.png │ │ │ ├── ic_delete_black_36dp.png │ │ │ ├── ic_delete_white_48dp.png │ │ │ ├── ic_settings_black_24dp.png │ │ │ ├── sharp_clear_black_24.png │ │ │ ├── baseline_build_black_24.png │ │ │ ├── baseline_build_white_24.png │ │ │ ├── baseline_clear_black_24.png │ │ │ ├── baseline_email_black_24.png │ │ │ ├── baseline_email_black_48.png │ │ │ ├── baseline_phone_black_24.png │ │ │ ├── baseline_phone_black_48.png │ │ │ ├── baseline_share_black_24.png │ │ │ ├── baseline_more_vert_black_24.png │ │ │ ├── baseline_more_vert_white_24.png │ │ │ ├── baseline_save_alt_black_24.png │ │ │ ├── baseline_save_alt_white_24.png │ │ │ ├── baseline_warning_black_48.png │ │ │ ├── ic_access_time_black_24dp.png │ │ │ ├── ic_notifications_black_24dp.png │ │ │ ├── ic_notifications_white_48dp.png │ │ │ ├── outline_file_copy_black_24.png │ │ │ ├── outline_file_copy_white_24.png │ │ │ ├── baseline_access_time_white_24.png │ │ │ ├── ic_open_in_browser_white_48dp.png │ │ │ ├── baseline_notifications_white_24.png │ │ │ ├── ic_notifications_off_white_48dp.png │ │ │ ├── baseline_notifications_off_black_24.png │ │ │ ├── baseline_notifications_active_black_24.png │ │ │ └── baseline_notifications_active_white_24.png │ │ ├── values │ │ │ ├── ic_launcher_background.xml │ │ │ ├── constants.xml │ │ │ ├── colors.xml │ │ │ ├── array.xml │ │ │ ├── dimens.xml │ │ │ └── styles.xml │ │ ├── values-v21 │ │ │ └── styles.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ ├── values-night │ │ │ └── colors.xml │ │ ├── layout │ │ │ ├── activity_edit_note.xml │ │ │ ├── activity_main.xml │ │ │ ├── content_main.xml │ │ │ ├── general_appwidget_layout.xml │ │ │ ├── dialog_changelog.xml │ │ │ ├── note_row.xml │ │ │ ├── card_note_layout.xml │ │ │ └── layout_tutorial.xml │ │ ├── menu │ │ │ ├── note_card_menu.xml │ │ │ ├── menu_main.xml │ │ │ └── edit_note_menu.xml │ │ ├── raw │ │ │ └── version_changelog.json │ │ └── raw-de │ │ │ └── version_changelog.json │ │ ├── ic_launcher-web.png │ │ └── java │ │ └── de │ │ └── nilsfo │ │ └── lockscreennotes │ │ ├── activity │ │ ├── NotesActivity.java │ │ ├── AppCompatPreferenceActivity.java │ │ ├── NoteSharingListenerActivity.java │ │ └── NotificationDeleteRecieverDialogActivity.java │ │ ├── util │ │ ├── URLUtils.java │ │ ├── NoteSharer.java │ │ ├── PermissionBalloonTimer.java │ │ ├── IntentUtils.java │ │ ├── listener │ │ │ └── SettingsBindPreferenceSummaryToValueListener.java │ │ ├── TimeUtils.java │ │ └── RegexManager.java │ │ ├── data │ │ ├── font │ │ │ ├── FontManager.java │ │ │ └── FontAwesomeDrawableBuilder.java │ │ ├── content │ │ │ ├── browse │ │ │ │ ├── NoteContentBrowseDialogURLs.java │ │ │ │ ├── NoteContentBrowseDialogPhone.java │ │ │ │ ├── NoteContentBrowseDialogMail.java │ │ │ │ └── NoteContentBrowseDialog.java │ │ │ └── NoteContentAnalyzer.java │ │ ├── RelativeTimeTextfieldContainer.java │ │ └── Note.java │ │ ├── receiver │ │ ├── BootReceiver.java │ │ ├── NotificationDeleteReceiver.java │ │ ├── NotificationBrowseURLReceiver.java │ │ ├── widget │ │ │ └── GeneralWidget.java │ │ ├── NotificationDismissedReceiver.java │ │ └── alarms │ │ │ └── LSNAlarmManager.java │ │ ├── imported │ │ └── view │ │ │ ├── LinedTextHelper.java │ │ │ ├── LinedEditText.java │ │ │ └── LinedTextView.java │ │ ├── io │ │ ├── StoragePermissionManager.java │ │ └── backups │ │ │ └── NoteJSONUtils.java │ │ ├── concurrent │ │ └── QRTask.java │ │ └── view │ │ └── QRCodeView.java ├── .gitignore ├── proguard-rules.pro └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .travis.yml ├── gradle.properties ├── privacy.md ├── .github └── workflows │ └── codeql-analysis.yml ├── gradlew.bat └── README.md /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /example/sc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/example/sc1.png -------------------------------------------------------------------------------- /example/sc2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/example/sc2.png -------------------------------------------------------------------------------- /example/sc3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/example/sc3.png -------------------------------------------------------------------------------- /example/sc4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/example/sc4.png -------------------------------------------------------------------------------- /example/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/example/icon.png -------------------------------------------------------------------------------- /app/src/main/res/xml/shortcuts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values-v14/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 0dp 3 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/disabled_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable/disabled_button.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/enabled_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable/enabled_button.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_add_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_add_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_add_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_add_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_delete_black_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_delete_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_info_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/sharp_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/sharp_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_delete_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_delete_black_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_delete_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_delete_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_info_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_info_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/sharp_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/sharp_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_add_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_add_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_add_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_add_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_add_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_add_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/notification_ticker_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable/notification_ticker_bar.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_info_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_info_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_link_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_link_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_link_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_link_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_info_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_info_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_link_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_link_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_link_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_link_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_delete_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_delete_black_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_delete_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_delete_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/sharp_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/sharp_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_delete_black_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_delete_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/sharp_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/sharp_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_build_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_build_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_build_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_build_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_email_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_email_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_email_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_email_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_phone_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_phone_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_phone_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_phone_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_share_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_share_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_warning_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_warning_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_access_time_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_access_time_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_build_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_build_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_build_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_build_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_email_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_email_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_email_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_email_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_phone_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_phone_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_phone_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_phone_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_share_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_share_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_warning_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_warning_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_access_time_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_access_time_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_build_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_build_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_build_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_build_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_email_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_email_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_email_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_email_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_info_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_info_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_link_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_link_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_link_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_link_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_phone_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_phone_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_phone_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_phone_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_share_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_share_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_build_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_build_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_build_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_build_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_email_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_email_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_email_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_email_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_info_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_info_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_link_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_link_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_link_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_link_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_phone_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_phone_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_phone_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_phone_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_share_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_share_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_info_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_info_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_link_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_link_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_link_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_link_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_delete_black_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_delete_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/sharp_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/sharp_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_more_vert_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_more_vert_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_more_vert_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_more_vert_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_save_alt_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_save_alt_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_save_alt_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_save_alt_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_notifications_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_notifications_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/outline_file_copy_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/outline_file_copy_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/outline_file_copy_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/outline_file_copy_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_more_vert_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_more_vert_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_more_vert_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_more_vert_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_save_alt_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_save_alt_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_save_alt_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_save_alt_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_notifications_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_notifications_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/outline_file_copy_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/outline_file_copy_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/outline_file_copy_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/outline_file_copy_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_save_alt_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_save_alt_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_save_alt_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_save_alt_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_warning_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_warning_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_access_time_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_access_time_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/outline_file_copy_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/outline_file_copy_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/outline_file_copy_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/outline_file_copy_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_warning_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_warning_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_access_time_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_access_time_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_build_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_build_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_build_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_build_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_clear_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_clear_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_email_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_email_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_email_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_email_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_phone_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_phone_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_phone_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_phone_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_share_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_share_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_error_outline_black_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable/baseline_error_outline_black_18.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_access_time_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_access_time_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_open_in_browser_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_open_in_browser_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_access_time_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_access_time_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_open_in_browser_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_open_in_browser_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_access_time_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_access_time_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_more_vert_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_more_vert_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_more_vert_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_more_vert_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_notifications_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_notifications_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_open_in_browser_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_open_in_browser_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_more_vert_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_more_vert_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_more_vert_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_more_vert_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_save_alt_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_save_alt_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_save_alt_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_save_alt_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_notifications_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_notifications_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/outline_file_copy_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/outline_file_copy_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/outline_file_copy_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/outline_file_copy_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_more_vert_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_more_vert_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_more_vert_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_more_vert_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_save_alt_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_save_alt_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_save_alt_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_save_alt_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_warning_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_warning_black_48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_access_time_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_access_time_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_notifications_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_notifications_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/outline_file_copy_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/outline_file_copy_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/outline_file_copy_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/outline_file_copy_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_notifications_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_notifications_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_notifications_off_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/ic_notifications_off_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_notifications_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_notifications_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_notifications_off_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/ic_notifications_off_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_notifications_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_notifications_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_notifications_off_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/ic_notifications_off_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_access_time_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_access_time_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_open_in_browser_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_open_in_browser_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_access_time_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_access_time_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_open_in_browser_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_open_in_browser_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_notifications_off_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_notifications_off_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_notifications_off_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_notifications_off_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_notifications_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_notifications_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_notifications_off_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/ic_notifications_off_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_notifications_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_notifications_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_notifications_off_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/ic_notifications_off_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_notifications_off_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_notifications_off_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_notifications_off_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_notifications_off_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_notifications_active_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_notifications_active_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/baseline_notifications_active_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-hdpi/baseline_notifications_active_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_notifications_active_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_notifications_active_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/baseline_notifications_active_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-mdpi/baseline_notifications_active_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_notifications_active_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_notifications_active_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/baseline_notifications_active_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xhdpi/baseline_notifications_active_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_notifications_active_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_notifications_active_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/baseline_notifications_active_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxhdpi/baseline_notifications_active_white_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_notifications_off_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_notifications_off_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_notifications_active_black_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_notifications_active_black_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/baseline_notifications_active_white_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NilsFo/LockScreenNotes/HEAD/app/src/main/res/drawable-xxxhdpi/baseline_notifications_active_white_24.png -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | 3 | build.gradle 4 | local.properties 5 | 6 | /.idea/ 7 | *.iml 8 | 9 | .DS_Store 10 | .DS_Store? 11 | 12 | app/build/ 13 | app/build.gradle 14 | .gradle/ 15 | /.idea/* 16 | 17 | /app/src/main/assets/fonts/* 18 | 19 | *.apk -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | jdk: oraclejdk7 3 | 4 | android: 5 | components: 6 | - build-tools-28.0.3 7 | 8 | script: 9 | - echo "Travis branch is $TRAVIS_BRANCH" 10 | - echo "Travis branch is in pull request $TRAVIS_PULL+REQUEST" 11 | - mvn clean install -P 'guice' 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/xml/filepaths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #212121 4 | #000000 5 | #484848 6 | #005eff 7 | 8 | #4a4a78 9 | #FFA000 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/constants.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://github.com/NilsFo/LockScreenNotes 4 | https://play.google.com/store/apps/details?id=de.nilsfo.lsn 5 | https://github.com/NilsFo/LockScreenNotes/releases.atom 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/xml/general_appwidget_info.xml: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/activity/NotesActivity.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.activity; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | /** 6 | * Created by Nils on 16.08.2016. 7 | */ 8 | 9 | public abstract class NotesActivity extends AppCompatActivity { 10 | 11 | private boolean showNotifications; 12 | 13 | public boolean isShowNotifications() { 14 | return showNotifications; 15 | } 16 | 17 | public void setShowNotifications(boolean showNotifications) { 18 | this.showNotifications = showNotifications; 19 | } 20 | 21 | @Override 22 | protected void onResume() { 23 | setShowNotifications(true); 24 | super.onResume(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\Nils\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFC107 4 | #FFA000 5 | #FCF39F 6 | #536DFE 7 | 8 | #83DAF7 9 | @color/colorPrimary 10 | #FFA000 11 | #FFC107 12 | #555555 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/URLUtils.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util; 2 | 3 | import static de.nilsfo.lockscreennotes.util.RegexManager.URL_PATTERN; 4 | 5 | import android.content.Context; 6 | 7 | public class URLUtils { 8 | public static final int URL_MIN_SIZE = 4; 9 | private Context context; 10 | 11 | public URLUtils(Context context) { 12 | this.context = context; 13 | } 14 | 15 | public boolean containsSingleURL(String text) { 16 | return getURLRegexManager().containsSingleMatch(text); 17 | } 18 | 19 | public void browseURL(String url) { 20 | context.startActivity(new IntentUtils(context).getUrlIntent(url)); 21 | } 22 | 23 | public static RegexManager getURLRegexManager() { 24 | return new RegexManager(URL_PATTERN, URL_MIN_SIZE, true); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/values/array.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @string/prefs_full 6 | @string/prefs_long 7 | @string/prefs_medium 8 | @string/prefs_short 9 | 10 | 11 | 12 | @string/val_0 13 | @string/val_1 14 | @string/val_2 15 | @string/val_3 16 | 17 | 18 | 0 19 | 1 20 | 2 21 | 3 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_edit_note.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 8dp 7 | 4dp 8 | 4dp 9 | 6dp 10 | 32dp 11 | 16dp 12 | 8dp 13 | 14 | 4dp 15 | 3dp 16 | 3dp 17 | 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | android.defaults.buildfeatures.buildconfig=true 13 | android.enableJetifier=true 14 | android.nonFinalResIds=false 15 | android.nonTransitiveRClass=false 16 | android.useAndroidX=true 17 | org.gradle.jvmargs=-Xmx1536m 18 | 19 | # When configured, Gradle will run in incubating parallel mode. 20 | # This option should only be used with decoupled projects. More details, visit 21 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 22 | # org.gradle.parallel=true 23 | -------------------------------------------------------------------------------- /app/src/main/res/menu/note_card_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/font/FontManager.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.font; 2 | 3 | import android.content.Context; 4 | import android.graphics.Typeface; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.TextView; 8 | 9 | /** 10 | * Created by Nils on 30.11.2016. 11 | */ 12 | 13 | @Deprecated 14 | public class FontManager { 15 | 16 | public static final String ROOT = "fonts/"; 17 | @Deprecated 18 | public static final String FONTAWESOME = ROOT + "fontawesome-webfont.ttf"; 19 | 20 | public static Typeface getTypeface(Context context, String font) { 21 | return Typeface.createFromAsset(context.getAssets(), font); 22 | } 23 | 24 | public static void markAsIconContainer(View v, Typeface typeface) { 25 | if (v instanceof ViewGroup) { 26 | ViewGroup vg = (ViewGroup) v; 27 | for (int i = 0; i < vg.getChildCount(); i++) { 28 | View child = vg.getChildAt(i); 29 | markAsIconContainer(child, typeface); 30 | } 31 | } else if (v instanceof TextView) { 32 | ((TextView) v).setTypeface(typeface); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/receiver/BootReceiver.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.SharedPreferences; 7 | import android.preference.PreferenceManager; 8 | 9 | import de.nilsfo.lockscreennotes.receiver.alarms.LSNAlarmManager; 10 | import de.nilsfo.lockscreennotes.util.NotesNotificationManager; 11 | 12 | /** 13 | * Created by Nils on 02.09.2016. 14 | */ 15 | 16 | public class BootReceiver extends BroadcastReceiver { 17 | 18 | @Override 19 | public void onReceive(Context context, Intent intent) { 20 | if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { 21 | new NotesNotificationManager(context).showNoteNotifications(); 22 | 23 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); 24 | LSNAlarmManager alarmManager = new LSNAlarmManager(context); 25 | if (preferences.getBoolean("pref_auto_backups_enabled", false)) { 26 | alarmManager.requestCancelAndReScheduleNextAutoBackup(); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/receiver/NotificationDeleteReceiver.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.widget.Toast; 8 | 9 | import de.nilsfo.lockscreennotes.activity.NotificationDeleteRecieverDialogActivity; 10 | import de.nilsfo.lsn.R; 11 | import timber.log.Timber; 12 | 13 | @Deprecated 14 | public class NotificationDeleteReceiver extends BroadcastReceiver { 15 | 16 | @Override 17 | public void onReceive(Context context, Intent intent) { 18 | 19 | Bundle extras = intent.getExtras(); 20 | if (extras == null) { 21 | Timber.e("I just got a 'NoitificationDeleted' intent! But there were no extras! Could not perform any actions!"); 22 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 23 | return; 24 | } 25 | 26 | Intent dialogIntent = new Intent(context, NotificationDeleteRecieverDialogActivity.class); 27 | dialogIntent.putExtras(extras); 28 | context.startActivity(dialogIntent); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/imported/view/LinedTextHelper.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.imported.view; 2 | 3 | import android.content.Context; 4 | import android.graphics.Paint; 5 | import android.graphics.Rect; 6 | import android.os.Build; 7 | 8 | import java.util.Random; 9 | 10 | import de.nilsfo.lsn.R; 11 | 12 | public class LinedTextHelper { 13 | 14 | private final Rect rect; 15 | private final Paint paint; 16 | 17 | public LinedTextHelper(Context context) { 18 | rect = new Rect(); 19 | paint = new Paint(); 20 | paint.setStyle(Paint.Style.FILL_AND_STROKE); 21 | int color; 22 | 23 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 24 | color = context.getResources().getColor(R.color.edit_note_line, null); 25 | } else { 26 | color = context.getResources().getColor(R.color.edit_note_line); 27 | } 28 | paint.setColor(color); 29 | } 30 | 31 | public int getMinimumWidth() { 32 | return 1; 33 | } 34 | 35 | public boolean isInEditMode() { 36 | // TODO is this needed? 37 | // TODO does this have any effect? 38 | return new Random().nextBoolean(); 39 | } 40 | 41 | public Rect getRect() { 42 | return rect; 43 | } 44 | 45 | public Paint getPaint() { 46 | return paint; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 16 | 17 | 21 | 22 | 26 | 27 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /privacy.md: -------------------------------------------------------------------------------- 1 | # Privacy Policy 2 | 3 | Take a look at the app's requested permissions. 4 | This app **does not connect to the internet** and does not contain any ads or data collection methods. 5 | As such, no data is collected or sent anywhere. 6 | No user profiles are created or data stored anywhere else other than your device. 7 | 8 | ## Black Box Approach 9 | 10 | This app is a black box to its developers. 11 | No content or usage statistics are created or transmitted. 12 | 13 | ## Open Source 14 | 15 | This app is fully open source and you can see the source code here: https://github.com/NilsFo/LockScreenNotes 16 | 17 | If you do want to be tracked or your data harvested, you can always install proprietary software. 18 | 19 | # Disclaimer 20 | 21 | This software is provided “as is” and any expressed or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. 22 | In no event shall the regents or contributors be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including, but not limited to procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibiltiy of such damage. -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/NoteSharer.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.widget.Toast; 6 | 7 | import de.nilsfo.lockscreennotes.data.Note; 8 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 9 | import de.nilsfo.lsn.R; 10 | import timber.log.Timber; 11 | 12 | public class NoteSharer { 13 | 14 | public static final String INTENT_TYPE = "text/plain"; 15 | private final Context context; 16 | 17 | public NoteSharer(Context context) { 18 | this.context = context; 19 | } 20 | 21 | public boolean share(Note note) { 22 | return share(note.getText()); 23 | } 24 | 25 | public boolean share(long noteID) { 26 | DBAdapter adapter = new DBAdapter(context); 27 | adapter.open(); 28 | boolean b = share(noteID, adapter); 29 | adapter.close(); 30 | return b; 31 | } 32 | 33 | public boolean share(long noteID, DBAdapter adapter) { 34 | Note note = Note.getNoteFromDB(noteID, adapter); 35 | 36 | if (note == null) { 37 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 38 | return false; 39 | } else return share(note); 40 | } 41 | 42 | public boolean share(String text) { 43 | Intent intent = new IntentUtils(context).getNoteShareIntent(text); 44 | try { 45 | context.startActivity(intent); 46 | } catch (Exception e) { 47 | Timber.e(e); 48 | return false; 49 | } 50 | return true; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/PermissionBalloonTimer.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util; 2 | 3 | import android.content.Context; 4 | import android.view.MenuItem; 5 | import android.view.View; 6 | 7 | public class PermissionBalloonTimer { 8 | 9 | public static final long PERMISSION_BALLOON_DELAY = 250; 10 | 11 | private boolean balloonShownOnce; 12 | private boolean enabled; 13 | private final Context context; 14 | 15 | public PermissionBalloonTimer(Context context) { 16 | this.context = context; 17 | setEnabled(true); 18 | balloonShownOnce = false; 19 | } 20 | 21 | public boolean isEnabled() { 22 | return enabled; 23 | } 24 | 25 | private void setEnabled(boolean enabled) { 26 | this.enabled = enabled; 27 | } 28 | 29 | public void disable() { 30 | setEnabled(false); 31 | } 32 | 33 | public boolean checkPermissionBalloonCondition(View checkNotificationPermissionItemView, 34 | MenuItem checkNotificationPermissionItem) { 35 | NotesNotificationManager notesNotificationManager = new NotesNotificationManager(context); 36 | return isEnabled() && 37 | //!notesNotificationManager.hasUserPermissionToDisplayNotifications() && 38 | checkNotificationPermissionItemView != null && 39 | checkNotificationPermissionItem.isVisible(); 40 | } 41 | 42 | public boolean hasBalloonShownOnce() { 43 | return balloonShownOnce; 44 | } 45 | 46 | public void markBalloonShownOnce() { 47 | this.balloonShownOnce = true; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 27 | 28 | 29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_time.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 18 | 19 | 26 | 27 | 31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/content/browse/NoteContentBrowseDialogURLs.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.content.browse; 2 | 3 | import android.content.Context; 4 | 5 | import java.util.ArrayList; 6 | 7 | import de.nilsfo.lockscreennotes.data.content.NoteContentAnalyzer; 8 | import de.nilsfo.lockscreennotes.util.URLUtils; 9 | import de.nilsfo.lsn.R; 10 | 11 | public class NoteContentBrowseDialogURLs extends NoteContentBrowseDialog { 12 | public NoteContentBrowseDialogURLs(Context context) { 13 | super(context); 14 | } 15 | 16 | @Override 17 | protected void browseElement(String element) { 18 | URLUtils urlUtils = new URLUtils(context); 19 | urlUtils.browseURL(element); 20 | } 21 | 22 | @Override 23 | protected ArrayList getMatchesInText(String text) { 24 | return new NoteContentAnalyzer(text).getURLs(); 25 | } 26 | 27 | @Override 28 | protected int getErrorNothingSelectedText() { 29 | return R.string.error_nothing_selected; 30 | } 31 | 32 | @Override 33 | protected int getDialogPositiveButtonName() { 34 | return R.string.action_browse; 35 | } 36 | 37 | @Override 38 | protected int getDialogBrowseAllButtonName() { 39 | return R.string.action_browse_all; 40 | } 41 | 42 | @Override 43 | protected int getErrorNothingFoundText() { 44 | return R.string.error_no_web_links; 45 | } 46 | 47 | @Override 48 | protected int getDialogTitle() { 49 | return R.string.info_choose_url; 50 | } 51 | 52 | @Override 53 | protected int getDialogIcon() { 54 | return R.drawable.baseline_link_black_48; 55 | } 56 | 57 | @Override 58 | protected boolean isSingleSelection() { 59 | return false; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdk 34 5 | 6 | defaultConfig { 7 | applicationId "de.nilsfo.lsn" 8 | minSdk 21 9 | targetSdk 34 10 | // targetSdkPreview "Tiramisu" 11 | versionCode 13 12 | versionName "1.0.11" 13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | namespace 'de.nilsfo.lsn' 22 | buildToolsVersion '30.0.3' 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: 'libs', include: ['*.jar']) 27 | androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { 28 | exclude group: 'com.android.support', module: 'support-annotations' 29 | }) 30 | 31 | implementation "com.github.skydoves:balloon:1.4.6" 32 | implementation 'androidx.appcompat:appcompat:1.7.0' 33 | implementation 'com.google.android.material:material:1.12.0' 34 | implementation 'com.jakewharton.timber:timber:4.7.0' 35 | implementation 'com.google.zxing:core:3.2.0' 36 | 37 | annotationProcessor 'org.jetbrains:annotations-java5:15.0' 38 | 39 | testImplementation 'junit:junit:4.12' 40 | 41 | //debugImplementation 'com.amitshekhar.android:debug-db:1.0.0' 42 | //debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3' 43 | //debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.3' 44 | //compile group: 'org.json', name: 'json', version: '20090211' 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/content/browse/NoteContentBrowseDialogPhone.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.content.browse; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | 6 | import java.util.ArrayList; 7 | 8 | import de.nilsfo.lockscreennotes.data.content.NoteContentAnalyzer; 9 | import de.nilsfo.lockscreennotes.util.IntentUtils; 10 | import de.nilsfo.lsn.R; 11 | 12 | public class NoteContentBrowseDialogPhone extends NoteContentBrowseDialog { 13 | public NoteContentBrowseDialogPhone(Context context) { 14 | super(context); 15 | } 16 | 17 | @Override 18 | protected void browseElement(String element) { 19 | Intent intent = new IntentUtils(context).getPhoneNumberIntent(element); 20 | context.startActivity(intent); 21 | } 22 | 23 | @Override 24 | protected ArrayList getMatchesInText(String text) { 25 | return new NoteContentAnalyzer(text).getPhoneNumbers(); 26 | } 27 | 28 | @Override 29 | protected int getErrorNothingSelectedText() { 30 | return R.string.error_nothing_selected; 31 | } 32 | 33 | @Override 34 | protected int getDialogPositiveButtonName() { 35 | return R.string.action_dial; 36 | } 37 | 38 | @Override 39 | protected int getDialogBrowseAllButtonName() { 40 | return -1; 41 | } 42 | 43 | @Override 44 | protected int getErrorNothingFoundText() { 45 | return R.string.error_no_numbers; 46 | } 47 | 48 | @Override 49 | protected int getDialogTitle() { 50 | return R.string.info_choose_phone_number; 51 | } 52 | 53 | @Override 54 | protected int getDialogIcon() { 55 | return R.drawable.baseline_phone_black_48; 56 | } 57 | 58 | @Override 59 | protected boolean isSingleSelection() { 60 | return true; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/imported/view/LinedEditText.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.imported.view; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Paint; 6 | import android.graphics.Rect; 7 | import android.util.AttributeSet; 8 | 9 | import androidx.appcompat.widget.AppCompatEditText; 10 | 11 | import timber.log.Timber; 12 | 13 | /** 14 | * Created by Nils on 14.08.2016. 15 | */ 16 | 17 | public class LinedEditText extends AppCompatEditText { 18 | 19 | private LinedTextHelper helper; 20 | 21 | // we need this constructor for LayoutInflater 22 | public LinedEditText(Context context, AttributeSet attrs) { 23 | super(context, attrs); 24 | helper = new LinedTextHelper(context); 25 | } 26 | 27 | @Override 28 | protected void onDraw(Canvas canvas) { 29 | //int count = getLineCount(); 30 | int height = getHeight(); 31 | int line_height = getLineHeight(); 32 | int count = height / line_height; 33 | 34 | if (getLineCount() > count) { 35 | count = getLineCount();//for long text with scrolling 36 | } 37 | 38 | Rect r = helper.getRect(); 39 | Paint paint = helper.getPaint(); 40 | int baseline = getLineBounds(0, r);//first line 41 | 42 | for (int i = 0; i < count; i++) { 43 | canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1, paint); 44 | baseline += getLineHeight();//next line 45 | } 46 | 47 | super.onDraw(canvas); 48 | } 49 | 50 | @Override 51 | public boolean isInEditMode() { 52 | if (helper == null) { 53 | Timber.e("NO LinedTextHelper DECLARED!"); 54 | return false; 55 | } 56 | return helper.isInEditMode(); 57 | } 58 | 59 | @Override 60 | public int getMinimumWidth() { 61 | return helper.getMinimumWidth(); 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_headers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
9 | 10 |
14 | 15 |
19 | 20 |
24 | 25 | 32 | 33 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/content/browse/NoteContentBrowseDialogMail.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.content.browse; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | 6 | import java.util.ArrayList; 7 | 8 | import de.nilsfo.lockscreennotes.data.content.NoteContentAnalyzer; 9 | import de.nilsfo.lockscreennotes.util.IntentUtils; 10 | import de.nilsfo.lsn.R; 11 | 12 | public class NoteContentBrowseDialogMail extends NoteContentBrowseDialog { 13 | 14 | public static final boolean FORCE_CHOOSER = true; 15 | 16 | public NoteContentBrowseDialogMail(Context context) { 17 | super(context); 18 | } 19 | 20 | @Override 21 | protected void browseElement(String element) { 22 | Intent intent = new IntentUtils(context).getMailIntent(element, FORCE_CHOOSER); 23 | context.startActivity(intent); 24 | } 25 | 26 | @Override 27 | protected ArrayList getMatchesInText(String text) { 28 | return new NoteContentAnalyzer(text).getMails(); 29 | } 30 | 31 | @Override 32 | protected int getErrorNothingSelectedText() { 33 | return R.string.error_nothing_selected; 34 | } 35 | 36 | @Override 37 | protected int getDialogPositiveButtonName() { 38 | return R.string.action_write_mail; 39 | } 40 | 41 | @Override 42 | protected int getDialogBrowseAllButtonName() { 43 | return -1; 44 | } 45 | 46 | @Override 47 | protected int getErrorNothingFoundText() { 48 | return R.string.error_no_mail; 49 | } 50 | 51 | @Override 52 | protected int getDialogTitle() { 53 | return R.string.info_choose_mail; 54 | } 55 | 56 | @Override 57 | protected int getDialogIcon() { 58 | return R.drawable.baseline_email_black_48; 59 | } 60 | 61 | @Override 62 | protected boolean isSingleSelection() { 63 | return true; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/io/StoragePermissionManager.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.io; 2 | 3 | import static de.nilsfo.lockscreennotes.LockScreenNotes.REQUEST_CODE_PERMISSION_STORAGE; 4 | 5 | import android.Manifest; 6 | import android.app.Activity; 7 | import android.content.Context; 8 | import android.content.pm.PackageManager; 9 | 10 | import androidx.core.app.ActivityCompat; 11 | import androidx.core.content.ContextCompat; 12 | 13 | public class StoragePermissionManager { 14 | 15 | public static class InsufficientStoragePermissionException extends Exception { 16 | public InsufficientStoragePermissionException() { 17 | super(); 18 | } 19 | 20 | public InsufficientStoragePermissionException(String message) { 21 | super(message); 22 | } 23 | 24 | public InsufficientStoragePermissionException(String message, Throwable cause) { 25 | super(message, cause); 26 | } 27 | 28 | public InsufficientStoragePermissionException(Throwable cause) { 29 | super(cause); 30 | } 31 | 32 | } 33 | 34 | private final Context context; 35 | 36 | public StoragePermissionManager(Context context) { 37 | this.context = context; 38 | } 39 | 40 | public boolean hasExternalStoragePermission() { 41 | return ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED 42 | && 43 | ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; 44 | } 45 | 46 | public void requestExternalStoragePermission(Activity activity) { 47 | ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CODE_PERMISSION_STORAGE); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/IntentUtils.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util; 2 | 3 | import static de.nilsfo.lockscreennotes.util.NoteSharer.INTENT_TYPE; 4 | 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.net.Uri; 8 | 9 | import de.nilsfo.lsn.R; 10 | import timber.log.Timber; 11 | 12 | public class IntentUtils { 13 | 14 | private final Context context; 15 | 16 | public IntentUtils(Context context) { 17 | this.context = context; 18 | } 19 | 20 | public Intent getNoteShareIntent(String text) { 21 | Intent sendIntent = new Intent(); 22 | sendIntent.setAction(Intent.ACTION_SEND); 23 | sendIntent.putExtra(Intent.EXTRA_TEXT, text); 24 | sendIntent.setType(INTENT_TYPE); 25 | return Intent.createChooser(sendIntent, context.getString(R.string.share_using)); 26 | } 27 | 28 | public Intent getUrlIntent(String url) { 29 | if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://")) { 30 | url = "http://" + url; 31 | } 32 | Timber.i("Sending out URL browse intent: " + url); 33 | 34 | Intent intent = new Intent(Intent.ACTION_VIEW); 35 | intent.setData(Uri.parse(url)); 36 | return intent; 37 | } 38 | 39 | public Intent getPhoneNumberIntent(String number) { 40 | String uri = "tel:" + number; 41 | Intent intent = new Intent(Intent.ACTION_DIAL); 42 | intent.setData(Uri.parse(uri)); 43 | return intent; 44 | } 45 | 46 | public Intent getMailIntent(String mail, boolean chooser) { 47 | Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", mail, null)); 48 | emailIntent.putExtra(Intent.EXTRA_EMAIL, mail); 49 | 50 | if (chooser) { 51 | String title = context.getString(R.string.mail_via); 52 | return Intent.createChooser(emailIntent, title); 53 | } 54 | return emailIntent; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_notifications.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/menu/edit_note_menu.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 17 | 18 | 23 | 24 | 28 | 29 | 33 | 34 | 38 | 39 | 43 | 44 | 48 | 49 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_auto_backup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 27 | 28 | 34 | 35 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/imported/view/LinedTextView.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.imported.view; 2 | 3 | 4 | import android.content.Context; 5 | import android.graphics.Canvas; 6 | import android.graphics.Paint; 7 | import android.graphics.Rect; 8 | import android.util.AttributeSet; 9 | import android.widget.Toast; 10 | 11 | import androidx.appcompat.widget.AppCompatTextView; 12 | 13 | import de.nilsfo.lsn.R; 14 | import timber.log.Timber; 15 | 16 | public class LinedTextView extends AppCompatTextView { 17 | 18 | private final LinedTextHelper helper; 19 | 20 | // we need this constructor for LayoutInflater 21 | public LinedTextView(Context context, AttributeSet attrs) { 22 | super(context, attrs); 23 | helper = new LinedTextHelper(context); 24 | } 25 | 26 | @Override 27 | protected void onDraw(Canvas canvas) { 28 | //int count = getLineCount(); 29 | int height = getHeight(); 30 | int line_height = getLineHeight(); 31 | int count = height / line_height; 32 | 33 | if (getLineCount() > count) { 34 | count = getLineCount();//for long text with scrolling 35 | } 36 | 37 | if (helper == null) { 38 | String errorText = getContext().getString(R.string.error_line_rendering_contact_dev); 39 | Timber.w(errorText); 40 | Toast.makeText(getContext(), errorText, Toast.LENGTH_LONG).show(); 41 | } else { 42 | Rect r = helper.getRect(); 43 | Paint paint = helper.getPaint(); 44 | int baseline = getLineBounds(0, r);//first line 45 | 46 | for (int i = 0; i < count; i++) { 47 | canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1, paint); 48 | baseline += getLineHeight();//next line 49 | } 50 | } 51 | 52 | super.onDraw(canvas); 53 | } 54 | 55 | @Override 56 | public boolean isInEditMode() { 57 | if (helper == null) { 58 | Timber.e("NO LinedTextHelper DECLARED!"); 59 | return false; 60 | } 61 | return helper.isInEditMode(); 62 | } 63 | 64 | @Override 65 | public int getMinimumWidth() { 66 | if (helper == null) { 67 | return 1; 68 | } 69 | return helper.getMinimumWidth(); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/font/FontAwesomeDrawableBuilder.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.font; 2 | 3 | import android.content.Context; 4 | import android.graphics.Color; 5 | import android.preference.PreferenceManager; 6 | import android.text.Layout; 7 | import android.util.TypedValue; 8 | 9 | import de.nilsfo.lockscreennotes.imported.TextDrawable; 10 | import timber.log.Timber; 11 | 12 | 13 | /** 14 | * Created by Nils on 03.01.2017. 15 | */ 16 | 17 | @Deprecated 18 | public abstract class FontAwesomeDrawableBuilder { 19 | 20 | public static final int DEFAULT__MENU_ICON_SCALE = 9; 21 | 22 | @Deprecated 23 | public static TextDrawable get(Context context, String text, int size, int color) { 24 | TextDrawable faIcon = new TextDrawable(context); 25 | faIcon.setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); 26 | faIcon.setTextAlign(Layout.Alignment.ALIGN_CENTER); 27 | faIcon.setTypeface(FontManager.getTypeface(context, FontManager.FONTAWESOME)); 28 | faIcon.setText(text); 29 | faIcon.setTextColor(color); 30 | 31 | return faIcon; 32 | } 33 | 34 | public static TextDrawable getOptionsIcon(Context context, int text) { 35 | double density = context.getResources().getDisplayMetrics().density; 36 | Timber.i("Screen density value: " + density); 37 | 38 | int itemScale; 39 | String prefScale = PreferenceManager.getDefaultSharedPreferences(context).getString("prefs_action_bar_icon_scale", String.valueOf(DEFAULT__MENU_ICON_SCALE)); 40 | try { 41 | itemScale = Integer.parseInt(prefScale); 42 | } catch (NumberFormatException e) { 43 | Timber.e(e, "Failed to parse the scale from the preferences! Reverting to default. Found in the prefs: " + prefScale); 44 | itemScale = DEFAULT__MENU_ICON_SCALE; 45 | } 46 | itemScale++; 47 | 48 | TextDrawable faIcon = get(context, text, (int) (itemScale * density), Color.WHITE); 49 | faIcon.setAlpha(153); 50 | return faIcon; 51 | } 52 | 53 | public static TextDrawable get(Context context, int text, int size, int color) { 54 | return get(context, context.getString(text), size, color); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/receiver/NotificationBrowseURLReceiver.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.widget.Toast; 8 | 9 | import java.util.ArrayList; 10 | 11 | import de.nilsfo.lockscreennotes.data.Note; 12 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 13 | import de.nilsfo.lockscreennotes.util.NotesNotificationManager; 14 | import de.nilsfo.lockscreennotes.util.URLUtils; 15 | import de.nilsfo.lsn.R; 16 | import timber.log.Timber; 17 | 18 | /** 19 | * Created by Nils on 17.09.2016. 20 | */ 21 | 22 | @Deprecated 23 | public class NotificationBrowseURLReceiver extends BroadcastReceiver { 24 | 25 | @Override 26 | public void onReceive(Context context, Intent intent) { 27 | Bundle extras = intent.getExtras(); 28 | if (extras == null) { 29 | Timber.e("I just got a 'NoitificationBrowseURL' intent! But there were no extras! Could not perform any actions!"); 30 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 31 | return; 32 | } 33 | 34 | DBAdapter databaseAdapter = new DBAdapter(context); 35 | databaseAdapter.open(); 36 | 37 | long notificationId = extras.getInt(NotesNotificationManager.INTENT_EXTRA_NOTE_ID); 38 | Note note = Note.getNoteFromDB(notificationId, databaseAdapter); 39 | 40 | if (note == null) { 41 | Timber.e("The note with the ID " + notificationId + " was not found in the Database!"); 42 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 43 | return; 44 | } 45 | 46 | String text = note.getText(); 47 | databaseAdapter.close(); 48 | 49 | Timber.i("Attempting to browse URL: " + text); 50 | URLUtils utils = new URLUtils(context); 51 | if (!utils.containsSingleURL(text)) { 52 | Timber.e("The note with the ID " + notificationId + " is not a single URL!"); 53 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 54 | return; 55 | } 56 | 57 | ArrayList list = URLUtils.getURLRegexManager().findMatchesInText(text); 58 | utils.browseURL(list.get(0)); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 25 | 26 | 30 | 31 | 35 | 36 | 37 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/general_appwidget_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 25 | 26 | 34 | 35 | 43 | 44 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/listener/SettingsBindPreferenceSummaryToValueListener.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util.listener; 2 | 3 | import android.content.Context; 4 | import android.preference.ListPreference; 5 | import android.preference.Preference; 6 | 7 | import de.nilsfo.lsn.R; 8 | 9 | /** 10 | * Created by Nils on 21.02.2017. 11 | */ 12 | 13 | public class SettingsBindPreferenceSummaryToValueListener implements Preference.OnPreferenceChangeListener { 14 | 15 | private Integer stringResource = null; 16 | private Runnable additionalAction; 17 | 18 | public SettingsBindPreferenceSummaryToValueListener() { 19 | } 20 | 21 | public SettingsBindPreferenceSummaryToValueListener(int stringResource) { 22 | this.stringResource = stringResource; 23 | } 24 | 25 | @Override 26 | public boolean onPreferenceChange(Preference preference, Object value) { 27 | String stringValue = value.toString(); 28 | Context context = preference.getContext(); 29 | 30 | if (preference instanceof ListPreference) { 31 | // For list prefs_general, look up the correct display value in 32 | // the preference's 'entries' list. 33 | ListPreference listPreference = (ListPreference) preference; 34 | int index = listPreference.findIndexOfValue(stringValue); 35 | 36 | // Set the summary to reflect the new value. 37 | 38 | String text = index >= 0 ? listPreference.getEntries()[index].toString() : context.getString(R.string.error_unknown); 39 | if (stringResource != null) { 40 | text = context.getString(stringResource, text); 41 | } 42 | 43 | preference.setSummary(text); 44 | } else { 45 | // For all other prefs_general, set the summary to the value's 46 | // simple string representation. 47 | if (stringResource != null) { 48 | stringValue = context.getString(stringResource, stringValue); 49 | } 50 | 51 | preference.setSummary(stringValue); 52 | } 53 | 54 | if (hasAdditionalAction()) { 55 | additionalAction.run(); 56 | } 57 | 58 | return true; 59 | } 60 | 61 | public boolean hasAdditionalAction() { 62 | return getAdditionalAction() != null; 63 | } 64 | 65 | public Runnable getAdditionalAction() { 66 | return additionalAction; 67 | } 68 | 69 | public void setAdditionalAction(Runnable additionalAction) { 70 | this.additionalAction = additionalAction; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/content/NoteContentAnalyzer.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.content; 2 | 3 | import static de.nilsfo.lockscreennotes.util.RegexManager.MAIL_PATTERN; 4 | import static de.nilsfo.lockscreennotes.util.RegexManager.PHONE_NUMBER_PATTERN; 5 | 6 | import java.util.ArrayList; 7 | 8 | import de.nilsfo.lockscreennotes.data.Note; 9 | import de.nilsfo.lockscreennotes.util.RegexManager; 10 | import de.nilsfo.lockscreennotes.util.URLUtils; 11 | import timber.log.Timber; 12 | 13 | public class NoteContentAnalyzer { 14 | 15 | public static final int DEFAULT_PHONE_NUMBER_MIN_LENGTH = 5; 16 | private String inputText; 17 | private ArrayList urlList; 18 | private ArrayList mailList; 19 | private ArrayList phoneList; 20 | 21 | public NoteContentAnalyzer(String inputText) { 22 | if (inputText == null) { 23 | Timber.e("Text to analyze is null!!"); 24 | inputText = ""; 25 | } 26 | this.inputText = inputText; 27 | } 28 | 29 | public NoteContentAnalyzer(Note source) { 30 | this(source.getText()); 31 | } 32 | 33 | public boolean containsURL() { 34 | return !getURLs().isEmpty(); 35 | } 36 | 37 | public boolean containsEMail() { 38 | return !getMails().isEmpty(); 39 | } 40 | 41 | public boolean containsPhoneNumber() { 42 | return !getPhoneNumbers().isEmpty(); 43 | } 44 | 45 | public ArrayList getPhoneNumbers(int minimumCharacterLength) { 46 | if (minimumCharacterLength <= 0) { 47 | throw new IllegalArgumentException("Minimum phone number character [" + minimumCharacterLength + "] must not be zero or negative!"); 48 | } 49 | 50 | if (phoneList == null) { 51 | ArrayList tempList = new RegexManager(PHONE_NUMBER_PATTERN).findMatchesInText(inputText); 52 | phoneList = new ArrayList<>(); 53 | for (String s : tempList) { 54 | if (s.length() >= minimumCharacterLength) { 55 | phoneList.add(s.trim()); 56 | } 57 | } 58 | } 59 | return phoneList; 60 | } 61 | 62 | public boolean containsAnything() { 63 | return containsURL() || containsEMail() || containsPhoneNumber(); 64 | } 65 | 66 | public ArrayList getPhoneNumbers() { 67 | return getPhoneNumbers(DEFAULT_PHONE_NUMBER_MIN_LENGTH); 68 | } 69 | 70 | public ArrayList getURLs() { 71 | if (urlList == null) { 72 | urlList = URLUtils.getURLRegexManager().findMatchesInText(inputText); 73 | } 74 | return urlList; 75 | } 76 | 77 | public ArrayList getMails() { 78 | if (mailList == null) { 79 | mailList = new RegexManager(MAIL_PATTERN).findMatchesInText(inputText); 80 | } 81 | return mailList; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/concurrent/QRTask.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.concurrent; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.Color; 5 | import android.os.AsyncTask; 6 | 7 | import com.google.zxing.BarcodeFormat; 8 | import com.google.zxing.WriterException; 9 | import com.google.zxing.common.BitMatrix; 10 | import com.google.zxing.qrcode.QRCodeWriter; 11 | 12 | import java.util.ArrayList; 13 | 14 | import de.nilsfo.lsn.R; 15 | import timber.log.Timber; 16 | 17 | public class QRTask extends AsyncTask { 18 | 19 | private ArrayList listeners; 20 | private String text; 21 | private int size; 22 | 23 | public QRTask(String text, int size) { 24 | if (text.equals("")) { 25 | text = " "; 26 | } 27 | 28 | this.text = text; 29 | this.size = size; 30 | listeners = new ArrayList<>(); 31 | } 32 | 33 | @Override 34 | protected Bitmap doInBackground(Void... params) { 35 | Timber.i("Convertion from '" + text + "' to Bitmap starts now."); 36 | QRCodeWriter writer = new QRCodeWriter(); 37 | Bitmap bmp = null; 38 | 39 | try { 40 | Timber.i("QR - Preparations"); 41 | BitMatrix bitMatrix = writer.encode(text, BarcodeFormat.QR_CODE, size, size); 42 | Timber.i("QR - Encoding finished"); 43 | 44 | int width = bitMatrix.getWidth(); 45 | int height = bitMatrix.getHeight(); 46 | bmp = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); 47 | for (int x = 0; x < width; x++) { 48 | for (int y = 0; y < height; y++) { 49 | bmp.setPixel(x, y, bitMatrix.get(x, y) ? Color.BLACK : Color.WHITE); 50 | } 51 | } 52 | Timber.i("QR - Bitmatp available"); 53 | 54 | } catch (WriterException e) { 55 | e.printStackTrace(); 56 | Timber.e(e, "Error while creating the QR code for " + text); 57 | return null; 58 | } 59 | return bmp; 60 | } 61 | 62 | @Override 63 | protected void onPostExecute(Bitmap map) { 64 | Timber.i("Finished QR Bitmap creation!"); 65 | 66 | if (map != null) { 67 | Timber.i("Parsing into Dialog..."); 68 | 69 | for (QRTaskListener listener : listeners) { 70 | listener.onSuccess(map); 71 | } 72 | } else { 73 | Timber.w("QR Bitmap creation failed!"); 74 | for (QRTaskListener listener : listeners) { 75 | listener.onFailure(R.string.error_qr_generation_failed); 76 | } 77 | } 78 | } 79 | 80 | public boolean addListener(QRTaskListener listener) { 81 | return listeners.add(listener); 82 | } 83 | 84 | public QRTaskListener remove(int index) { 85 | return listeners.remove(index); 86 | } 87 | 88 | public void clearListeners() { 89 | listeners.clear(); 90 | } 91 | 92 | public interface QRTaskListener { 93 | public void onSuccess(Bitmap image); 94 | 95 | public void onFailure(int reason); 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/receiver/widget/GeneralWidget.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.receiver.widget; 2 | 3 | import android.appwidget.AppWidgetManager; 4 | import android.appwidget.AppWidgetProvider; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | 9 | import java.util.Arrays; 10 | 11 | import timber.log.Timber; 12 | 13 | @Deprecated 14 | public class GeneralWidget extends AppWidgetProvider { 15 | 16 | @Override 17 | public void onReceive(Context context, Intent intent) { 18 | //Called on every intent ever sent to this widget 19 | super.onReceive(context, intent); 20 | 21 | Timber.i("GeneralWidget got a general intent: " + intent.getDataString()); 22 | } 23 | 24 | @Override 25 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 26 | //Called when the auto timer is triggered 27 | super.onUpdate(context, appWidgetManager, appWidgetIds); 28 | Timber.w("LSN General-Widget: OnUpdate() called!"); 29 | 30 | final int N = appWidgetIds.length; 31 | 32 | // Perform this loop procedure for each App Widget that belongs to this provider 33 | for (int i = 0; i < N; i++) { 34 | int appWidgetId = appWidgetIds[i]; 35 | 36 | // Create an Intent to launch ExampleActivity 37 | // Intent intent = new Intent(context, MainActivity.class); 38 | // PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); 39 | 40 | // Get the layout for the App Widget and attach an on-click listener 41 | // to the button 42 | 43 | //RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget_provider_layout); 44 | //views.setOnClickPendingIntent(R.id.button, pendingIntent); 45 | 46 | // Tell the AppWidgetManager to perform an update on the current app widget 47 | //appWidgetManager.updateAppWidget(appWidgetId, views); 48 | } 49 | } 50 | 51 | @Override 52 | public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) { 53 | //Called on resize 54 | super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions); 55 | 56 | Bundle b = appWidgetManager.getAppWidgetOptions(appWidgetId); 57 | Timber.i("GeneralWidget options changed:"); 58 | Timber.i("Old: " + Arrays.toString(b.keySet().toArray())); 59 | Timber.i("New: " + Arrays.toString(newOptions.keySet().toArray())); 60 | } 61 | 62 | @Override 63 | public void onEnabled(Context context) { 64 | //Called when widget added 65 | super.onEnabled(context); 66 | Timber.i("LSN General-Widget added to host pane!"); 67 | } 68 | 69 | @Override 70 | public void onDisabled(Context context) { 71 | //Called when widget is removed 72 | super.onDisabled(context); 73 | Timber.w("LSN General-Widget removed from host pane!"); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_general.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 13 | 14 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | 34 | 35 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 49 | 50 | 64 | 65 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | 14 | 17 | 18 | 21 | 22 | 23 | 24 | 28 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 45 | 46 | 50 | 51 | 55 | 56 | 60 | 61 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "master" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "master" ] 20 | schedule: 21 | - cron: '44 10 * * 2' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: windows-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'java' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 23 | 24 | 29 | 30 | 34 | 35 | 46 | 47 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout/note_row.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 19 | 20 | 28 | 29 | 41 | 42 | 49 | 50 | 51 | 54 | 55 | 65 | 66 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/RelativeTimeTextfieldContainer.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data; 2 | 3 | import android.content.Context; 4 | import android.widget.TextView; 5 | import android.widget.Toast; 6 | 7 | import java.util.ArrayList; 8 | import java.util.HashMap; 9 | import java.util.LinkedList; 10 | 11 | import de.nilsfo.lockscreennotes.util.TimeUtils; 12 | import de.nilsfo.lsn.R; 13 | import timber.log.Timber; 14 | 15 | /** 16 | * Created by Nils on 21.02.2017. 17 | */ 18 | 19 | public class RelativeTimeTextfieldContainer { 20 | 21 | private static RelativeTimeTextfieldContainer container; 22 | private ArrayList viewList; 23 | private LinkedList deleteList; 24 | private HashMap timestampMap; 25 | 26 | private RelativeTimeTextfieldContainer() { 27 | viewList = new ArrayList(); 28 | timestampMap = new HashMap(); 29 | deleteList = new LinkedList(); 30 | } 31 | 32 | public void clear() { 33 | viewList.clear(); 34 | } 35 | 36 | public void add(TextView view, long timestamp) { 37 | Timber.v("Requested to add view [" + view.hashCode() + "] to the list."); 38 | if (!viewList.contains(view)) { 39 | viewList.add(view); 40 | timestampMap.put(view, timestamp); 41 | Timber.v("... and it succeeded!"); 42 | } else { 43 | timestampMap.put(view, timestamp); 44 | Timber.v("... but it failed. It was already contained."); 45 | } 46 | } 47 | 48 | private void remove(TextView view) { 49 | viewList.remove(view); 50 | timestampMap.remove(view); 51 | } 52 | 53 | public void requestDelete(TextView view) { 54 | deleteList.add(view); 55 | } 56 | 57 | public void updateText(Context context) { 58 | Timber.v("Updating relative texts. Registered Views: " + viewList.size() + ". Timestamps: " + timestampMap.keySet().size() + ". DeleteQ: " + deleteList.size()); 59 | while (!deleteList.isEmpty()) { 60 | remove(deleteList.pop()); 61 | } 62 | 63 | for (TextView v : viewList) { 64 | Timber.v("TextUpdater: Is Null? v " + (v == null) + "? Map? " + (timestampMap == null) + ". In Map? " + timestampMap.containsKey(v)); 65 | if (v == null) { 66 | Timber.w("Failed to fetch a textview from the list!"); 67 | continue; 68 | } 69 | boolean contains = timestampMap.containsKey(v); 70 | if (contains) { 71 | long timestamp = Note.DEFAULT_TIMESTAMP; 72 | try { 73 | timestamp = timestampMap.get(v); 74 | } catch (Exception e) { 75 | Timber.e(e); 76 | Timber.e("Failed to get timestamp for: " + v); 77 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 78 | } 79 | 80 | if (v.isShown()) { 81 | v.setText(context.getString(R.string.last_edited, new TimeUtils(context).formatRelative(timestamp))); 82 | } 83 | } else { 84 | v.setText(context.getString(R.string.last_edited, context.getText(R.string.error_internal_error))); 85 | Timber.e("The timestamp map did a big oof."); 86 | deleteList.add(v); 87 | } 88 | } 89 | Timber.v("Updating displayed note times. Updated count: " + viewList.size() + " To be deleted: " + deleteList.size()); 90 | } 91 | 92 | public static RelativeTimeTextfieldContainer getContainer() { 93 | if (container == null) container = new RelativeTimeTextfieldContainer(); 94 | return container; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/io/backups/NoteJSONUtils.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.io.backups; 2 | 3 | import android.content.Context; 4 | 5 | import org.json.JSONArray; 6 | import org.json.JSONException; 7 | import org.json.JSONObject; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Date; 11 | import java.util.List; 12 | 13 | import de.nilsfo.lockscreennotes.data.Note; 14 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 15 | import de.nilsfo.lockscreennotes.util.VersionManager; 16 | import timber.log.Timber; 17 | 18 | public abstract class NoteJSONUtils { 19 | 20 | public static final int VERSION_NOT_AVAILABLE = -1; 21 | 22 | public static final String JSONARG_META_COUNT = "count"; 23 | public static final String JSONARG_META_VERSION = "version"; 24 | public static final String JSONARG_META_TIMESTAMP = "timestamp"; 25 | public static final String JSONARG_META_NOTES = "notes"; 26 | 27 | public static final String JSONARG_NOTE_TEXT = "text"; 28 | public static final String JSONARG_NOTE_ENABLED = "enabdled"; 29 | public static final String JSONARG_NOTE_TIMESTAMP = "timestamp_edit"; 30 | public static final String JSONARG_NOTE_DATABASEID = "database_id"; 31 | 32 | public static JSONObject toJSON(Note note) throws JSONException { 33 | JSONObject convertedNote = new JSONObject(); 34 | 35 | convertedNote.put(JSONARG_NOTE_TEXT, note.getText()); 36 | convertedNote.put(JSONARG_NOTE_ENABLED, note.isEnabled()); 37 | convertedNote.put(JSONARG_NOTE_TIMESTAMP, note.getTimestamp()); 38 | convertedNote.put(JSONARG_NOTE_DATABASEID, note.getDatabaseID()); 39 | 40 | return convertedNote; 41 | } 42 | 43 | public static JSONArray toJSON(Note... notes) throws JSONException { 44 | JSONArray array = new JSONArray(); 45 | for (Note n : notes) array.put(toJSON(n)); 46 | return array; 47 | } 48 | 49 | public static JSONArray toJSON(List notes) throws JSONException { 50 | Note[] array = new Note[notes.size()]; 51 | for (int i = 0; i < notes.size(); i++) { 52 | array[i] = notes.get(i); 53 | } 54 | return toJSON(array); 55 | } 56 | 57 | public static JSONObject toJSON(Context context) throws JSONException { 58 | JSONObject data = new JSONObject(); 59 | 60 | DBAdapter databaseAdapter = new DBAdapter(context); 61 | databaseAdapter.open(); 62 | ArrayList notes = Note.getAllNotesFromDB(databaseAdapter); 63 | JSONArray array = toJSON(notes); 64 | databaseAdapter.close(); 65 | 66 | data.put(JSONARG_META_NOTES, array); 67 | data.put(JSONARG_META_COUNT, notes.size()); 68 | data.put(JSONARG_META_TIMESTAMP, new Date().getTime()); 69 | data.put(JSONARG_META_VERSION, VersionManager.getCurrentVersion(context)); 70 | 71 | return data; 72 | } 73 | 74 | public static ArrayList toNotes(JSONArray data, int dataVersion, int currentVersion) { 75 | ArrayList list = new ArrayList<>(); 76 | 77 | for (int i = 0; i < data.length(); i++) { 78 | Note n = new Note(); 79 | 80 | try { 81 | JSONObject o = data.getJSONObject(i); 82 | n.setText(o.getString(JSONARG_NOTE_TEXT)); 83 | n.setEnabled(o.getBoolean(JSONARG_NOTE_ENABLED)); 84 | n.setTimestamp(o.getLong(JSONARG_NOTE_TIMESTAMP)); 85 | } catch (JSONException e) { 86 | e.printStackTrace(); 87 | Timber.e(e); 88 | continue; 89 | } 90 | 91 | list.add(n); 92 | } 93 | 94 | return list; 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/activity/AppCompatPreferenceActivity.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.activity; 2 | 3 | import android.content.res.Configuration; 4 | import android.os.Bundle; 5 | import android.preference.PreferenceActivity; 6 | import android.view.MenuInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import androidx.annotation.LayoutRes; 11 | import androidx.annotation.NonNull; 12 | import androidx.annotation.Nullable; 13 | import androidx.appcompat.app.ActionBar; 14 | import androidx.appcompat.app.AppCompatDelegate; 15 | import androidx.appcompat.widget.Toolbar; 16 | 17 | /** 18 | * A {@link PreferenceActivity} which implements and proxies the necessary calls 19 | * to be used with AppCompat. 20 | */ 21 | public abstract class AppCompatPreferenceActivity extends PreferenceActivity { 22 | 23 | private AppCompatDelegate mDelegate; 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | getDelegate().installViewFactory(); 28 | getDelegate().onCreate(savedInstanceState); 29 | super.onCreate(savedInstanceState); 30 | } 31 | 32 | @Override 33 | protected void onPostCreate(Bundle savedInstanceState) { 34 | super.onPostCreate(savedInstanceState); 35 | getDelegate().onPostCreate(savedInstanceState); 36 | } 37 | 38 | public ActionBar getSupportActionBar() { 39 | return getDelegate().getSupportActionBar(); 40 | } 41 | 42 | public void setSupportActionBar(@Nullable Toolbar toolbar) { 43 | getDelegate().setSupportActionBar(toolbar); 44 | } 45 | 46 | @NonNull 47 | @Override 48 | public MenuInflater getMenuInflater() { 49 | return getDelegate().getMenuInflater(); 50 | } 51 | 52 | @Override 53 | public void setContentView(@LayoutRes int layoutResID) { 54 | getDelegate().setContentView(layoutResID); 55 | } 56 | 57 | @Override 58 | public void setContentView(View view) { 59 | getDelegate().setContentView(view); 60 | } 61 | 62 | @Override 63 | public void setContentView(View view, ViewGroup.LayoutParams params) { 64 | getDelegate().setContentView(view, params); 65 | } 66 | 67 | @Override 68 | public void addContentView(View view, ViewGroup.LayoutParams params) { 69 | getDelegate().addContentView(view, params); 70 | } 71 | 72 | @Override 73 | protected void onPostResume() { 74 | super.onPostResume(); 75 | getDelegate().onPostResume(); 76 | } 77 | 78 | @Override 79 | protected void onTitleChanged(CharSequence title, int color) { 80 | super.onTitleChanged(title, color); 81 | getDelegate().setTitle(title); 82 | } 83 | 84 | @Override 85 | public void onConfigurationChanged(Configuration newConfig) { 86 | super.onConfigurationChanged(newConfig); 87 | getDelegate().onConfigurationChanged(newConfig); 88 | } 89 | 90 | @Override 91 | protected void onStop() { 92 | super.onStop(); 93 | getDelegate().onStop(); 94 | } 95 | 96 | @Override 97 | protected void onDestroy() { 98 | super.onDestroy(); 99 | getDelegate().onDestroy(); 100 | } 101 | 102 | public void invalidateOptionsMenu() { 103 | getDelegate().invalidateOptionsMenu(); 104 | } 105 | 106 | private AppCompatDelegate getDelegate() { 107 | if (mDelegate == null) { 108 | mDelegate = AppCompatDelegate.create(this, null); 109 | } 110 | return mDelegate; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/receiver/NotificationDismissedReceiver.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.widget.Toast; 8 | 9 | import java.util.ArrayList; 10 | 11 | import de.nilsfo.lockscreennotes.data.Note; 12 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 13 | import de.nilsfo.lockscreennotes.util.NotesNotificationManager; 14 | import de.nilsfo.lsn.R; 15 | import timber.log.Timber; 16 | 17 | /** 18 | * Created by Nils on 17.09.2016. 19 | */ 20 | 21 | public class NotificationDismissedReceiver extends BroadcastReceiver { 22 | 23 | @Override 24 | public void onReceive(Context context, Intent intent) { 25 | Bundle extras = intent.getExtras(); 26 | if (extras == null) { 27 | Timber.e("I just got a 'NotificationDismissed' intent! But there were no extras! Could not perform any actions!"); 28 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 29 | return; 30 | } 31 | 32 | long notificationId = NotesNotificationManager.INTENT_EXTRA_NOTE_ID_NONE; 33 | if (extras.containsKey(NotesNotificationManager.INTENT_EXTRA_NOTE_ID)) { 34 | notificationId = extras.getLong(NotesNotificationManager.INTENT_EXTRA_NOTE_ID); 35 | 36 | // ####################### 37 | // TODO THIS IS A BIG ONE: THE NOTIFICATION ID ALWAYS RESOLVES TO THE ID OF THE FIRST NOTE WHY? 38 | // ####################### 39 | } else { 40 | Timber.e("FAILED TO GET INTENT EXTRA FOR THE NOTIFICATION ID!!"); 41 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 42 | return; 43 | } 44 | 45 | // TODO REMOVE THIS LINE BELOW, but only if you have resolved the issue stated above 46 | // This is a backup case where all notifications will be disabled regardless 47 | notificationId = NotesNotificationManager.INTENT_EXTRA_NOTE_ID_NONE; 48 | 49 | // Opening the DB to fetch notes 50 | DBAdapter databaseAdapter = new DBAdapter(context); 51 | databaseAdapter.open(); 52 | 53 | ArrayList notes = new ArrayList<>(); 54 | if (notificationId == NotesNotificationManager.INTENT_EXTRA_NOTE_ID_NONE) { 55 | try { 56 | notes = Note.getAllNotesFromDB(databaseAdapter); 57 | } catch (Exception e) { 58 | Timber.e(e); 59 | Timber.e("Failed to get all notes from database!"); 60 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 61 | } 62 | Timber.i("That was no known ID, so just hide them all."); 63 | } else { 64 | try { 65 | notes.add(Note.getNoteFromDB(notificationId, databaseAdapter)); 66 | } catch (Exception e) { 67 | Timber.e(e); 68 | Timber.e("Failed to get Note from Database with ID: " + notificationId); 69 | Toast.makeText(context, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 70 | } 71 | Timber.i("Found the right note with matching ID in the database."); 72 | } 73 | 74 | for (Note n : notes) { 75 | long id = n.getDatabaseID(); 76 | databaseAdapter.updateRow(id, n.getText(), 0, n.getTimestamp()); 77 | } 78 | 79 | databaseAdapter.close(); 80 | 81 | Timber.i("Updating notifications..."); 82 | NotesNotificationManager manager = new NotesNotificationManager(context); 83 | manager.hideAllNotifications(); 84 | manager.showNoteNotifications(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/activity/NoteSharingListenerActivity.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.activity; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.content.SharedPreferences; 6 | import android.os.Bundle; 7 | import android.preference.PreferenceManager; 8 | import android.widget.Toast; 9 | 10 | import java.util.Date; 11 | 12 | import de.nilsfo.lockscreennotes.data.Note; 13 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 14 | import de.nilsfo.lockscreennotes.util.NotesNotificationManager; 15 | import de.nilsfo.lsn.R; 16 | import timber.log.Timber; 17 | 18 | /** 19 | * Created by Nils on 06.09.2016. 20 | */ 21 | 22 | public class NoteSharingListenerActivity extends Activity { 23 | 24 | @Override 25 | protected void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | 28 | Intent receivedIntent = getIntent(); 29 | 30 | //Handling intent 31 | String receivedAction = receivedIntent.getAction(); 32 | String receivedType = receivedIntent.getType(); 33 | Timber.i("I opened via intent. Action: '" + receivedAction + "' Type: '" + receivedType + "'"); 34 | boolean intentError = true; 35 | boolean noteCreatedWithoutError = true; 36 | 37 | if (receivedAction != null && receivedAction.equals(Intent.ACTION_SEND)) { 38 | if (receivedType != null && receivedType.startsWith("text/")) { 39 | String receivedText = receivedIntent.getStringExtra(Intent.EXTRA_TEXT); 40 | if (receivedText != null) { 41 | intentError = false; 42 | receivedIntent.setAction(Intent.ACTION_DEFAULT); 43 | //Toast.makeText(this, "I got a text intent: " + receivedText, Toast.LENGTH_LONG).show(); 44 | noteCreatedWithoutError = addNewNote(receivedText); 45 | } 46 | } 47 | } 48 | 49 | Timber.i("Note share intent received."); 50 | Timber.i("Intent error: " + intentError); 51 | Timber.i("Note creation and DB without error: " + noteCreatedWithoutError); 52 | 53 | if (intentError || !noteCreatedWithoutError) { 54 | Toast.makeText(this, R.string.error_note_sharing_listener, Toast.LENGTH_LONG).show(); 55 | } 56 | 57 | finish(); 58 | } 59 | 60 | private boolean addNewNote(String receivedText) { 61 | DBAdapter databaseAdapter = new DBAdapter(this); 62 | databaseAdapter.open(); 63 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); 64 | 65 | boolean enabled = sharedPreferences.getBoolean("prefs_auto_enable_new_notes", true); 66 | Note note = new Note(receivedText, enabled, new Date().getTime()); 67 | 68 | boolean successfullyCreated = true; 69 | try { 70 | databaseAdapter.insertRow(note.getText(), note.isEnabledSQL(), note.getTimestamp()); 71 | } catch (IllegalStateException e) { 72 | Timber.e(e); 73 | Timber.e("Failed to insert new Note '" + note.getText() + "'!"); 74 | successfullyCreated = false; 75 | } finally { 76 | databaseAdapter.close(); 77 | } 78 | 79 | NotesNotificationManager notesNotificationManager = new NotesNotificationManager(this); 80 | notesNotificationManager.hideAllNotifications(); 81 | notesNotificationManager.showNoteNotifications(); 82 | 83 | if (successfullyCreated) { 84 | Toast.makeText(this, R.string.success_note_sharing_listener, Toast.LENGTH_LONG).show(); 85 | return true; 86 | } else { 87 | Toast.makeText(this, R.string.error_internal_error, Toast.LENGTH_LONG).show(); 88 | return false; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/activity/NotificationDeleteRecieverDialogActivity.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.activity; 2 | 3 | import android.app.Activity; 4 | import android.content.DialogInterface; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.widget.Toast; 8 | 9 | import androidx.appcompat.app.AlertDialog; 10 | 11 | import java.util.ArrayList; 12 | 13 | import de.nilsfo.lockscreennotes.data.Note; 14 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 15 | import de.nilsfo.lockscreennotes.util.NotesNotificationManager; 16 | import de.nilsfo.lsn.R; 17 | import timber.log.Timber; 18 | 19 | @Deprecated 20 | public class NotificationDeleteRecieverDialogActivity extends Activity { 21 | 22 | private ArrayList notes; 23 | 24 | @Override 25 | protected void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | Intent intent = getIntent(); 28 | Bundle extras = intent.getExtras(); 29 | 30 | DBAdapter databaseAdapter = new DBAdapter(this); 31 | databaseAdapter.open(); 32 | 33 | long notificationId = extras.getInt(NotesNotificationManager.INTENT_EXTRA_NOTE_ID); 34 | notes = new ArrayList<>(); 35 | 36 | if (notificationId == NotesNotificationManager.INTENT_EXTRA_NOTE_ID_NONE) { 37 | notes = Note.getAllNotesFromDB(databaseAdapter); 38 | Timber.i("That was no known ID, so just hide them all."); 39 | } else { 40 | Note note = Note.getNoteFromDB(notificationId, databaseAdapter); 41 | if (note != null) { 42 | notes.add(note); 43 | Timber.i("Found the right note with matching ID in the database."); 44 | } else { 45 | Timber.e("Failed to get note from DB with ID: " + notificationId); 46 | } 47 | } 48 | databaseAdapter.close(); 49 | 50 | if (notes.isEmpty()) { 51 | // ERROR: Notes to be deleted are empty! 52 | Timber.e("Cannot delete notes! None found!"); 53 | Toast.makeText(this, R.string.error_internal_error, Toast.LENGTH_LONG) 54 | .show(); 55 | return; 56 | } 57 | 58 | String msgText; 59 | if (notes.size() == 1) { 60 | msgText = String.format(getString(R.string.delete_dialog_content), notes.get(0).getTextPreview()); 61 | } else { 62 | msgText = String.format(getString(R.string.delete_dialog_content_multiple), String.valueOf(notes.size())); 63 | } 64 | 65 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 66 | builder.setTitle(R.string.delete_dialog_title); 67 | builder.setMessage(msgText); 68 | builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() { 69 | public void onClick(DialogInterface dialog, int which) { 70 | dialog.dismiss(); 71 | performDelete(); 72 | } 73 | }); 74 | builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { 75 | public void onClick(DialogInterface dialog, int which) { 76 | dialog.cancel(); 77 | } 78 | }); 79 | builder.setIcon(R.mipmap.ic_launcher); 80 | AlertDialog alertDialog = builder.create(); 81 | //alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); 82 | alertDialog.show(); 83 | } 84 | 85 | private void performDelete() { 86 | DBAdapter databaseAdapter = new DBAdapter(this); 87 | databaseAdapter.open(); 88 | for (Note n : notes) { 89 | long id = n.getDatabaseID(); 90 | databaseAdapter.deleteRow(id); 91 | } 92 | 93 | databaseAdapter.close(); 94 | 95 | Timber.i("Updating notifications..."); 96 | NotesNotificationManager manager = new NotesNotificationManager(this); 97 | manager.hideAllNotifications(); 98 | manager.showNoteNotifications(); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_note_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 19 | 20 | 30 | 31 | 41 | 42 | 51 | 52 | 62 | 63 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/view/QRCodeView.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.view; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.graphics.Bitmap; 6 | import android.view.Gravity; 7 | import android.widget.ImageView; 8 | import android.widget.LinearLayout; 9 | import android.widget.ProgressBar; 10 | import android.widget.Toast; 11 | 12 | import java.util.ArrayList; 13 | 14 | import de.nilsfo.lockscreennotes.activity.EditNoteActivity; 15 | import de.nilsfo.lockscreennotes.concurrent.QRTask; 16 | import de.nilsfo.lsn.R; 17 | import timber.log.Timber; 18 | 19 | /** 20 | * Created by Nils on 15.05.2017. 21 | */ 22 | 23 | public class QRCodeView extends LinearLayout implements QRTask.QRTaskListener { 24 | 25 | protected ArrayList listeners; 26 | private ProgressBar bar; 27 | private Bitmap qrImage; 28 | 29 | public QRCodeView(Context context) { 30 | this(context, "", EditNoteActivity.QR_IMAGE_SIZE); 31 | } 32 | 33 | public QRCodeView(Context context, String textToDisplay, int size) { 34 | super(context); 35 | 36 | listeners = new ArrayList<>(); 37 | Resources resources = getResources(); 38 | bar = new ProgressBar(getContext()); 39 | bar.setIndeterminate(true); 40 | bar.setMax(size * size); 41 | bar.setProgress(0); 42 | bar.setPadding((int) resources.getDimension(R.dimen.activity_horizontal_margin), (int) resources.getDimension(R.dimen.activity_vertical_margin), (int) resources.getDimension(R.dimen.activity_horizontal_margin), (int) resources.getDimension(R.dimen.activity_vertical_margin)); 43 | 44 | LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 45 | lp.gravity = Gravity.CENTER_HORIZONTAL; 46 | bar.setLayoutParams(lp); 47 | addView(bar); 48 | 49 | QRTask task = new QRTask(textToDisplay, size); 50 | task.addListener(this); 51 | task.execute(); 52 | //AsyncTaskCompat.executeParallel(task); 53 | } 54 | 55 | public void displayQRImage(Bitmap map) { 56 | Timber.i("Displaying QR Bitmap!"); 57 | qrImage = map; 58 | removeView(bar); 59 | 60 | Context context = getContext(); 61 | Resources resources = getResources(); 62 | ImageView imageView = new ImageView(context); 63 | imageView.setPadding((int) resources.getDimension(R.dimen.activity_horizontal_margin_small), (int) resources.getDimension(R.dimen.activity_vertical_margin_small), (int) resources.getDimension(R.dimen.activity_horizontal_margin_small), (int) resources.getDimension(R.dimen.activity_vertical_margin_small)); 64 | 65 | LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 66 | lp.gravity = Gravity.CENTER_HORIZONTAL; 67 | imageView.setLayoutParams(lp); 68 | imageView.setImageBitmap(qrImage); 69 | addView(imageView); 70 | 71 | for (QRFinishListener listener : listeners) { 72 | Timber.i("Informing a listener!"); 73 | listener.onFinished(qrImage); 74 | } 75 | } 76 | 77 | public boolean hasFinishedRenderingQRCode() { 78 | return qrImage != null; 79 | } 80 | 81 | public void addListener(QRFinishListener listener) { 82 | listeners.add(listener); 83 | } 84 | 85 | public boolean removeListener(QRFinishListener listener) { 86 | return listeners.remove(listener); 87 | } 88 | 89 | @Override 90 | public void onSuccess(Bitmap image) { 91 | displayQRImage(image); 92 | } 93 | 94 | @Override 95 | public void onFailure(int reason) { 96 | Toast.makeText(getContext(), reason, Toast.LENGTH_LONG).show(); 97 | } 98 | 99 | public Bitmap getQrImage() { 100 | return qrImage; 101 | } 102 | 103 | public interface QRFinishListener { 104 | public void onFinished(Bitmap image); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /app/src/main/res/raw/version_changelog.json: -------------------------------------------------------------------------------- 1 | { 2 | "13": { 3 | "date": "02.01.2023", 4 | "version": "1.0.11", 5 | "text": "-The app now counts how often it has been launched since the last update, and since install\n-Fixed unintended crashes on newer Android versions, introduced in the previous update. Thanks to everyone reporting the errors and submitting crash reports!\n-Fixed typos\n-Updated localization files" 6 | }, 7 | "12": { 8 | "date": "30.12.2022", 9 | "version": "1.0.10", 10 | "text": "-If you lack notification permissions, the app will let you know and provide ways to grant them from the main screen\n-Updated external storage permissions and access\n-Moved permission review options to the 'general' section of settings menu\n-Improved app stability\n-Fixed typos\n-Updated localization files" 11 | }, 12 | "11": { 13 | "date": "03.01.2020", 14 | "version": "1.0.09", 15 | "text": "-Supported Night mode (when supported and enabled by your device)\n-Added a preview to the date formation settings\n-Fixed typos\n-Updated localization files" 16 | }, 17 | "10": { 18 | "date": "12.07.2019", 19 | "version": "1.0.08", 20 | "text": "-New look for the main menu! Replaced the old list structure with a card design\n-Delete notes via the note's menu or long-press it\n-More note context actions: Browse URLs, dial phone numbers and send mails\n-Those actions are also available from within notifications\n-Fixed a bug when reversing notifications\n-Fixed a bug when detecting the lastest backup file\n-Updated icons\n-Updated credits\n-Bugfixes and performance improvements\n-Fixed typos\n-Updated localization files" 21 | }, 22 | "9": { 23 | "date": "21.10.2018", 24 | "version": "1.0.07", 25 | "text": "-[Android 7+] Added support for Android 7 notification channels\n-Tapping on a notification now opens the assigned note\n-If a note contains a single weblink, it can now be opened from the notification\n-Backups can now be scheduled automatically (via the settings menu)\n-Updated some texts in the settings menu\n-Updated targeted Android version\n-Updated dialog icons\n-Updated localization files" 26 | }, 27 | "8": { 28 | "date": "19.08.2018", 29 | "version": "1.0.06", 30 | "text": "-[Android 7+] Added support for Android 7 notification styles. Try it out by using grouped notifications and expand one at a time.\nAdded a 'disable note' button for notifications\n-Added an external update feed, in case you don't want to get update news from Google Play. See the 'About' section in the settings for details.\n-Added a counter that counts the days since the last update\n-System notification settings available from within the app\n-Backups can be made and restored from within the main screen\n-Updated localization files" 31 | }, 32 | "7": { 33 | "date": "06.12.2017", 34 | "version": "1.0.05", 35 | "text": "-Arrangement of notes in the notification and app now match correctly\n-Weblinks and URLs within notes can now be browsed from within this app\n-Updated notification bar icon\n-Fixed a crash when trying to generate QR codes from empty notes" 36 | }, 37 | "6": { 38 | "date": "27.07.2017", 39 | "version": "1.0.04", 40 | "text": "-Notes displayed as QR codes can now be shared with other apps\n-Added this dialog to keep you informed about changes and new features. You can view this changelog again in the 'about' section in the app settings!\n-The order of all displayed notifications can reversed\n-Minor improvements and bug fixes" 41 | }, 42 | "5": { 43 | "date": "17.05.2017", 44 | "version": "1.0.03", 45 | "text": "-Replaced 'fontawesome'-icons with material-design icons\n-Added more icons to the options menu\n-Notes can now be displayed as a QR Code\n-Minor improvements and bug fixes" 46 | } 47 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![GitHub stars](https://img.shields.io/github/stars/NilsFo/LockScreenNotes.svg?style=social&label=Star)](https://github.com/NilsFo/LockScreenNotes) 2 |   3 | [![GitHub forks](https://img.shields.io/github/forks/NilsFo/LockScreenNotes.svg?style=social&label=Fork)](https://github.com/NilsFo/LockScreenNotes) 4 | 5 | *** 6 | 7 | [![Generic badge](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=plastic)](docs/contribute.md) 8 |   9 | [![Contributors](https://img.shields.io/github/contributors/NilsFo/LockScreenNotes?style=flat)](https://github.com/NilsFo/LockScreenNotes/graphs/contributors) 10 |   11 | [![License](https://img.shields.io/github/license/NilsFo/LockScreenNotes?color=green&style=flat)](https://github.com/NilsFo/LockScreenNotes/LICENSE) 12 |   13 | ![Size](https://img.shields.io/github/repo-size/NilsFo/LockScreenNotes?style=flat) 14 |   15 | [![Issues](https://img.shields.io/github/issues/NilsFo/LockScreenNotes?style=flat)](https://github.com/NilsFo/LockScreenNotes/issues) 16 |   17 | [![Pull Requests](https://img.shields.io/github/issues-pr/NilsFo/LockScreenNotes?style=flat)](https://github.com/NilsFo/LockScreenNotes/pulls) 18 |   19 | [![Commits](https://img.shields.io/github/commit-activity/m/NilsFo/LockScreenNotes?style=flat)](https://github.com/NilsFo/LockScreenNotes/) 20 |   21 | [![Latest Release](https://img.shields.io/github/v/release/NilsFo/LockScreenNotes?style=flat)](https://github.com/NilsFo/LockScreenNotes/) 22 |   23 | [![Release Date](https://img.shields.io/github/release-date/NilsFo/LockScreenNotes?style=flat)](https://github.com/NilsFo/LockScreenNotes/releases) 24 | 25 | *** 26 | 27 | [![Follow me on Twitter](https://img.shields.io/twitter/follow/NilsFoer?style=social&logo=twitter)](https://twitter.com/intent/follow?screen_name=NilsFoer) 28 | 29 | # LockScreenNotes 30 | This project was derived from another one created during my B. Sc. Education at the Ruhr Universität Bochum, Germany. 31 | 32 | ## Despite this, this is a fully functioning Android app. 33 | You can download it from two sources. Either the Android Play Store, or via GitHub. 34 | 35 | * https://play.google.com/store/apps/details?id=de.nilsfo.lsn&hl=en_US 36 | * https://github.com/NilsFo/LockScreenNotes/releases 37 | 38 | :warning: Any other source is not officially supported by me! :warning: 39 | 40 | **Note**: Yes, this app is free and open source, and yes, you may edit and use all its contents. 41 | But please notify me if you do so and report any imposters. 42 | 43 | *** 44 | 45 | ### Google Play Store entry: 46 | With this app you can easily create notes that stick around for later! 47 | 48 | Designed for you to be able to create and manage notes quickly without many interruptions. 49 | Notes are supposed to be small and not kept for very long as they are supposed to be used for reflections and *'keep for later'* ideas, like grocery lists or anything that you need to be reminded of instantly. 50 | 51 | Optimized to be quick and efficient so that you can write down your ideas and notes in less that 2 seconds and only one tap of a button! 52 | 53 | Once created, a note will stick around and be instantly displayed on your lock screen as a notification. 54 | 55 | Notes and the ways they are displayed are highly customization. You can decide if they are grouped together and displayed as a single notification or separate. 56 | You can also set if they are always displayed prominently or more subtle. (depends on the type of device). 57 | 58 | This App is free and without any ads or tracking! This will not change in the future! 59 | There is also the *zero knowledge* method applied. 60 | This means, I have no way of tracking you or spying on your notes. 61 | 62 | ### Permission requests explained: 63 | 64 | * Run on startup: To display the notifications once you restart the device 65 | * External storage: To read / write backups 66 | 67 | ## Screenshots: 68 | 69 | ![Example screenshot #1](/example/sc1.png?raw=true "Example screenshot #1") 70 | 71 | ![Example screenshot #2](/example/sc2.png?raw=true "Example screenshot #2") 72 | 73 | ![Example screenshot #3](/example/sc3.png?raw=true "Example screenshot #3") 74 | 75 | ![Example screenshot #4](/example/sc4.png?raw=true "Example screenshot #4") 76 | 77 | *** 78 | 79 | Thanks for Reading! I hope you have a beautiful day. :heart: -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/TimeUtils.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.preference.PreferenceManager; 6 | import android.text.format.DateUtils; 7 | 8 | import java.text.DateFormat; 9 | import java.util.Date; 10 | import java.util.Locale; 11 | 12 | import de.nilsfo.lsn.R; 13 | import timber.log.Timber; 14 | 15 | public class TimeUtils { 16 | 17 | private static final int DEFAULT_LEVEL_OF_DETAIL = DateFormat.MEDIUM; 18 | private SharedPreferences preferences; 19 | private Context context; 20 | 21 | public TimeUtils(Context context) { 22 | this.context = context; 23 | preferences = PreferenceManager.getDefaultSharedPreferences(context); 24 | } 25 | 26 | public String formatDateAccordingToPreferences(Date date) { 27 | return formatDateAccordingToPreferences(date.getTime()); 28 | } 29 | 30 | public String formatDateAccordingToPreferences(long time) { 31 | if (isRelativeTimePrefered()) { 32 | return formatRelative(time); 33 | } else { 34 | return formatAbsolute(time); 35 | } 36 | } 37 | 38 | public String formatRelative(Date date) { 39 | return formatRelative(date.getTime()); 40 | } 41 | 42 | public String formatRelative(long timestamp) { 43 | return DateUtils.getRelativeTimeSpanString(timestamp, new Date().getTime(), 0L, DateUtils.FORMAT_ABBREV_ALL).toString(); 44 | } 45 | 46 | public String formatAbsolute(long time) { 47 | return context.getString(R.string.concat_dash, formatDateAbsolute(time), formatTimeAbsolute(time)); 48 | } 49 | 50 | public String formatAbsolute(Date time, int levelOfDetailTime, int levelOfDetailDate) { 51 | return context.getString(R.string.concat_dash, formatDateAbsolute(time, levelOfDetailTime), formatTimeAbsolute(time, levelOfDetailDate)); 52 | } 53 | 54 | public String formatAbsolute(Date date) { 55 | return formatAbsolute(date.getTime()); 56 | } 57 | 58 | public String formatDateAbsolute(long time) { 59 | return formatDateAbsolute(new Date(time)); 60 | } 61 | 62 | public String formatTimeAbsolute(long time) { 63 | return formatTimeAbsolute(new Date(time)); 64 | } 65 | 66 | public String formatTimeAbsolute(Date date, int levelOfDetail) { 67 | return DateFormat.getTimeInstance(levelOfDetail, getLocale()).format(date); 68 | } 69 | 70 | public String formatTimeAbsolute(Date date) { 71 | String lod = preferences.getString("prefs_time_detail", context.getString(R.string.error_unknown)); 72 | return formatTimeAbsolute(date, getLoDviaPreference(lod)); 73 | } 74 | 75 | public String formatDateAbsolute(Date date, int levelOfDetail) { 76 | return DateFormat.getDateInstance(levelOfDetail, getLocale()).format(date); 77 | } 78 | 79 | public String formatDateAbsolute(long date, int levelOfDetailTime, int levelOfDetailDate) { 80 | return formatDateAbsolute(new Date(date), levelOfDetailTime, levelOfDetailDate); 81 | } 82 | 83 | public String formatDateAbsolute(Date date, int levelOfDetailTime, int levelOfDetailDate) { 84 | return formatTimeAbsolute(date, levelOfDetailTime) + " " + formatDateAbsolute(date, levelOfDetailDate); 85 | } 86 | 87 | public String formatDateAbsolute(Date date) { 88 | String lod = preferences.getString("prefs_date_detail", context.getString(R.string.error_unknown)); 89 | return formatDateAbsolute(date, getLoDviaPreference(lod)); 90 | } 91 | 92 | public int getLoDviaPreference(String lod) { 93 | int i = -1; 94 | try { 95 | i = Integer.parseInt(lod); 96 | } catch (NumberFormatException e) { 97 | Timber.i("Warning: Could not interpret this as a number: " + lod); 98 | } 99 | 100 | switch (i) { 101 | case 0: 102 | return DateFormat.FULL; 103 | case 1: 104 | return DateFormat.LONG; 105 | case 2: 106 | return DateFormat.MEDIUM; 107 | case 3: 108 | return DateFormat.SHORT; 109 | } 110 | 111 | Timber.i("Warning: Level of Detail not found, reverting to default. Input: " + lod); 112 | return DEFAULT_LEVEL_OF_DETAIL; 113 | } 114 | 115 | public boolean isRelativeTimePrefered() { 116 | return preferences.getBoolean("prefs_time_relative", true); 117 | } 118 | 119 | private Locale getLocale() { 120 | return context.getResources().getConfiguration().locale; 121 | } 122 | 123 | } 124 | -------------------------------------------------------------------------------- /app/src/main/res/raw-de/version_changelog.json: -------------------------------------------------------------------------------- 1 | { 2 | "13": { 3 | "date": "02.01.2023", 4 | "version": "1.0.11", 5 | "text": "-Die App zählt nun mit wie oft sie gestartet wurde seit dem letzten Update und der Installation\n-Ungewollte Abstürze, welche seit dem letzten Update auf neueren Android Versionen auftraten, wurden repariert. Danke an alle, die Absturzberichte eingereicht haben!\n-Rechtschreibfehler behoben\n-Sprachdateien aktualisiert" 6 | }, 7 | "12": { 8 | "date": "30.12.2022", 9 | "version": "1.0.10", 10 | "text": "-Wenn Sie keine Berechtigungen für Benachrichtigungen erteilt haben, wird die App Sie darüber informieren und Möglichkeiten anbieten, sie von dem Hauptbildschirm aus zu erteilen\n-Aktualisierte Berechtigungen und Zugriff auf externen Speicher\n-Berechtigungsüberprüfungsoptionen in den 'Allgemeinen'-Abschnitt des Einstellungsmenüs verschoben\n-Stabilität der App verbessert\n-Rechtschreibfehler behoben\n-Sprachdateien aktualisiert" 11 | }, 12 | "11": { 13 | "date": "03.01.2020", 14 | "version": "1.0.09", 15 | "text": "-Nachtmodus unterstützt (Sofern vom Gerät unterstützt und eingeschaltet)\n-Die Einstellungen für die Zeit- und Datumsformatierung haben jetzt eine Vorschau\n-Sprachdateien aktualisiert und Rechtschreibfehler behoben" 16 | }, 17 | "10": { 18 | "date": "12.07.2019", 19 | "version": "1.0.08", 20 | "text": "-Neuer Look für das Hauptmenü! Die alte Listen-Struktur wurde durch ein Karten Design ersetzt\n-Löschen einer Notiz nun möglich über die einzelnen Menüs einer Notiz. Oder diese lange gedrückt halten.\n-Mehr Aktionen basierend auf dem Inhalt von Notizen: Links öffnen, Telefonnummern wählen und E-Mails verschicken\n-Diese Aktionen sind auch über die Benachrichtigungen verfügbar\n-Ein Fehler wurde behoben, wenn Notizen in umgekehrter Reihenfolge angezeigt werden\n-Ein Fehler wurde behoben wenn das zuletzt erstellte Backup importiert werden sollte\n-Icons aktualisiert\n-Danksagungen aktualisiert\n-Kleinere Fehlerbehebungen und verbesserte Leistung\n-Sprachdateien aktualisiert" 21 | }, 22 | "9": { 23 | "date": "21.10.2018", 24 | "version": "1.0.07", 25 | "text": "-[Android 7+] Android 7 Benachrichtigungs-Kanäle werden nun unterstützt\n-Tippen auf Benachrichtigungen einzelner Notizen öffnet die App um diese zu bearbeiten\n-Wenn eine Notiz einen einzelnen Link enthält, kann dieser direkt aus der Benachrichtigung geöffnet werden\n-Backups können nun (via Einstellungen) in regelmäßigen Zeitabständen automatisiert durchgeführt werden\n-Texte in den Einstellungen überarbeitet\n-Angepeilte Android version aktualisiert\n-Dialog Icons aktualisiert\n-Sprachdateien aktualisiert" 26 | }, 27 | "8": { 28 | "date": "19.08.2018", 29 | "version": "1.0.06", 30 | "text": "-[Android 7+] Android 7 Benachrichtigungs-Stil wird nun unterstützt.\n-Notizen können nun über die Benachrichtigungen deaktiviert werden\n-Externen Aktualisierungs-Feed hinzugefügt, für den Fall, dass Sie Ihre Aktualisierungen nicht über Google Play beziehen möchten. Details in dem 'Über' Bereich in den Einstellungen.\n-Ein Zähler zeigt an wie lange das letzte Update her ist\n-System Einstellungen für Benachrichtigungen nun über die App verfügbar\n-Backups können nun über das Hauptmenü erstellt und importiert werden\n-Sprachdateien aktualisiert" 31 | }, 32 | "7": { 33 | "date": "06.12.2017", 34 | "version": "1.0.05", 35 | "text": "-Reihenfolge der Notizen stimmt mit der der App überein\n-Weblinks und URLs in einer Notiz können nun von der App aus geöffnet werden\n-Verbesserungen an den Icons\n-App stürzt nicht mehr ab wenn QR-Codes von leeren Notizen erstellt werden" 36 | }, 37 | "6": { 38 | "date": "27.07.2017", 39 | "version": "1.0.04", 40 | "text": "-Als QR-Code dargestellte Notizen können nun mit anderen Apps geteilt werden\n-Diesen Dialog hinzugefügt um über Updates & Verbesserungen zu informieren. Dieser Changelog kann in der 'Über'-Sektion der Einstellungen erneut angesehen werden\n-Die Reihenfolge in der Erinnerungen angezeigt werden kann nun umgekehrt werden\nIn den Einstellungen: Die Kategorie 'Benachrichtigungen' heißt nun 'Erinnerungen'\n-Kleinere Verbesserungen und Fehlerbehebungen" 41 | }, 42 | "5": { 43 | "date": "17.05.2017", 44 | "version": "1.0.03", 45 | "text": "-'fontawesome'-Icons ersetzt mit Material-Design-Icons\n-Mehr Icons im Options-Menü\n-Notizen können nun als QR Code angezeigt werden\n-Kleinere Verbesserungen und Fehlerbehebungen" 46 | } 47 | } -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/util/RegexManager.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.util; 2 | 3 | import java.util.ArrayList; 4 | import java.util.regex.Matcher; 5 | import java.util.regex.Pattern; 6 | 7 | import timber.log.Timber; 8 | 9 | public class RegexManager { 10 | 11 | //public static final String URL_REGEX = "(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\.)(?:\\([-A-Z0-9+&@#\\/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#\\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\\/%=~_|$])"; 12 | //private static final String URL_REGEX = "((?:https\\:\\/\\/)|(?:http\\:\\/\\/)|(?:www\\.))?([a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(?:\\??)[a-zA-Z0-9\\-\\._\\?\\,\\'\\/\\\\\\+&%\\$#\\=~]+)"; 13 | public static final String URL_PATTERN = "(https?:\\/\\/)?([\\da-z\\.-]+\\.[a-z\\.]{2,6}|[\\d\\.]+)([\\/:?=&#]{1}[\\da-z\\.-]+)*[\\/\\?]?"; 14 | public static final String PHONE_NUMBER_PATTERN = "[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*"; 15 | public static final String MAIL_PATTERN = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"; 16 | 17 | public static final int ENTRY_DEFAULT_MIN_SIZE = 0; 18 | 19 | private String pattern; 20 | private int minimumLength; 21 | private boolean nonFullNumeric; 22 | 23 | public RegexManager(String pattern) { 24 | this(pattern, ENTRY_DEFAULT_MIN_SIZE, false); 25 | } 26 | 27 | public RegexManager(String pattern, int minimumLength, boolean nonFullNumeric) { 28 | this.pattern = pattern; 29 | this.minimumLength = minimumLength; 30 | this.nonFullNumeric = nonFullNumeric; 31 | } 32 | 33 | public ArrayList findMatchesInText(String text) { 34 | Matcher m = applyRegexToText(text); 35 | if (m == null) { 36 | return new ArrayList<>(); 37 | } 38 | 39 | ArrayList list = new ArrayList<>(); 40 | while (m.find()) { 41 | String match = m.group(); 42 | Timber.v("Found a match: " + m.group()); 43 | 44 | boolean add = true; 45 | for (String s : list) { 46 | if (s.equals(match)) { 47 | add = false; 48 | break; 49 | } 50 | } 51 | 52 | if (add) { 53 | if (match.length() < getMinimumLength()) { 54 | continue; 55 | } 56 | if (isNonFullNumeric() && isNumeric(match)) { 57 | continue; 58 | } 59 | 60 | list.add(match); 61 | } 62 | } 63 | 64 | return list; 65 | } 66 | 67 | private boolean isNumeric(String text) { 68 | Timber.i("Checking if '" + text + "' is a number."); 69 | try { 70 | Double.parseDouble(text); 71 | return true; 72 | } catch (Exception e1) { 73 | try { 74 | Integer.parseInt(text); 75 | return true; 76 | } catch (Exception e2) { 77 | return false; 78 | } 79 | } 80 | } 81 | 82 | public boolean containsSingleMatch(String input) { 83 | ArrayList list = findMatchesInText(input); 84 | return list != null && list.size() == 1; 85 | } 86 | 87 | public boolean isSingleMatch(String input) { 88 | if (!containsSingleMatch(input)) return false; 89 | 90 | ArrayList list = findMatchesInText(input); 91 | return list.get(0).equals(input); 92 | } 93 | 94 | public boolean isMatch(String text) { 95 | return !findMatchesInText(text).isEmpty(); 96 | } 97 | 98 | public Matcher applyRegexToText(String input) { 99 | Timber.v("Applying Regex: " + pattern); 100 | Timber.v("Text to apply it to: " + input); 101 | 102 | if (input == null || input.trim().equals("")) return null; 103 | 104 | Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); 105 | return p.matcher(input); 106 | } 107 | 108 | public String getPattern() { 109 | return pattern; 110 | } 111 | 112 | public int getMinimumLength() { 113 | return minimumLength; 114 | } 115 | 116 | public void setMinimumLength(int minimumLength) { 117 | this.minimumLength = minimumLength; 118 | } 119 | 120 | public boolean isNonFullNumeric() { 121 | return nonFullNumeric; 122 | } 123 | 124 | public void setNonFullNumeric(boolean nonFullNumeric) { 125 | this.nonFullNumeric = nonFullNumeric; 126 | } 127 | 128 | } 129 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/Note.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data; 2 | 3 | import android.database.Cursor; 4 | import android.text.format.DateUtils; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Date; 11 | 12 | import de.nilsfo.lockscreennotes.sql.DBAdapter; 13 | import de.nilsfo.lockscreennotes.util.NotesNotificationManager; 14 | import timber.log.Timber; 15 | 16 | /** 17 | * Created by Nils on 13.08.2016. 18 | */ 19 | 20 | public class Note implements Comparable { 21 | 22 | public static final int DEFAULT_PREVIEW_CHARS = 250; 23 | public static final long DEFAULT_TIMESTAMP = 0; 24 | 25 | private String text; 26 | private boolean enabled; 27 | private long timestamp; 28 | private long databaseID; 29 | 30 | public Note() { 31 | this("", false, DEFAULT_TIMESTAMP); 32 | } 33 | 34 | public Note(String text, boolean enabled, long timestamp) { 35 | this.text = text; 36 | this.enabled = enabled; 37 | this.timestamp = timestamp; 38 | } 39 | 40 | @Nullable 41 | public static Note getNoteFromDB(long id, DBAdapter adapter) { 42 | Cursor cursor = null; 43 | try { 44 | cursor = adapter.getRow(id); 45 | } catch (IllegalStateException e) { 46 | Timber.e(e); 47 | } 48 | if (cursor == null) { 49 | return null; 50 | } 51 | 52 | Note note = new Note(); 53 | 54 | String text = cursor.getString(DBAdapter.COL_NOTE_TEXT); 55 | boolean enabled = cursor.getInt(DBAdapter.COL_NOTE_ENABLED) != 0; 56 | long time = cursor.getLong(DBAdapter.COL_TIMESTAMP); 57 | 58 | note.setText(text); 59 | note.setEnabled(enabled); 60 | note.setTimestamp(time); 61 | note.setDatabaseID(id); 62 | 63 | return note; 64 | } 65 | 66 | public static ArrayList getAllNotesFromDB(DBAdapter adapter) { 67 | Cursor cursor = adapter.getAllIDs(); 68 | ArrayList list = new ArrayList<>(); 69 | 70 | if (cursor.moveToFirst()) { 71 | do { 72 | long id = cursor.getLong(DBAdapter.COL_ROWID); 73 | Note note = Note.getNoteFromDB(id, adapter); 74 | 75 | if (note == null) { 76 | Timber.e("Cannot find a note with ID: " + id); 77 | } else { 78 | Timber.i("Adding note with ID: " + id); 79 | list.add(note); 80 | } 81 | } while (cursor.moveToNext()); 82 | } 83 | 84 | return list; 85 | } 86 | 87 | public String getTextPreview(int characters) { 88 | String text = getText(); 89 | text = text.replace("\n", " "); 90 | while (text.contains(" ")) text = text.replace(" ", " "); 91 | text = text.trim(); 92 | 93 | if (characters > 0) { 94 | if (text.length() > characters) { 95 | text = text.trim().substring(0, characters); 96 | text = text.trim() + "..."; 97 | } 98 | } 99 | 100 | return text; 101 | } 102 | 103 | @Override 104 | public String toString() { 105 | return "Note. ID: " + getDatabaseID() + ", Content: '" + getTextPreview(15) + "', timestamp: " + DateUtils.getRelativeTimeSpanString(getTimestamp(), new Date().getTime(), 0L, DateUtils.FORMAT_ABBREV_ALL); 106 | } 107 | 108 | public int isEnabledSQL() { 109 | if (isEnabled()) return 1; 110 | return 0; 111 | } 112 | 113 | @Override 114 | public int compareTo(@NonNull Note note) { 115 | return (note.getTimestampAsDate().compareTo(getTimestampAsDate())); 116 | } 117 | 118 | public String getTextPreview() { 119 | return getTextPreview(DEFAULT_PREVIEW_CHARS); 120 | } 121 | 122 | public long getDatabaseID() { 123 | return databaseID; 124 | } 125 | 126 | public void setDatabaseID(long databaseID) { 127 | this.databaseID = databaseID; 128 | } 129 | 130 | public int getNotificationID() { 131 | return (int) (getDatabaseID() % Integer.MAX_VALUE) + NotesNotificationManager.NOTES_NOTIFICATION_ID_OFFSET; 132 | } 133 | 134 | public Date getTimestampAsDate() { 135 | return new Date(getTimestamp()); 136 | } 137 | 138 | public long getTimestamp() { 139 | return timestamp; 140 | } 141 | 142 | public void setTimestamp(long timestamp) { 143 | this.timestamp = timestamp; 144 | } 145 | 146 | public String getText() { 147 | return text; 148 | } 149 | 150 | public void setText(String text) { 151 | this.text = text; 152 | } 153 | 154 | public boolean isEnabled() { 155 | return enabled; 156 | } 157 | 158 | public void setEnabled(boolean enabled) { 159 | this.enabled = enabled; 160 | } 161 | 162 | public void setTimestamp(Date timestamp) { 163 | setTimestamp(timestamp.getTime()); 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/data/content/browse/NoteContentBrowseDialog.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.data.content.browse; 2 | 3 | import android.content.Context; 4 | import android.content.DialogInterface; 5 | import android.util.SparseBooleanArray; 6 | import android.widget.Toast; 7 | 8 | import androidx.appcompat.app.AlertDialog; 9 | 10 | import java.util.ArrayList; 11 | 12 | import de.nilsfo.lockscreennotes.data.Note; 13 | import timber.log.Timber; 14 | 15 | public abstract class NoteContentBrowseDialog { 16 | 17 | protected Context context; 18 | 19 | public NoteContentBrowseDialog(Context context) { 20 | this.context = context; 21 | } 22 | 23 | public void displayDialog(Note note) { 24 | displayDialog(note.getText()); 25 | } 26 | 27 | public void displayDialog(String text) { 28 | ArrayList list = getMatchesInText(text); 29 | 30 | if (list == null) { 31 | return; 32 | } 33 | 34 | if (list.isEmpty()) { 35 | Toast.makeText(context, getErrorNothingFoundText(), Toast.LENGTH_LONG).show(); 36 | return; 37 | } 38 | 39 | displayDialog(list); 40 | } 41 | 42 | public void displayDialog(final ArrayList list) { 43 | if (list.size() == 1) { 44 | browseElement(list.get(0)); 45 | return; 46 | } 47 | 48 | boolean[] sel = new boolean[list.size()]; 49 | String[] data = new String[list.size()]; 50 | for (int i = 0; i < list.size(); i++) { 51 | data[i] = list.get(i); 52 | sel[i] = false; 53 | } 54 | 55 | AlertDialog.Builder b = new AlertDialog.Builder(context); 56 | b.setTitle(getDialogTitle()); 57 | b.setIcon(getDialogIcon()); 58 | 59 | if (isSingleSelection()) { 60 | b.setSingleChoiceItems(data, 0, new DialogInterface.OnClickListener() { 61 | @Override 62 | public void onClick(DialogInterface dialog, int which) { 63 | SparseBooleanArray sel = ((AlertDialog) dialog).getListView().getCheckedItemPositions(); 64 | Timber.v("Elements selected: " + sel); 65 | } 66 | }); 67 | } else { 68 | b.setMultiChoiceItems(data, sel, new DialogInterface.OnMultiChoiceClickListener() { 69 | @Override 70 | public void onClick(DialogInterface dialog, int which, boolean isChecked) { 71 | SparseBooleanArray sel = ((AlertDialog) dialog).getListView().getCheckedItemPositions(); 72 | Timber.v("Elements selected: " + sel); 73 | } 74 | }); 75 | } 76 | 77 | b.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { 78 | @Override 79 | public void onClick(DialogInterface dialog, int which) { 80 | dialog.cancel(); 81 | } 82 | }); 83 | 84 | b.setPositiveButton(getDialogPositiveButtonName(), new DialogInterface.OnClickListener() { 85 | @Override 86 | public void onClick(DialogInterface dialog, int which) { 87 | dialog.dismiss(); 88 | SparseBooleanArray sel = ((AlertDialog) dialog).getListView().getCheckedItemPositions(); 89 | Timber.i("Multiple elements to browse selected: " + sel); 90 | 91 | int size = list.size(); 92 | if (size == 0) { 93 | Toast.makeText(context, getErrorNothingSelectedText(), Toast.LENGTH_LONG).show(); 94 | return; 95 | } 96 | 97 | for (int i = 0; i < size; i++) { 98 | if (sel.get(i)) { 99 | String element = list.get(i); 100 | browseElement(element); 101 | 102 | if (isSingleSelection()) { 103 | Timber.i("Browsing just a single element. Job done."); 104 | return; 105 | } 106 | 107 | Timber.i("Browsing Element '" + element + "'. " + (i + 1) + "/" + size); 108 | } 109 | } 110 | } 111 | }); 112 | 113 | if (!isSingleSelection()) { 114 | b.setNeutralButton(getDialogBrowseAllButtonName(), new DialogInterface.OnClickListener() { 115 | @Override 116 | public void onClick(DialogInterface dialog, int which) { 117 | for (String s : list) { 118 | browseElement(s); 119 | } 120 | } 121 | }); 122 | } 123 | 124 | b.show(); 125 | } 126 | 127 | protected abstract void browseElement(String element); 128 | 129 | protected abstract ArrayList getMatchesInText(String text); 130 | 131 | protected abstract int getErrorNothingSelectedText(); 132 | 133 | protected abstract int getDialogPositiveButtonName(); 134 | 135 | protected abstract int getDialogBrowseAllButtonName(); 136 | 137 | protected abstract int getErrorNothingFoundText(); 138 | 139 | protected abstract int getDialogTitle(); 140 | 141 | protected abstract int getDialogIcon(); 142 | 143 | protected abstract boolean isSingleSelection(); 144 | } 145 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_tutorial.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 29 | 30 | 36 | 37 | 41 | 42 | 48 | 49 | 55 | 56 | 57 | 60 | 61 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 88 | 89 | 99 | 100 | -------------------------------------------------------------------------------- /app/src/main/java/de/nilsfo/lockscreennotes/receiver/alarms/LSNAlarmManager.java: -------------------------------------------------------------------------------- 1 | package de.nilsfo.lockscreennotes.receiver.alarms; 2 | 3 | import static de.nilsfo.lockscreennotes.LockScreenNotes.REQUEST_CODE_INTENT_AUTO_BACKUP_ALARM; 4 | 5 | import android.app.AlarmManager; 6 | import android.app.PendingIntent; 7 | import android.content.Context; 8 | import android.content.Intent; 9 | import android.content.SharedPreferences; 10 | import android.preference.PreferenceManager; 11 | import android.widget.Toast; 12 | 13 | import java.util.Calendar; 14 | 15 | import de.nilsfo.lockscreennotes.receiver.LSNAutoBackupReceiver; 16 | import de.nilsfo.lockscreennotes.util.TimeUtils; 17 | import de.nilsfo.lsn.R; 18 | import timber.log.Timber; 19 | 20 | public class LSNAlarmManager { 21 | 22 | public static final int AUTO_BACKUP_SCHEDULE_HOUR = 3; 23 | private Context context; 24 | private AlarmManager alarmManager; 25 | 26 | public LSNAlarmManager(Context context) { 27 | this.context = context; 28 | alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); 29 | } 30 | 31 | public boolean requestCancelAndReScheduleNextAutoBackup() { 32 | boolean nextBackupCanceled = cancelNextAutoBackup(); 33 | if (nextBackupCanceled) { 34 | Timber.i("Next backup schedule canceled successfully."); 35 | boolean nextBackupScheduled = scheduleNextAutoBackup(); 36 | 37 | if (nextBackupScheduled) { 38 | Timber.i("Next backup schedule created successfully."); 39 | return true; 40 | } else { 41 | Timber.e("Failed to set up next alarm!"); 42 | Toast.makeText(context, R.string.error_failed_to_setup_backup_alarm, Toast.LENGTH_LONG).show(); 43 | } 44 | } else { 45 | Timber.e("Failed to cancel next alarm!"); 46 | Toast.makeText(context, R.string.error_failed_to_cancel_backup_alarm, Toast.LENGTH_LONG).show(); 47 | } 48 | return false; 49 | } 50 | 51 | public boolean cancelNextAutoBackup() { 52 | // TODO red val 53 | PendingIntent pendingIntent = getAutoBackupIntent(); 54 | if (pendingIntent != null) { 55 | alarmManager.cancel(pendingIntent); 56 | Timber.i("Canceled Alarm: AutoBackup"); 57 | return true; 58 | } 59 | return false; 60 | } 61 | 62 | public boolean scheduleNextAutoBackup() { 63 | boolean nextBackupCanceled = cancelNextAutoBackup(); 64 | if (!nextBackupCanceled) { 65 | Timber.e("Failed to cancel next alarm!"); 66 | Toast.makeText(context, R.string.error_failed_to_cancel_backup_alarm, Toast.LENGTH_LONG).show(); 67 | return false; 68 | } 69 | 70 | PendingIntent intent = getAutoBackupIntent(); 71 | if (intent == null) { 72 | return false; 73 | } 74 | 75 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); 76 | int days = Integer.parseInt(preferences.getString("pref_auto_backups_schedule_days", "3")); 77 | days = Math.max(days, 1); 78 | 79 | long triggerTimeDist = getTimeUntilNextNewAutoBackup(); 80 | long triggerTime = System.currentTimeMillis() + triggerTimeDist; 81 | long interval = AlarmManager.INTERVAL_DAY * days; 82 | String formattedDebugTimestamp = new TimeUtils(context).formatAbsolute(triggerTime); 83 | 84 | Timber.i("Scheduling next alarm at " + triggerTime + ". That's: " + formattedDebugTimestamp); 85 | Timber.i("Repeating every " + interval + "ms. That should be every " + days + " day(s)."); 86 | 87 | alarmManager.setInexactRepeating(AlarmManager.RTC, triggerTime, interval, intent); 88 | return true; 89 | } 90 | 91 | private PendingIntent getAutoBackupIntent() { 92 | Intent myIntent = new Intent(context, LSNAutoBackupReceiver.class); 93 | myIntent.setAction(LSNAutoBackupReceiver.class.getCanonicalName()); 94 | PendingIntent broadcast = null; 95 | 96 | try { 97 | if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { 98 | broadcast = PendingIntent.getBroadcast(context, REQUEST_CODE_INTENT_AUTO_BACKUP_ALARM, myIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); 99 | } else { 100 | broadcast = PendingIntent.getBroadcast(context, REQUEST_CODE_INTENT_AUTO_BACKUP_ALARM, myIntent, PendingIntent.FLAG_CANCEL_CURRENT); 101 | } 102 | } catch (IllegalArgumentException | IllegalStateException e) { 103 | Timber.e(e); 104 | Timber.e("Failed to create broadcast Intent: " + e); 105 | } 106 | return broadcast; 107 | } 108 | 109 | public long getTimeUntilNextNewAutoBackup() { 110 | Calendar c = Calendar.getInstance(); 111 | c.add(Calendar.DAY_OF_MONTH, 1); 112 | c.set(Calendar.HOUR_OF_DAY, AUTO_BACKUP_SCHEDULE_HOUR); 113 | c.set(Calendar.MINUTE, 0); 114 | c.set(Calendar.SECOND, 0); 115 | c.set(Calendar.MILLISECOND, 0); 116 | return (c.getTimeInMillis() - System.currentTimeMillis()); 117 | } 118 | } 119 | --------------------------------------------------------------------------------