Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[connectionagent] disconnect mobile data if wifi becomes ready
  • Loading branch information
Lorn Potter committed Jun 16, 2014
1 parent 77ec166 commit 21182e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions connd/qconnectionagent.cpp
Expand Up @@ -249,6 +249,11 @@ void QConnectionAgent::serviceStateChanged(const QString &state)
if (delayedTethering && service->type() == "wifi" && state == "association") {
service->requestDisconnect();
}
if (state == "ready" && service->type() == "wifi"
&& !delayedTethering
&& netman->defaultRoute()->type() == "cellular") {
netman->defaultRoute()->requestDisconnect();
}
if (state == "online") {
Q_EMIT connectionState(state, service->type());

Expand Down

0 comments on commit 21182e3

Please sign in to comment.