Fixed crash if foreground service notification is enabled

This commit is contained in:
Sylvain Berfini 2019-05-16 17:27:58 +02:00
parent bfc7a386ee
commit f74f6e5911

View file

@ -190,10 +190,11 @@ public final class LinphoneService extends Service {
return START_STICKY; return START_STICKY;
} }
mNotificationManager = new NotificationsManager(this);
mLinphoneManager = new LinphoneManager(this); mLinphoneManager = new LinphoneManager(this);
sInstance = this; // sInstance is ready once linphone manager has been created sInstance = this; // sInstance is ready once linphone manager has been created
mNotificationManager = new NotificationsManager(this);
if (Version.sdkAboveOrEqual(Version.API26_O_80) if (Version.sdkAboveOrEqual(Version.API26_O_80)
&& intent != null && intent != null
&& intent.getBooleanExtra("ForceStartForeground", false)) { && intent.getBooleanExtra("ForceStartForeground", false)) {