Merge "p2p: Close the channel when onStop is called." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8f8e9c98f4
@@ -319,12 +319,18 @@ public class WifiP2pSettingsTest {
|
||||
assertThat(mFragment.onCreateDialog(-1 /* id */)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onStop_notLastGroupFormed_shouldCloseChannel() {
|
||||
mFragment.onStop();
|
||||
|
||||
assertThat(mFragment.mChannel).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void peerDiscovery_whenOnPause_shouldStop() {
|
||||
mFragment.onPause();
|
||||
|
||||
verify(mWifiP2pManager, times(1)).stopPeerDiscovery(any(), any());
|
||||
assertThat(mFragment.mChannel).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -332,7 +338,6 @@ public class WifiP2pSettingsTest {
|
||||
mFragment.onPause();
|
||||
|
||||
verify(mWifiP2pManager, times(1)).stopPeerDiscovery(any(), any());
|
||||
assertThat(mFragment.mChannel).isNull();
|
||||
|
||||
mFragment.onResume();
|
||||
assertThat(mFragment.mChannel).isNotNull();
|
||||
|
Reference in New Issue
Block a user