Merge "Use TetherEnabler in AllInOneTetherSettings to manage master switch"

This commit is contained in:
Rajeev Kumar
2020-01-20 05:37:16 +00:00
committed by Android (Google) Code Review
5 changed files with 175 additions and 78 deletions

View File

@@ -109,8 +109,10 @@ public class TetherEnablerTest {
@Test
public void startTether_fail_resetSwitchBar() {
when(mNetworkPolicyManager.getRestrictBackground()).thenReturn(false);
mEnabler.onStart();
mEnabler.startTether();
when(mConnectivityManager.getTetheredIfaces()).thenReturn(new String[0]);
mEnabler.mOnStartTetheringCallback.onTetheringFailed();
assertThat(mSwitchBar.isChecked()).isFalse();