diff --git a/term/src/main/AndroidManifest.xml b/term/src/main/AndroidManifest.xml index 09afbf72..d0348c95 100644 --- a/term/src/main/AndroidManifest.xml +++ b/term/src/main/AndroidManifest.xml @@ -20,7 +20,7 @@ tools:ignore="ScopedStorage" /> - + + - diff --git a/term/src/main/java/jackpal/androidterm/TermService.java b/term/src/main/java/jackpal/androidterm/TermService.java index 5b8c814a..58036475 100644 --- a/term/src/main/java/jackpal/androidterm/TermService.java +++ b/term/src/main/java/jackpal/androidterm/TermService.java @@ -215,8 +215,8 @@ private boolean startForegroundServiceNotification(boolean showStatusIcon) { Notification notification = buildNotification(channelId, showStatusIcon); if (notification != null) { if (useNotificationForgroundService()) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - startForeground(RUNNING_NOTIFICATION, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + startForeground(RUNNING_NOTIFICATION, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE); } else { startForeground(RUNNING_NOTIFICATION, notification); }