Merge "Fix some comments around stopTetheringRequest" into main
This commit is contained in:
commit
f09acc7281
2 changed files with 5 additions and 2 deletions
|
|
@ -736,6 +736,9 @@ public class Tethering {
|
|||
if (mPendingTetheringRequests.valueAt(i).getTetheringType() == type) return true;
|
||||
}
|
||||
for (TetherState state : mTetherStates.values()) {
|
||||
// TODO: isCurrentlyServing only starts returning true once the IpServer has processed
|
||||
// the CMD_TETHER_REQUESTED. Ensure that we consider the request to be serving even when
|
||||
// that has not happened yet.
|
||||
if (state.isCurrentlyServing() && state.ipServer.interfaceType() == type) return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -465,13 +465,13 @@ public class TetheringManagerTest {
|
|||
|
||||
// stopTethering without any tethering active should fail.
|
||||
TetheringRequest request = new TetheringRequest.Builder(TETHERING_WIFI).build();
|
||||
mCtsTetheringUtils.stopTethering(request, false /* succeeded */);
|
||||
mCtsTetheringUtils.stopTethering(request, false /* expectSuccess */);
|
||||
|
||||
// Start wifi tethering
|
||||
mCtsTetheringUtils.startWifiTethering(tetherEventCallback);
|
||||
|
||||
// stopTethering should succeed now that there's a request.
|
||||
mCtsTetheringUtils.stopTethering(request, true /* succeeded */);
|
||||
mCtsTetheringUtils.stopTethering(request, true /* expectSuccess */);
|
||||
tetherEventCallback.expectNoTetheringActive();
|
||||
} finally {
|
||||
mCtsTetheringUtils.stopAllTethering();
|
||||
|
|
|
|||
Loading…
Reference in a new issue