Fixed crash if service intent is null

This commit is contained in:
Sylvain Berfini 2019-04-16 15:56:29 +02:00
parent 5a7d884686
commit 335c677c7f
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,4 @@
[![pipeline status](https://gitlab.linphone.org/BC/public/linphone-sdk/badges/master/pipeline.svg)](https://gitlab.linphone.org/BC/public/linphone-android/commits/feature/release-4.1) [![pipeline status](https://gitlab.linphone.org/BC/public/linphone-sdk/badges/master/pipeline.svg)](https://gitlab.linphone.org/BC/public/linphone-android/commits/master)
Linphone is a free VoIP and video softphone based on the SIP protocol. Linphone is a free VoIP and video softphone based on the SIP protocol.

View file

@ -238,6 +238,7 @@ public final class LinphoneService extends Service {
}); });
if (Version.sdkAboveOrEqual(Version.API26_O_80) if (Version.sdkAboveOrEqual(Version.API26_O_80)
&& intent != null
&& intent.getBooleanExtra("ForceStartForeground", false)) { && intent.getBooleanExtra("ForceStartForeground", false)) {
mNotificationManager.startForeground(); mNotificationManager.startForeground();
} }