resolved conflicts for merge of 2813d5ba to mnc-dr-dev
Change-Id: I8b33797528f16596f0d350ad38458baa51fcacf6
This commit is contained in:
commit
bbfacbbc96
1 changed files with 24 additions and 8 deletions
|
|
@ -193,6 +193,13 @@ public abstract class NetworkAgent extends Handler {
|
|||
*/
|
||||
public static final int CMD_SET_SIGNAL_STRENGTH_THRESHOLDS = BASE + 14;
|
||||
|
||||
/**
|
||||
* Sent by ConnectivityService to the NeworkAgent to inform the agent to avoid
|
||||
* automatically reconnecting to this network (e.g. via autojoin). Happens
|
||||
* when user selects "No" option on the "Stay connected?" dialog box.
|
||||
*/
|
||||
public static final int CMD_PREVENT_AUTOMATIC_RECONNECT = BASE + 15;
|
||||
|
||||
public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni,
|
||||
NetworkCapabilities nc, LinkProperties lp, int score) {
|
||||
this(looper, context, logTag, ni, nc, lp, score, null);
|
||||
|
|
@ -308,6 +315,10 @@ public abstract class NetworkAgent extends Handler {
|
|||
setSignalStrengthThresholds(intThresholds);
|
||||
break;
|
||||
}
|
||||
case CMD_PREVENT_AUTOMATIC_RECONNECT: {
|
||||
preventAutomaticReconnect();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -474,6 +485,15 @@ public abstract class NetworkAgent extends Handler {
|
|||
protected void setSignalStrengthThresholds(int[] thresholds) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user asks to not stay connected to this network because it was found to not
|
||||
* provide Internet access. Usually followed by call to {@code unwanted}. The transport is
|
||||
* responsible for making sure the device does not automatically reconnect to the same network
|
||||
* after the {@code unwanted} call.
|
||||
*/
|
||||
protected void preventAutomaticReconnect() {
|
||||
}
|
||||
|
||||
protected void log(String s) {
|
||||
Log.d(LOG_TAG, "NetworkAgent: " + s);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue