Wrap some IpServer commands
This is no-op change. Preparing for refactor. Test: atest TetheringTests Change-Id: I8fb67cbc95074e990074f08b5fe6afe7dfd28382
This commit is contained in:
@@ -378,6 +378,11 @@ public class IpServer extends StateMachine {
|
|||||||
return Collections.unmodifiableList(mDhcpLeases);
|
return Collections.unmodifiableList(mDhcpLeases);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Enable this IpServer. IpServer state machine will be tethered or localHotspot state. */
|
||||||
|
public void enable(final int requestedState, final TetheringRequestParcel request) {
|
||||||
|
sendMessage(CMD_TETHER_REQUESTED, requestedState, 0, request);
|
||||||
|
}
|
||||||
|
|
||||||
/** Stop this IpServer. After this is called this IpServer should not be used any more. */
|
/** Stop this IpServer. After this is called this IpServer should not be used any more. */
|
||||||
public void stop() {
|
public void stop() {
|
||||||
sendMessage(CMD_INTERFACE_DOWN);
|
sendMessage(CMD_INTERFACE_DOWN);
|
||||||
|
|||||||
@@ -1001,8 +1001,7 @@ public class Tethering {
|
|||||||
if (request != null) {
|
if (request != null) {
|
||||||
mActiveTetheringRequests.delete(type);
|
mActiveTetheringRequests.delete(type);
|
||||||
}
|
}
|
||||||
tetherState.ipServer.sendMessage(IpServer.CMD_TETHER_REQUESTED, requestedState, 0,
|
tetherState.ipServer.enable(requestedState, request);
|
||||||
request);
|
|
||||||
return TETHER_ERROR_NO_ERROR;
|
return TETHER_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1026,7 +1025,7 @@ public class Tethering {
|
|||||||
Log.e(TAG, "Tried to untether an inactive iface :" + iface + ", ignoring");
|
Log.e(TAG, "Tried to untether an inactive iface :" + iface + ", ignoring");
|
||||||
return TETHER_ERROR_UNAVAIL_IFACE;
|
return TETHER_ERROR_UNAVAIL_IFACE;
|
||||||
}
|
}
|
||||||
tetherState.ipServer.sendMessage(IpServer.CMD_TETHER_UNREQUESTED);
|
tetherState.ipServer.unwanted();
|
||||||
return TETHER_ERROR_NO_ERROR;
|
return TETHER_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1087,8 +1086,6 @@ public class Tethering {
|
|||||||
final ArrayList<TetheringInterface> errored = new ArrayList<>();
|
final ArrayList<TetheringInterface> errored = new ArrayList<>();
|
||||||
final ArrayList<Integer> lastErrors = new ArrayList<>();
|
final ArrayList<Integer> lastErrors = new ArrayList<>();
|
||||||
|
|
||||||
final TetheringConfiguration cfg = mConfig;
|
|
||||||
|
|
||||||
int downstreamTypesMask = DOWNSTREAM_NONE;
|
int downstreamTypesMask = DOWNSTREAM_NONE;
|
||||||
for (int i = 0; i < mTetherStates.size(); i++) {
|
for (int i = 0; i < mTetherStates.size(); i++) {
|
||||||
final TetherState tetherState = mTetherStates.valueAt(i);
|
final TetherState tetherState = mTetherStates.valueAt(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user