Merge "Make P2P Settings channel static"

This commit is contained in:
Quang Luong
2022-11-28 18:27:28 +00:00
committed by Android (Google) Code Review
2 changed files with 33 additions and 33 deletions

View File

@@ -338,7 +338,7 @@ public class WifiP2pSettingsTest {
public void onStop_notLastGroupFormed_shouldCloseChannel() {
mFragment.onStop();
assertThat(mFragment.mChannel).isNull();
assertThat(mFragment.sChannel).isNull();
}
@Test
@@ -355,7 +355,7 @@ public class WifiP2pSettingsTest {
verify(mWifiP2pManager, times(1)).stopPeerDiscovery(any(), any());
mFragment.onStart();
assertThat(mFragment.mChannel).isNotNull();
assertThat(mFragment.sChannel).isNotNull();
}
@Test
@@ -526,7 +526,7 @@ public class WifiP2pSettingsTest {
@Test
public void onCreateView_withNullP2pManager_shouldGetP2pManagerAgain() {
mFragment.mChannel = null; // Reset channel to re-test onCreateView flow
mFragment.sChannel = null; // Reset channel to re-test onCreateView flow
mFragment.mWifiP2pManager = null;
mFragment.onCreateView(LayoutInflater.from(mContext), null, new Bundle());
@@ -537,7 +537,7 @@ public class WifiP2pSettingsTest {
@Test
public void onCreateView_withNullChannel_shouldSetP2pManagerNull() {
doReturn(null).when(mWifiP2pManager).initialize(any(), any(), any());
mFragment.mChannel = null; // Reset channel to re-test onCreateView flow
mFragment.sChannel = null; // Reset channel to re-test onCreateView flow
mFragment.onCreateView(LayoutInflater.from(mContext), null, new Bundle());
assertThat(mFragment.mWifiP2pManager).isNull();