From f1baadf5366bb6531fd2c1b02f7125f743f11f12 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Sat, 25 Nov 2023 16:59:18 +0200 Subject: [PATCH] [android] Fix deprecated Notification.PRIORITY_LOW People at Google has to much spare time. Signed-off-by: Roman Tsisyk --- .../main/java/app/organicmaps/routing/NavigationService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/app/organicmaps/routing/NavigationService.java b/android/app/src/main/java/app/organicmaps/routing/NavigationService.java index ad7ce2cf5b..03d6f4362f 100644 --- a/android/app/src/main/java/app/organicmaps/routing/NavigationService.java +++ b/android/app/src/main/java/app/organicmaps/routing/NavigationService.java @@ -8,6 +8,7 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED; import android.annotation.SuppressLint; import android.app.ForegroundServiceStartNotAllowedException; import android.app.Notification; +import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; @@ -139,7 +140,7 @@ public class NavigationService extends Service implements LocationListener mNotificationBuilder = new NotificationCompat.Builder(context, CHANNEL_ID) .setCategory(NotificationCompat.CATEGORY_NAVIGATION) - .setPriority(Notification.PRIORITY_LOW) + .setPriority(NotificationManager.IMPORTANCE_LOW) .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setOngoing(true) .setShowWhen(false)