Don't network down/up when a push arrives during a call

This commit is contained in:
Sylvain Berfini 2014-06-27 17:14:23 +02:00
parent d828182689
commit 050fc56b67

View file

@ -46,7 +46,7 @@ public class GCMService extends GCMBaseIntentService {
@Override @Override
protected void onMessage(Context context, Intent intent) { protected void onMessage(Context context, Intent intent) {
Log.d("Push notification received"); Log.d("Push notification received");
if (LinphoneManager.isInstanciated()) { if (LinphoneManager.isInstanciated() && LinphoneManager.getLc().getCallsNb() == 0) {
LinphoneManager.getLc().setNetworkReachable(false); LinphoneManager.getLc().setNetworkReachable(false);
LinphoneManager.getLc().setNetworkReachable(true); LinphoneManager.getLc().setNetworkReachable(true);
} }