From cd832b94b6604801e04cef05ecae2983ded31b04 Mon Sep 17 00:00:00 2001 From: Alexey Krasilnikov Date: Tue, 18 Feb 2025 17:32:31 +0300 Subject: [PATCH] Add foreground service to indicate about ongoing downloads Signed-off-by: Alexey Krasilnikov --- android/app/src/main/AndroidManifest.xml | 8 + .../DownloadResourcesLegacyActivity.java | 2 +- .../java/app/organicmaps/MwmApplication.java | 45 ++---- .../screens/download/DownloaderScreen.java | 2 +- .../downloader/DownloaderAdapter.java | 4 +- .../downloader/DownloaderNotifier.java | 90 ++++++++--- .../downloader/DownloaderService.java | 142 ++++++++++++++++++ .../ExpandRetryConfirmationListener.java | 10 +- .../organicmaps/downloader/MapManager.java | 39 ++++- .../downloader/OnmapDownloader.java | 7 +- ...tryFailedDownloadConfirmationListener.java | 22 --- .../routing/RoutingMapsDownloadFragment.java | 3 +- 12 files changed, 274 insertions(+), 100 deletions(-) create mode 100644 android/app/src/main/java/app/organicmaps/downloader/DownloaderService.java delete mode 100644 android/app/src/main/java/app/organicmaps/downloader/RetryFailedDownloadConfirmationListener.java diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 42bf79fe7b..86bdadc494 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -37,6 +37,7 @@ +