Fixed crash if service is killed before UI is paused

This commit is contained in:
Sylvain Berfini 2020-01-13 10:55:09 +01:00
parent a2767496ff
commit 9b7361d6d9
2 changed files with 2 additions and 2 deletions

View file

@ -92,7 +92,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 4214 versionCode 4215
versionName "${project.version}" versionName "${project.version}"
applicationId getPackageName() applicationId getPackageName()
multiDexEnabled true multiDexEnabled true

View file

@ -429,11 +429,11 @@ public abstract class MainActivity extends LinphoneGenericActivity
} }
private void quit() { private void quit() {
goHomeAndClearStack();
if (LinphoneService.isReady() if (LinphoneService.isReady()
&& LinphonePreferences.instance().getServiceNotificationVisibility()) { && LinphonePreferences.instance().getServiceNotificationVisibility()) {
LinphoneService.instance().stopSelf(); LinphoneService.instance().stopSelf();
} }
goHomeAndClearStack();
} }
// Tab, Top and Status bars // Tab, Top and Status bars