From dd502e55f839f72407f1deddd4a8668c693334d3 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Thu, 9 Nov 2017 18:26:03 +0200 Subject: [PATCH] set default notification priority to low since we're a foreground service, in oreo we already get a higher priority; see https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_MIN --- app/src/main/java/com/termux/app/TermuxService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/termux/app/TermuxService.java b/app/src/main/java/com/termux/app/TermuxService.java index 430b945f..94c8ba8a 100644 --- a/app/src/main/java/com/termux/app/TermuxService.java +++ b/app/src/main/java/com/termux/app/TermuxService.java @@ -207,8 +207,8 @@ public final class TermuxService extends Service implements SessionChangedCallba builder.setOngoing(true); // If holding a wake or wifi lock consider the notification of high priority since it's using power, - // otherwise use a minimal priority since this is just a background service notification: - builder.setPriority((wakeLockHeld) ? Notification.PRIORITY_HIGH : Notification.PRIORITY_MIN); + // otherwise use a low priority + builder.setPriority((wakeLockHeld) ? Notification.PRIORITY_HIGH : Notification.PRIORITY_LOW); // No need to show a timestamp: builder.setShowWhen(false);