mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
ipc/android: Clean up MonadoService
This commit is contained in:
parent
a1aa5611fe
commit
c65ce85fe1
|
@ -53,23 +53,27 @@ class MonadoService : Service() {
|
|||
}
|
||||
|
||||
private fun handleStart() {
|
||||
val pendingShutdownIntent = PendingIntent.getForegroundService(this,
|
||||
0,
|
||||
Intent(BuildConfig.SHUTDOWN_ACTION).setPackage(packageName),
|
||||
0)
|
||||
val pendingShutdownIntent = PendingIntent.getForegroundService(
|
||||
this,
|
||||
0,
|
||||
Intent(BuildConfig.SHUTDOWN_ACTION).setPackage(packageName),
|
||||
0
|
||||
)
|
||||
|
||||
val notification = serviceNotification.buildNotification(this, pendingShutdownIntent)
|
||||
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
startForeground(serviceNotification.getNotificationId(),
|
||||
notification,
|
||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST)
|
||||
startForeground(
|
||||
serviceNotification.getNotificationId(),
|
||||
notification,
|
||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST
|
||||
)
|
||||
} else {
|
||||
startForeground(serviceNotification.getNotificationId(),
|
||||
notification)
|
||||
startForeground(
|
||||
serviceNotification.getNotificationId(),
|
||||
notification
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue