Terminate calls when killing task
This commit is contained in:
parent
cb76369a9a
commit
9758a6f684
1 changed files with 5 additions and 1 deletions
|
@ -803,11 +803,15 @@ public final class LinphoneService extends Service {
|
||||||
@Override
|
@Override
|
||||||
public void onTaskRemoved(Intent rootIntent) {
|
public void onTaskRemoved(Intent rootIntent) {
|
||||||
if (getResources().getBoolean(R.bool.kill_service_with_task_manager)) {
|
if (getResources().getBoolean(R.bool.kill_service_with_task_manager)) {
|
||||||
|
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
|
if (lc != null) {
|
||||||
|
lc.terminateAllCalls();
|
||||||
|
}
|
||||||
|
|
||||||
Log.d("Task removed, stop service");
|
Log.d("Task removed, stop service");
|
||||||
|
|
||||||
// If push is enabled, don't unregister account, otherwise do unregister
|
// If push is enabled, don't unregister account, otherwise do unregister
|
||||||
if (LinphonePreferences.instance().isPushNotificationEnabled()) {
|
if (LinphonePreferences.instance().isPushNotificationEnabled()) {
|
||||||
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
|
||||||
if (lc != null) lc.setNetworkReachable(false);
|
if (lc != null) lc.setNetworkReachable(false);
|
||||||
}
|
}
|
||||||
stopSelf();
|
stopSelf();
|
||||||
|
|
Loading…
Reference in a new issue