From 8f7e9b7db429568e26f00bc2eef88402d722bec7 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Fri, 13 Mar 2020 00:15:16 -0700 Subject: [PATCH] Replace Android's download manager. https://redmine.stoutner.com/issues/528 --- .idea/codeStyles/Project.xml | 3 - .idea/gradle.xml | 4 +- .idea/modules.xml | 4 +- app/build.gradle | 13 +- .../activities/MainWebViewActivity.java | 328 +++--------------- .../privacybrowser/asynctasks/GetUrlSize.java | 174 ++++++++++ .../privacybrowser/asynctasks/SaveUrl.java | 83 ++++- .../dialogs/DownloadFileDialog.java | 208 ----------- .../dialogs/DownloadImageDialog.java | 182 ---------- .../DownloadLocationPermissionDialog.java | 126 ------- ...SaveWebpageDialog.java => SaveDialog.java} | 42 ++- .../dialogs/StoragePermissionDialog.java | 2 +- .../fragments/SettingsFragment.java | 36 +- .../helpers/ImportExportDatabaseHelper.java | 25 +- app/src/main/res/drawable/about_dark.xml | 2 +- app/src/main/res/drawable/about_light.xml | 2 +- app/src/main/res/drawable/add_dark.xml | 2 +- app/src/main/res/drawable/add_light.xml | 2 +- ...p_enabled_light.xml => clear_and_exit.xml} | 2 +- .../{downloads_light.xml => downloads.xml} | 2 +- app/src/main/res/drawable/downloads_dark.xml | 13 - .../main/res/drawable/home_enabled_dark.xml | 2 +- .../main/res/drawable/home_enabled_light.xml | 2 +- .../main/res/drawable/home_ghosted_dark.xml | 13 - .../main/res/drawable/home_ghosted_light.xml | 13 - .../open_with_external_app_disabled_dark.xml | 26 -- .../open_with_external_app_disabled_light.xml | 26 -- .../open_with_external_app_enabled_dark.xml | 26 -- .../main/res/drawable/search_enabled_dark.xml | 2 +- .../res/drawable/search_enabled_light.xml | 2 +- .../main/res/drawable/search_ghosted_dark.xml | 18 - .../res/drawable/search_ghosted_light.xml | 18 - .../main/res/layout/download_file_dialog.xml | 50 --- .../main/res/layout/download_image_dialog.xml | 43 --- ...ave_webpage_dialog.xml => save_dialog.xml} | 8 + app/src/main/res/menu/logcat_options_menu.xml | 2 +- .../main/res/menu/webview_navigation_menu.xml | 4 +- app/src/main/res/values-de/strings.xml | 25 +- app/src/main/res/values-es/strings.xml | 26 +- app/src/main/res/values-fr/strings.xml | 26 +- app/src/main/res/values-it/strings.xml | 26 +- app/src/main/res/values-ru/strings.xml | 26 +- app/src/main/res/values-tr/strings.xml | 28 +- app/src/main/res/values-w820dp/dimens.xml | 8 - app/src/main/res/values/dimens.xml | 7 - app/src/main/res/values/strings.xml | 27 +- app/src/main/res/values/styles.xml | 4 - app/src/main/res/xml/preferences.xml | 6 - build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 50 files changed, 409 insertions(+), 1316 deletions(-) create mode 100644 app/src/main/java/com/stoutner/privacybrowser/asynctasks/GetUrlSize.java delete mode 100644 app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadFileDialog.java delete mode 100644 app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadImageDialog.java delete mode 100644 app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadLocationPermissionDialog.java rename app/src/main/java/com/stoutner/privacybrowser/dialogs/{SaveWebpageDialog.java => SaveDialog.java} (88%) rename app/src/main/res/drawable/{open_with_external_app_enabled_light.xml => clear_and_exit.xml} (88%) rename app/src/main/res/drawable/{downloads_light.xml => downloads.xml} (72%) delete mode 100644 app/src/main/res/drawable/downloads_dark.xml delete mode 100644 app/src/main/res/drawable/home_ghosted_dark.xml delete mode 100644 app/src/main/res/drawable/home_ghosted_light.xml delete mode 100644 app/src/main/res/drawable/open_with_external_app_disabled_dark.xml delete mode 100644 app/src/main/res/drawable/open_with_external_app_disabled_light.xml delete mode 100644 app/src/main/res/drawable/open_with_external_app_enabled_dark.xml delete mode 100644 app/src/main/res/drawable/search_ghosted_dark.xml delete mode 100644 app/src/main/res/drawable/search_ghosted_light.xml delete mode 100644 app/src/main/res/layout/download_file_dialog.xml delete mode 100644 app/src/main/res/layout/download_image_dialog.xml rename app/src/main/res/layout/{save_webpage_dialog.xml => save_dialog.xml} (94%) delete mode 100644 app/src/main/res/values-w820dp/dimens.xml delete mode 100644 app/src/main/res/values/dimens.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index add4e241..d7666805 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,9 +1,6 @@