remove dns server handling and in-call wake lock management, because it is taken in charge by the library now.
This commit is contained in:
parent
2fcda61d4f
commit
6cd271d956
2 changed files with 1 additions and 39 deletions
|
@ -179,7 +179,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
private IntentFilter mCallIntentFilter;
|
||||
private IntentFilter mNetworkIntentFilter;
|
||||
private Handler mHandler = new Handler();
|
||||
private WakeLock mIncallWakeLock;
|
||||
private WakeLock mProximityWakelock;
|
||||
private LinphoneAccountCreator accountCreator;
|
||||
private static List<LinphoneChatMessage> mPendingChatFileMessage;
|
||||
|
@ -1011,7 +1010,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
boolean wifiOnly = LinphonePreferences.instance().isWifiOnlyEnabled();
|
||||
if (wifiOnly){
|
||||
if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI) {
|
||||
setDnsServers();
|
||||
mLc.setNetworkReachable(true);
|
||||
}
|
||||
else {
|
||||
|
@ -1027,7 +1025,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
Log.i("Connectivity has changed.");
|
||||
mLc.setNetworkReachable(false);
|
||||
}
|
||||
setDnsServers();
|
||||
mLc.setNetworkReachable(true);
|
||||
mLastNetworkType = curtype;
|
||||
}
|
||||
|
@ -1465,12 +1462,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
routeAudioToReceiver();
|
||||
}
|
||||
}
|
||||
if (mIncallWakeLock != null && mIncallWakeLock.isHeld()) {
|
||||
mIncallWakeLock.release();
|
||||
Log.i("Last call ended: releasing incall (CPU only) wake lock");
|
||||
} else {
|
||||
Log.i("Last call ended: no incall (CPU only) wake lock were held");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (state == State.CallUpdatedByRemote) {
|
||||
|
@ -1497,15 +1488,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
if (state == State.StreamsRunning) {
|
||||
startBluetooth();
|
||||
setAudioManagerInCallMode();
|
||||
if (mIncallWakeLock == null) {
|
||||
mIncallWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "incall");
|
||||
}
|
||||
if (!mIncallWakeLock.isHeld()) {
|
||||
Log.i("New call active : acquiring incall (CPU only) wake lock");
|
||||
mIncallWakeLock.acquire();
|
||||
} else {
|
||||
Log.i("New call active while incall (CPU only) wake lock already active");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1826,26 +1808,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
dozeModeEnabled = b;
|
||||
}
|
||||
|
||||
public void setDnsServers() {
|
||||
if (mConnectivityManager == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
||||
return;
|
||||
|
||||
if (mConnectivityManager.getActiveNetwork() == null
|
||||
|| mConnectivityManager.getLinkProperties(mConnectivityManager.getActiveNetwork()) == null)
|
||||
return;
|
||||
|
||||
int i = 0;
|
||||
List<InetAddress> inetServers = null;
|
||||
inetServers = mConnectivityManager.getLinkProperties(mConnectivityManager.getActiveNetwork()).getDnsServers();
|
||||
|
||||
String[] servers = new String[inetServers.size()];
|
||||
|
||||
for (InetAddress address : inetServers) {
|
||||
servers[i++] = address.getHostAddress();
|
||||
}
|
||||
mLc.setDnsServers(servers);
|
||||
}
|
||||
|
||||
public String getmDynamicConfigFile() {
|
||||
return mDynamicConfigFile;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8d4d875486e7263354c12dedb3a3b589c52a9bda
|
||||
Subproject commit af3d44e60d7547a02f29d3b3948bfa681a769c59
|
Loading…
Reference in a new issue