diff options
Diffstat (limited to 'src/org/lineageos/updater/controller/UpdaterService.java')
-rw-r--r-- | src/org/lineageos/updater/controller/UpdaterService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/org/lineageos/updater/controller/UpdaterService.java b/src/org/lineageos/updater/controller/UpdaterService.java index c279679..e1e0c99 100644 --- a/src/org/lineageos/updater/controller/UpdaterService.java +++ b/src/org/lineageos/updater/controller/UpdaterService.java @@ -24,6 +24,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; +import android.content.pm.ServiceInfo; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; @@ -275,7 +276,8 @@ public class UpdaterService extends Service { mNotificationBuilder.setTicker(text); mNotificationBuilder.setOngoing(true); mNotificationBuilder.setAutoCancel(false); - startForeground(NOTIFICATION_ID, mNotificationBuilder.build()); + startForeground(NOTIFICATION_ID, mNotificationBuilder.build(), + ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE); mNotificationManager.notify(NOTIFICATION_ID, mNotificationBuilder.build()); break; } @@ -390,7 +392,8 @@ public class UpdaterService extends Service { mNotificationBuilder.setTicker(text); mNotificationBuilder.setOngoing(true); mNotificationBuilder.setAutoCancel(false); - startForeground(NOTIFICATION_ID, mNotificationBuilder.build()); + startForeground(NOTIFICATION_ID, mNotificationBuilder.build(), + ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE); mNotificationManager.notify(NOTIFICATION_ID, mNotificationBuilder.build()); break; } |