Do not toggle network reachabilty upon receiving a push while app is alive
This commit is contained in:
parent
2d2b551663
commit
d8cc5b62f8
2 changed files with 0 additions and 15 deletions
|
@ -56,20 +56,6 @@ public class FirebaseMessaging extends FirebaseMessagingService {
|
||||||
intent.setClass(this, LinphoneService.class);
|
intent.setClass(this, LinphoneService.class);
|
||||||
intent.putExtra("PushNotification", true);
|
intent.putExtra("PushNotification", true);
|
||||||
startService(intent);
|
startService(intent);
|
||||||
} else if (LinphoneManager.isInstanciated() && LinphoneManager.getLc().getCallsNb() == 0) {
|
|
||||||
LinphoneUtils.dispatchOnUIThread(
|
|
||||||
new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Log.i(
|
|
||||||
"[Push Notification] Push notification received with LinphoneManager still alive");
|
|
||||||
if (LinphoneManager.isInstanciated()
|
|
||||||
&& LinphoneManager.getLc().getCallsNb() == 0) {
|
|
||||||
LinphoneManager.getLc().setNetworkReachable(false);
|
|
||||||
LinphoneManager.getLc().setNetworkReachable(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,6 @@ import org.linphone.contacts.LinphoneContact;
|
||||||
import org.linphone.core.Address;
|
import org.linphone.core.Address;
|
||||||
import org.linphone.core.Call;
|
import org.linphone.core.Call;
|
||||||
import org.linphone.core.tools.Log;
|
import org.linphone.core.tools.Log;
|
||||||
import org.linphone.mediastream.Version;
|
|
||||||
import org.linphone.settings.LinphonePreferences;
|
import org.linphone.settings.LinphonePreferences;
|
||||||
import org.linphone.utils.ImageUtils;
|
import org.linphone.utils.ImageUtils;
|
||||||
import org.linphone.utils.LinphoneUtils;
|
import org.linphone.utils.LinphoneUtils;
|
||||||
|
|
Loading…
Reference in a new issue