mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 04:06:14 +00:00
Allow nullability of Intent parameter in converted services.
This commit is contained in:
@@ -456,11 +456,11 @@ class IncomingMessageObserver(private val context: Application) {
|
||||
}
|
||||
|
||||
class ForegroundService : Service() {
|
||||
override fun onBind(intent: Intent): IBinder? {
|
||||
override fun onBind(intent: Intent?): IBinder? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
super.onStartCommand(intent, flags, startId)
|
||||
|
||||
val notification = NotificationCompat.Builder(applicationContext, NotificationChannels.getInstance().BACKGROUND)
|
||||
@@ -481,9 +481,9 @@ class IncomingMessageObserver(private val context: Application) {
|
||||
* A service that exists just to encourage the system to keep our process alive a little longer.
|
||||
*/
|
||||
class BackgroundService : Service() {
|
||||
override fun onBind(intent: Intent): IBinder? = null
|
||||
override fun onBind(intent: Intent?): IBinder? = null
|
||||
|
||||
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
Log.d(TAG, "Background service started.")
|
||||
return START_STICKY
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user