From 310c65d9322ed9065db472aae0aa3352caa8d4a8 Mon Sep 17 00:00:00 2001 From: Rikard Teodorsson <9367038+hej2010@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:27:22 +0100 Subject: [PATCH 01/29] Started on app version 2 --- .idea/compiler.xml | 2 +- .idea/gradle.xml | 1 + .idea/runConfigurations.xml | 17 + app/build.gradle | 72 -- app/build.gradle.kts | 84 ++ app/proguard-rules.pro | 3 - .../ExampleInstrumentedTest.java | 0 app/src/main/AndroidManifest.xml | 44 +- app/src/main/ic_launcher_v-playstore.png | Bin 61530 -> 0 bytes .../arctosoft/vault/BottomSheetFragment.java | 193 ++++ .../se/arctosoft/vault/DirectoryFragment.java | 908 +++++++++++++++++ .../se/arctosoft/vault/GalleryActivity.java | 545 ---------- .../vault/GalleryDirectoryActivity.java | 931 ------------------ .../se/arctosoft/vault/LaunchActivity.java | 127 --- .../java/se/arctosoft/vault/MainActivity.java | 78 ++ .../se/arctosoft/vault/PasswordFragment.java | 81 ++ .../se/arctosoft/vault/SettingsFragment.java | 72 ++ .../vault/adapters/GalleryGridAdapter.java | 102 +- .../vault/adapters/GalleryPagerAdapter.java | 77 +- .../vault/adapters/ImportListAdapter.java | 21 +- .../viewholders/GalleryGridViewHolder.java | 2 +- .../viewholders/GalleryPagerViewHolder.java | 2 +- .../viewholders/ImportListViewHolder.java | 2 +- .../se/arctosoft/vault/data/CursorFile.java | 2 +- .../se/arctosoft/vault/data/FileType.java | 93 +- .../se/arctosoft/vault/data/GalleryFile.java | 77 +- .../vault/{encryption => data}/Password.java | 55 +- .../se/arctosoft/vault/data/ProgressData.java | 51 + .../arctosoft/vault/data/StoredDirectory.java | 2 +- .../vault/data/UniqueLinkedList.java | 2 +- .../vault/encryption/Encryption.java | 411 +++++--- .../vault/encryption/MyCipherInputStream.java | 163 +-- .../vault/encryption/MyDataSource.java | 16 +- .../vault/encryption/MyDataSourceFactory.java | 13 +- .../exception/InvalidPasswordException.java | 2 +- .../views/FastScrollRecyclerView.java | 4 +- .../interfaces/IOnAdapterItemChanged.java | 22 + .../vault/interfaces/IOnDirectoryAdded.java | 12 +- .../arctosoft/vault/interfaces/IOnDone.java | 22 + .../arctosoft/vault/interfaces/IOnEdited.java | 2 +- .../vault/interfaces/IOnFileClicked.java | 2 +- .../vault/interfaces/IOnFileDeleted.java | 2 +- .../IOnImportDone.java} | 18 +- .../vault/interfaces/IOnProgress.java | 2 +- .../interfaces/IOnSelectionModeChanged.java | 2 +- .../vault/loader/CipherDataFetcher.java | 19 +- .../vault/loader/CipherModelLoader.java | 14 +- .../loader/CipherModelLoaderFactory.java | 10 +- .../vault/loader/MyAppGlideModule.java | 6 +- .../vault/utils/BetterActivityResult.java | 45 - .../vault/utils/CacheDataSourceFactory.java | 2 +- .../se/arctosoft/vault/utils/Constants.java | 2 +- .../se/arctosoft/vault/utils/Dialogs.java | 4 +- .../se/arctosoft/vault/utils/FileStuff.java | 85 +- .../se/arctosoft/vault/utils/GlideStuff.java | 6 +- .../se/arctosoft/vault/utils/Settings.java | 57 +- .../se/arctosoft/vault/utils/StringStuff.java | 4 +- .../se/arctosoft/vault/utils/Toaster.java | 4 +- .../viewmodel/GalleryDirectoryViewModel.java | 77 -- .../vault/viewmodel/GalleryViewModel.java | 154 ++- .../vault/viewmodel/ImportViewModel.java | 218 ++++ .../vault/viewmodel/PasswordViewModel.java | 40 + .../arctosoft/vault/views/GridImageView.java | 2 +- .../views/PressableConstraintLayout.java | 2 +- .../vault/views/PressableGridTextView.java | 2 +- .../vault/views/PressableImageView.java | 2 +- .../vault/views/PressableRelativeLayout.java | 4 +- .../drawable-v24/ic_launcher_foreground.xml | 30 - app/src/main/res/drawable/line_divider.xml | 6 + .../outline_add_photo_alternate_24.xml | 12 + app/src/main/res/drawable/round_add_24.xml | 12 + app/src/main/res/drawable/round_key_24.xml | 12 + app/src/main/res/layout/activity_gallery.xml | 154 --- .../res/layout/activity_gallery_directory.xml | 66 -- app/src/main/res/layout/activity_main.xml | 32 + .../res/layout/adapter_import_list_item.xml | 22 +- .../main/res/layout/bottom_sheet_import.xml | 112 +++ app/src/main/res/layout/content_main.xml | 9 + .../main/res/layout/fragment_directory.xml | 130 +++ ...ivity_launch.xml => fragment_password.xml} | 2 +- app/src/main/res/menu/menu_gallery.xml | 17 - ...nu_gallery_directory.xml => menu_main.xml} | 33 +- .../main/res/menu/menu_main_selection_dir.xml | 31 + .../res/menu/menu_main_selection_root.xml | 16 + app/src/main/res/navigation/nav_graph.xml | 41 + app/src/main/res/values-land/dimens.xml | 3 + app/src/main/res/values-night/themes.xml | 6 +- app/src/main/res/values-v23/themes.xml | 9 + app/src/main/res/values-w1240dp/dimens.xml | 3 + app/src/main/res/values-w600dp/dimens.xml | 3 + app/src/main/res/values/arrays.xml | 12 + app/src/main/res/values/dimens.xml | 3 + app/src/main/res/values/strings.xml | 30 +- app/src/main/res/values/themes.xml | 14 +- app/src/main/res/xml/root_preferences.xml | 20 + .../{vault => valv}/ExampleUnitTest.java | 0 build.gradle | 10 - build.gradle.kts | 5 + gradle.properties | 10 +- gradle/libs.versions.toml | 44 + gradle/wrapper/gradle-wrapper.properties | 4 +- settings.gradle | 16 - settings.gradle.kts | 24 + 103 files changed, 3251 insertions(+), 2800 deletions(-) create mode 100644 .idea/runConfigurations.xml delete mode 100644 app/build.gradle create mode 100644 app/build.gradle.kts rename app/src/androidTest/java/se/arctosoft/{vault => valv}/ExampleInstrumentedTest.java (100%) delete mode 100644 app/src/main/ic_launcher_v-playstore.png create mode 100644 app/src/main/java/se/arctosoft/vault/BottomSheetFragment.java create mode 100644 app/src/main/java/se/arctosoft/vault/DirectoryFragment.java delete mode 100644 app/src/main/java/se/arctosoft/vault/GalleryActivity.java delete mode 100644 app/src/main/java/se/arctosoft/vault/GalleryDirectoryActivity.java delete mode 100644 app/src/main/java/se/arctosoft/vault/LaunchActivity.java create mode 100644 app/src/main/java/se/arctosoft/vault/MainActivity.java create mode 100644 app/src/main/java/se/arctosoft/vault/PasswordFragment.java create mode 100644 app/src/main/java/se/arctosoft/vault/SettingsFragment.java rename app/src/main/java/se/arctosoft/vault/{encryption => data}/Password.java (51%) create mode 100644 app/src/main/java/se/arctosoft/vault/data/ProgressData.java create mode 100644 app/src/main/java/se/arctosoft/vault/interfaces/IOnAdapterItemChanged.java create mode 100644 app/src/main/java/se/arctosoft/vault/interfaces/IOnDone.java rename app/src/main/java/se/arctosoft/vault/{BaseActivity.java => interfaces/IOnImportDone.java} (53%) delete mode 100644 app/src/main/java/se/arctosoft/vault/utils/BetterActivityResult.java delete mode 100644 app/src/main/java/se/arctosoft/vault/viewmodel/GalleryDirectoryViewModel.java create mode 100644 app/src/main/java/se/arctosoft/vault/viewmodel/ImportViewModel.java create mode 100644 app/src/main/java/se/arctosoft/vault/viewmodel/PasswordViewModel.java delete mode 100644 app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 app/src/main/res/drawable/line_divider.xml create mode 100644 app/src/main/res/drawable/outline_add_photo_alternate_24.xml create mode 100644 app/src/main/res/drawable/round_add_24.xml create mode 100644 app/src/main/res/drawable/round_key_24.xml delete mode 100644 app/src/main/res/layout/activity_gallery.xml delete mode 100644 app/src/main/res/layout/activity_gallery_directory.xml create mode 100644 app/src/main/res/layout/activity_main.xml create mode 100644 app/src/main/res/layout/bottom_sheet_import.xml create mode 100644 app/src/main/res/layout/content_main.xml create mode 100644 app/src/main/res/layout/fragment_directory.xml rename app/src/main/res/layout/{activity_launch.xml => fragment_password.xml} (99%) delete mode 100644 app/src/main/res/menu/menu_gallery.xml rename app/src/main/res/menu/{menu_gallery_directory.xml => menu_main.xml} (71%) create mode 100644 app/src/main/res/menu/menu_main_selection_dir.xml create mode 100644 app/src/main/res/menu/menu_main_selection_root.xml create mode 100644 app/src/main/res/navigation/nav_graph.xml create mode 100644 app/src/main/res/values-land/dimens.xml create mode 100644 app/src/main/res/values-v23/themes.xml create mode 100644 app/src/main/res/values-w1240dp/dimens.xml create mode 100644 app/src/main/res/values-w600dp/dimens.xml create mode 100644 app/src/main/res/values/arrays.xml create mode 100644 app/src/main/res/xml/root_preferences.xml rename app/src/test/java/se/arctosoft/{vault => valv}/ExampleUnitTest.java (100%) delete mode 100644 build.gradle create mode 100644 build.gradle.kts create mode 100644 gradle/libs.versions.toml delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b589d56..b86273d 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 0897082..7b3006b 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,6 +4,7 @@