Fixed Service not stopped when using the quit button
This commit is contained in:
parent
777359e29f
commit
0525386363
1 changed files with 5 additions and 0 deletions
|
@ -70,6 +70,7 @@ import org.linphone.fragments.EmptyFragment;
|
|||
import org.linphone.fragments.StatusBarFragment;
|
||||
import org.linphone.history.HistoryActivity;
|
||||
import org.linphone.menu.SideMenuFragment;
|
||||
import org.linphone.service.LinphoneService;
|
||||
import org.linphone.settings.LinphonePreferences;
|
||||
import org.linphone.settings.SettingsActivity;
|
||||
import org.linphone.utils.DeviceUtils;
|
||||
|
@ -428,6 +429,10 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
|||
}
|
||||
|
||||
private void quit() {
|
||||
if (LinphoneService.isReady()
|
||||
&& LinphonePreferences.instance().getServiceNotificationVisibility()) {
|
||||
LinphoneService.instance().stopSelf();
|
||||
}
|
||||
goHomeAndClearStack();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue