Fix Wi-Fi calling test case

Fix: 337417499
Flag: TEST_ONLY
Test: atest passed
atest -c NetworkProviderWifiCallingGroupTest

Change-Id: I2d57287a85075685b0bdb35a59dc8b147e90d38c
This commit is contained in:
Weng Su
2024-06-07 05:32:59 +08:00
parent 08fc7f85e7
commit ca13280e56

View File

@@ -48,7 +48,6 @@ import com.android.settings.network.ims.MockWfcQueryImsState;
import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.core.lifecycle.Lifecycle;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.Mock; import org.mockito.Mock;
@@ -115,7 +114,7 @@ public class NetworkProviderWifiCallingGroupTest {
mCarrierConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, true); mCarrierConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, true);
when(mTelecomManager.getSimCallManagerForSubscription(SUB_ID)) when(mTelecomManager.getSimCallManagerForSubscription(SUB_ID))
.thenReturn(mPhoneAccountHandle); .thenReturn(mPhoneAccountHandle);
mMockQueryWfcState = new MockWfcQueryImsState(mContext, SUB_ID); mMockQueryWfcState = spy(new MockWfcQueryImsState(mContext, SUB_ID));
if (Looper.myLooper() == null) { if (Looper.myLooper() == null) {
Looper.prepare(); Looper.prepare();
@@ -177,11 +176,11 @@ public class NetworkProviderWifiCallingGroupTest {
} }
@Test @Test
@Ignore("b/337417499")
public void public void
shouldShowWifiCallingForSub_wifiCallingEnabledWithActivityHandleIntent_returnTrue() { shouldShowWifiCallingForSub_wifiCallingEnabledWithActivityHandleIntent_returnTrue() {
buildPhoneAccountConfigureIntent(true); buildPhoneAccountConfigureIntent(true);
doReturn(mMockQueryWfcState).when(mNetworkProviderWifiCallingGroup).queryImsState(SUB_ID); doReturn(mMockQueryWfcState).when(mNetworkProviderWifiCallingGroup).queryImsState(SUB_ID);
doReturn(true).when(mMockQueryWfcState).isReadyToWifiCalling();
doReturn(mPhoneAccountHandle).when(mNetworkProviderWifiCallingGroup) doReturn(mPhoneAccountHandle).when(mNetworkProviderWifiCallingGroup)
.getPhoneAccountHandleForSubscriptionId(SUB_ID); .getPhoneAccountHandleForSubscriptionId(SUB_ID);