Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit ecfe3da3 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Wakeful receivers only handle non-null intents

parent 87465cd1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -95,7 +95,9 @@ public class CheckinService extends IntentService {
        } catch (Exception e) {
            Log.w(TAG, e);
        } finally {
            if (intent != null) {
                WakefulBroadcastReceiver.completeWakefulIntent(intent);
            }
            schedule(this);
            stopSelf();
        }
+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ public class McsService extends Service implements Handler.Callback {
                WakefulBroadcastReceiver.completeWakefulIntent(intent);
            } else if (connectIntent == null) {
                connectIntent = intent;
            } else {
            } else if (intent != null) {
                WakefulBroadcastReceiver.completeWakefulIntent(intent);
            }
        }
+6 −5
Original line number Diff line number Diff line
@@ -112,12 +112,13 @@ class PushRegisterService : LifecycleService() {
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        if (intent != null) {
            WakefulBroadcastReceiver.completeWakefulIntent(intent)
            Log.d(TAG, "onStartCommand: $intent")
            lifecycleScope.launchWhenStarted {
            if (intent == null) return@launchWhenStarted
                handleIntent(intent)
            }
        }
        return super.onStartCommand(intent, flags, startId)
    }