/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/network/ |
D | MobileDataTogglePreferenceControllerTest.java | 79 private TelephonyManager mMockTelephonyManager; field in MobileDataTogglePreferenceControllerTest 98 .thenReturn(mMockTelephonyManager); in setUp() 99 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mMockTelephonyManager); in setUp() 100 when(mMockTelephonyManager.createForSubscriptionId(SUB_ID)) in setUp() 101 .thenReturn(mMockTelephonyManager); in setUp() 102 when(mMockTelephonyManager.getSimCount()).thenReturn(1); in setUp() 103 when(mMockTelephonyManager.isDataEnabled()).thenReturn(false); in setUp() 138 when(mMockTelephonyManager.getSimCount()).thenReturn(2); in onStart_multiSim_registersObserver() 173 when(mMockTelephonyManager.isDataEnabled()).thenReturn(true); in refreshUi_dataEnabled_setChecked() 197 when(mMockTelephonyManager.isDataEnabled()).thenReturn(true); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() [all …]
|
D | RoamingPreferenceControllerTest.java | 81 private TelephonyManager mMockTelephonyManager; field in RoamingPreferenceControllerTest 98 ExtendedMockito.when(TelephonyManager.from(mContext)).thenReturn(mMockTelephonyManager); in setUp() 99 when(mMockTelephonyManager.createForSubscriptionId(SUB_ID)) in setUp() 100 .thenReturn(mMockTelephonyManager); in setUp() 101 when(mMockTelephonyManager.getSimCount()).thenReturn(1); in setUp() 102 when(mMockTelephonyManager.isDataRoamingEnabled()).thenReturn(true); in setUp() 136 when(mMockTelephonyManager.getSimCount()).thenReturn(2); in onStart_registerObserver_additionalSubId() 154 when(mMockTelephonyManager.createForSubscriptionId( in refreshUi_invalidSubId_isDisabled() 155 SubscriptionManager.INVALID_SUBSCRIPTION_ID)).thenReturn(mMockTelephonyManager); in refreshUi_invalidSubId_isDisabled() 181 when(mMockTelephonyManager.isDataRoamingEnabled()).thenReturn(false); in refreshUi_roamingDisabled_setUnchecked() [all …]
|
D | NetworkBasePreferenceControllerTest.java | 59 private TelephonyManager mMockTelephonyManager; field in NetworkBasePreferenceControllerTest 72 ExtendedMockito.when(TelephonyManager.from(mContext)).thenReturn(mMockTelephonyManager); in setUp() 73 when(mMockTelephonyManager.createForSubscriptionId(SUB_ID)) in setUp() 74 .thenReturn(mMockTelephonyManager); in setUp() 75 ExtendedMockito.when(DataUsageUtils.getMobileNetworkTemplate(mMockTelephonyManager, SUB_ID)) in setUp() 95 assertThat(mPreferenceController.getTelephonyManager()).isEqualTo(mMockTelephonyManager); in onSubIdSet_setsFields()
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/ |
D | EapSimTest.java | 164 private TelephonyManager mMockTelephonyManager; field in EapSimTest 171 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 240 doReturn(mMockTelephonyManager) in verifyEapSimStart() 245 doReturn(UNFORMATTED_IDENTITY).when(mMockTelephonyManager).getSubscriberId(); in verifyEapSimStart() 257 verify(mMockTelephonyManager).getSubscriberId(); in verifyEapSimStart() 266 mMockTelephonyManager, in verifyEapSimStart() 273 when(mMockTelephonyManager in verifyEapSimChallenge() 279 when(mMockTelephonyManager in verifyEapSimChallenge() 285 when(mMockTelephonyManager in verifyEapSimChallenge() 296 verify(mMockTelephonyManager) in verifyEapSimChallenge() [all …]
|
D | EapAkaPrimeTest.java | 269 private TelephonyManager mMockTelephonyManager; field in EapAkaPrimeTest 285 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 305 doReturn(mMockTelephonyManager) in setUp() 331 mMockContext, mMockTelephonyManager, mMockSecureRandom, mMockCallback); in testEapAkaPrimeEndToEndExternalTestVectors() 404 doReturn(unformattedIdentity).when(mMockTelephonyManager).getSubscriberId(); in verifyEapAkaPrimeIdentity() 411 verify(mMockTelephonyManager).getSubscriberId(); in verifyEapAkaPrimeIdentity() 414 mMockContext, mMockTelephonyManager, mMockSecureRandom, mMockCallback); in verifyEapAkaPrimeIdentity() 423 when(mMockTelephonyManager.getIccAuthentication( in verifyEapAkaPrimeChallenge() 433 verify(mMockTelephonyManager) in verifyEapAkaPrimeChallenge() 448 mMockContext, mMockTelephonyManager, mMockSecureRandom, mMockCallback); in verifyEapAkaPrimeChallenge() [all …]
|
D | EapAkaTest.java | 290 private TelephonyManager mMockTelephonyManager; field in EapAkaTest 298 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 318 doReturn(mMockTelephonyManager) in setUp() 444 doReturn(UNFORMATTED_IDENTITY).when(mMockTelephonyManager).getSubscriberId(); in verifyEapAkaIdentity() 451 verify(mMockTelephonyManager).getSubscriberId(); in verifyEapAkaIdentity() 455 mMockContext, mMockTelephonyManager, mMockSecureRandom, mMockCallback); in verifyEapAkaIdentity() 510 when(mMockTelephonyManager.getIccAuthentication( in verifyEapAkaChallenge() 520 verify(mMockTelephonyManager) in verifyEapAkaChallenge() 542 mMockContext, mMockTelephonyManager, mMockSecureRandom, mMockCallback); in verifyEapAkaChallenge() 555 verifyNoMoreInteractions(mMockContext, mMockTelephonyManager, mMockCallback); in verifyEapAkaChallengeWithoutIdentityReq() [all …]
|
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/ |
D | CellBroadcastReceiverTest.java | 96 TelephonyManager mMockTelephonyManager; field in CellBroadcastReceiverTest 259 doReturn(mMockTelephonyManager).when(mMockTelephonyManager) in mockTelephonyManager() 263 doReturn(mMockTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in mockTelephonyManager() 288 doReturn(TelephonyManager.UNKNOWN_CARRIER_ID).when(mMockTelephonyManager) in testInitializeSharedPreference_ifSystemUser_firstSub() 294 doReturn(subId).when(mMockTelephonyManager).getSimCarrierId(); in testInitializeSharedPreference_ifSystemUser_firstSub() 311 doReturn(firstSubId).when(mMockTelephonyManager).getSimCarrierId(); in testInitializeSharedPreference_ifSystemUser_carrierChange() 318 doReturn(secondSubId).when(mMockTelephonyManager).getSimCarrierId(); in testInitializeSharedPreference_ifSystemUser_carrierChange() 324 doReturn(secondSubId).when(mMockTelephonyManager).getSimCarrierId(); in testInitializeSharedPreference_ifSystemUser_carrierChange() 536 doReturn(false).when(mMockTelephonyManager).isNetworkRoaming(); in testOnServiceStateChange() 537 doReturn("123456").when(mMockTelephonyManager).getNetworkOperator(); in testOnServiceStateChange() [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/statemachine/ |
D | EapAkaChallengeStateTest.java | 188 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessMissingAtRand() 208 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessMissingAtAutn() 228 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessMissingAtMac() 286 when(mMockTelephonyManager in testProcessIccAuthenticationNullResponse() 297 verify(mMockTelephonyManager) in testProcessIccAuthenticationNullResponse() 302 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessIccAuthenticationNullResponse() 320 when(mMockTelephonyManager in testProcessIccAuthenticationInvalidTag() 331 verify(mMockTelephonyManager) in testProcessIccAuthenticationInvalidTag() 336 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessIccAuthenticationInvalidTag() 354 when(mMockTelephonyManager in testProcessIccAuthenticationSynchronizeTag() [all …]
|
D | EapAkaIdentityStateTest.java | 76 doReturn(IMSI).when(mMockTelephonyManager).getSubscriberId(); in testProcessIdentityRequest() 82 verify(mMockTelephonyManager).getSubscriberId(); in testProcessIdentityRequest() 83 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessIdentityRequest() 99 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessWithoutIdentityRequestAttributes() 118 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessMultipleIdentityRequestAttributes() 130 doReturn(null).when(mMockTelephonyManager).getSubscriberId(); in testProcessImsiUnavailable() 136 verify(mMockTelephonyManager).getSubscriberId(); in testProcessImsiUnavailable() 137 verifyNoMoreInteractions(mMockEapAkaTypeDataDecoder, mMockTelephonyManager); in testProcessImsiUnavailable() 161 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testProcessTransitionToChallengeState()
|
D | EapAkaMethodStateMachineTest.java | 72 protected TelephonyManager mMockTelephonyManager; field in EapAkaMethodStateMachineTest 81 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 86 doReturn(mMockTelephonyManager) in setUp() 128 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testEapAkaFailsOnMultipleAkaNotifications() 135 doReturn(IMSI).when(mMockTelephonyManager).getSubscriberId(); in testEapAkaFailsOnMultipleAkaNotifications() 144 verify(mMockTelephonyManager).getSubscriberId(); in testEapAkaFailsOnMultipleAkaNotifications() 145 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testEapAkaFailsOnMultipleAkaNotifications() 156 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testEapAkaFailsOnMultipleAkaNotifications()
|
D | EapSimChallengeStateTest.java | 261 when(mMockTelephonyManager in testGetRandChallengeResults() 267 when(mMockTelephonyManager in testGetRandChallengeResults() 282 verify(mMockTelephonyManager) in testGetRandChallengeResults() 287 verify(mMockTelephonyManager) in testGetRandChallengeResults() 292 verifyNoMoreInteractions(mMockTelephonyManager); in testGetRandChallengeResults() 303 when(mMockTelephonyManager in testGetRandChallengeResultsBufferUnderflow() 309 when(mMockTelephonyManager in testGetRandChallengeResultsBufferUnderflow() 322 verify(mMockTelephonyManager) in testGetRandChallengeResultsBufferUnderflow() 327 verify(mMockTelephonyManager) in testGetRandChallengeResultsBufferUnderflow() 332 verifyNoMoreInteractions(mMockTelephonyManager); in testGetRandChallengeResultsBufferUnderflow() [all …]
|
D | EapSimMethodStateMachineTest.java | 72 private TelephonyManager mMockTelephonyManager; field in EapSimMethodStateMachineTest 81 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 85 doReturn(mMockTelephonyManager) in setUp() 126 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapSimTypeDataDecoder); in testEapSimFailsOnMultipleSimNotifications() 141 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapSimTypeDataDecoder); in testEapSimFailsOnMultipleSimNotifications() 152 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapSimTypeDataDecoder); in testEapSimFailsOnMultipleSimNotifications()
|
D | EapSimStateTest.java | 70 protected TelephonyManager mMockTelephonyManager; field in EapSimStateTest 78 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 82 doReturn(mMockTelephonyManager) in setUp() 105 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapSimTypeDataDecoder); in testProcessNotification() 129 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapSimTypeDataDecoder); in testProcessEapSimNotification() 145 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapSimTypeDataDecoder); in testProcessInvalidDecodeResult()
|
D | EapAkaStateTest.java | 70 protected TelephonyManager mMockTelephonyManager; field in EapAkaStateTest 79 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 84 doReturn(mMockTelephonyManager) in setUp() 108 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testProcessNotification() 132 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testProcessEapAkaNotification() 148 verifyNoMoreInteractions(mMockTelephonyManager, mMockEapAkaTypeDataDecoder); in testProcessInvalidDecodeResult()
|
D | EapAkaPrimeTest.java | 52 protected TelephonyManager mMockTelephonyManager; field in EapAkaPrimeTest 60 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 67 doReturn(mMockTelephonyManager) in setUp()
|
D | EapAkaPrimeIdentityStateTest.java | 69 doReturn(IMSI).when(mMockTelephonyManager).getSubscriberId(); in testProcessIdentityRequest() 75 verify(mMockTelephonyManager).getSubscriberId(); in testProcessIdentityRequest() 76 verifyNoMoreInteractions(mMockTypeDataDecoder, mMockTelephonyManager); in testProcessIdentityRequest() 96 verifyNoMoreInteractions(mMockTelephonyManager, mMockTypeDataDecoder); in testProcessTransitionToChallengeState()
|
D | EapSimStartStateTest.java | 176 doReturn(IMSI).when(mMockTelephonyManager).getSubscriberId(); in testAddIdentityAttributeToResponse() 180 verify(mMockTelephonyManager).getSubscriberId(); in testAddIdentityAttributeToResponse() 182 verifyNoMoreInteractions(mMockTelephonyManager); in testAddIdentityAttributeToResponse() 197 doReturn(null).when(mMockTelephonyManager).getSubscriberId(); in testAddIdentityAttributeToResponseImsiUnavailable() 203 verify(mMockTelephonyManager).getSubscriberId(); in testAddIdentityAttributeToResponseImsiUnavailable() 204 verifyNoMoreInteractions(mMockTelephonyManager); in testAddIdentityAttributeToResponseImsiUnavailable() 213 verifyNoMoreInteractions(mMockTelephonyManager); in testAddIdentityAttributeToResponseNoIdRequest()
|
D | EapSimAkaMethodStateMachineTest.java | 214 private TelephonyManager mMockTelephonyManager; field in EapSimAkaMethodStateMachineTest 220 mMockTelephonyManager = mock(TelephonyManager.class); in setUp() 224 mMockTelephonyManager, in setUp() 327 when(mMockTelephonyManager in testProcessUiccAuthentication() 340 verify(mMockTelephonyManager) in testProcessUiccAuthentication() 345 verifyNoMoreInteractions(mMockTelephonyManager); in testProcessUiccAuthentication() 350 when(mMockTelephonyManager in testProcessUiccAuthenticationNullResponse() 365 verify(mMockTelephonyManager) in testProcessUiccAuthenticationNullResponse() 370 verifyNoMoreInteractions(mMockTelephonyManager); in testProcessUiccAuthenticationNullResponse() 761 mMockTelephonyManager, in buildEapAkaStateMachineWithKAut()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/datausage/ |
D | DataUsageSummaryPreferenceControllerTest.java | 85 private TelephonyManager mMockTelephonyManager; field in DataUsageSummaryPreferenceControllerTest 96 ExtendedMockito.when(TelephonyManager.from(mContext)).thenReturn(mMockTelephonyManager); in setUp() 97 when(mMockTelephonyManager.createForSubscriptionId(SUB_ID)) in setUp() 98 .thenReturn(mMockTelephonyManager); in setUp() 113 when(mMockTelephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_LOADED); in setUp() 151 when(mMockTelephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_UNKNOWN); in getAvailabilityStatus_noSim_isConditionallyUnavailable() 158 when(mMockTelephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_UNKNOWN); in getAvailabilityStatus_noSim_isConditionallyUnavailable_zoneWrite() 166 when(mMockTelephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_UNKNOWN); in getAvailabilityStatus_noSim_isConditionallyUnavailable_zoneRead() 174 when(mMockTelephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_UNKNOWN); in getAvailabilityStatus_noSim_isConditionallyUnavailable_zoneHidden()
|
/packages/modules/Telephony/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/ |
D | QnsTest.java | 57 @Mock protected TelephonyManager mMockTelephonyManager; field in QnsTest 142 .thenReturn(mMockTelephonyManager); in stubContext() 157 when(mMockTelephonyManager.createForSubscriptionId(anyInt())) in stubManagers() 158 .thenReturn(mMockTelephonyManager); in stubManagers() 159 when(mMockTelephonyManager.getSimCarrierId()).thenReturn(0); in stubManagers() 160 when(mMockTelephonyManager.getSimCountryIso()).thenReturn("ca"); in stubManagers()
|
/packages/apps/ImsServiceEntitlement/tests/unittests/src/com/android/imsserviceentitlement/ |
D | WfcActivationControllerTest.java | 66 @Mock private TelephonyManager mMockTelephonyManager; field in WfcActivationControllerTest 86 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mMockTelephonyManager); in setUp() 87 when(mMockTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn( in setUp() 88 mMockTelephonyManager); in setUp() 200 when(mMockTelephonyManager.getSimCarrierId()).thenReturn(CARRIER_ID); in finish_startFlowForActivate_writeLoggerPurposeActivation() 201 when(mMockTelephonyManager.getSimSpecificCarrierId()).thenReturn(CARRIER_ID); in finish_startFlowForActivate_writeLoggerPurposeActivation() 226 when(mMockTelephonyManager.getSimCarrierId()).thenReturn(CARRIER_ID); in finish_entitlementResultWfcEntitled_writeLoggerAppResultSuccessful() 227 when(mMockTelephonyManager.getSimSpecificCarrierId()).thenReturn(CARRIER_ID); in finish_entitlementResultWfcEntitled_writeLoggerAppResultSuccessful()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/ |
D | ResetNetworkConfirmFragmentTest.java | 95 private TelephonyManager mMockTelephonyManager; field in ResetNetworkConfirmFragmentTest 120 mMockTelephonyManager); in setUp() 121 when(mMockTelephonyManager.getSubscriberId(anyInt())).then(invocation -> { in setUp() 207 verify(mMockTelephonyManager).factoryReset(SubscriptionManager.INVALID_SUBSCRIPTION_ID); in testResetButtonClick_emptyNetworkSubscriptionId_telephonyNotReset() 214 verify(mMockTelephonyManager).factoryReset(123); in testResetButtonClick_validNetworkSubscriptionId_telephonyReset()
|
/packages/services/Iwlan/test/com/google/android/iwlan/epdg/ |
D | EpdgSelectorTest.java | 123 @Mock private TelephonyManager mMockTelephonyManager; field in EpdgSelectorTest 162 when(mMockTelephonyManager.getNetworkOperator()).thenReturn("311120"); in setUp() 165 .thenReturn(mMockTelephonyManager); in setUp() 167 when(mMockTelephonyManager.createForSubscriptionId(anyInt())) in setUp() 168 .thenReturn(mMockTelephonyManager); in setUp() 171 when(mMockTelephonyManager.getEquivalentHomePlmns()).thenReturn(ehplmnList); in setUp() 173 when(mMockTelephonyManager.getSimCountryIso()).thenReturn("ca"); in setUp() 306 when(mMockTelephonyManager.getNetworkOperator()).thenReturn("311121"); in testPlmnResolutionMethod() 357 when(mMockTelephonyManager.getNetworkOperator()).thenReturn("300121"); in testPlmnResolutionMethodWithDuplicatedImsiAndEhplmn() 394 when(mMockTelephonyManager.getNetworkOperator()).thenReturn("300"); in testPlmnResolutionMethodWithInvalidLengthPlmns() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarAudioPlaybackMonitorTest.java | 89 private TelephonyManager mMockTelephonyManager; field in CarAudioPlaybackMonitorTest 100 mCarAudioZones, mMockTelephonyManager); in setup() 107 mCarAudioZones, mMockTelephonyManager)); in construct_withNullCarAudioService_fails() 118 /* carAudioZones= */ null, mMockTelephonyManager)); in construct_withNullCarAudioZones_fails() 373 verify(mMockTelephonyManager).registerTelephonyCallback(any(), captor.capture()); in getCallStateListener()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/telephony/ |
D | BluetoothInCallServiceTest.java | 109 @Mock private TelephonyManager mMockTelephonyManager; field in BluetoothInCallServiceTest 237 when(mMockTelephonyManager.getNetworkOperatorName()).thenReturn("label1"); in testGetNetworkOperatorNoPhoneAccount() 238 mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager; in testGetNetworkOperatorNoPhoneAccount() 257 when(mMockTelephonyManager.getLine1Number()).thenReturn(fakeNumber); in testGetSubscriberNumberFallbackToTelephony() 258 mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager; in testGetSubscriberNumberFallbackToTelephony() 618 mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager; in testListCurrentCallsCallHandleChanged() 619 when(mMockTelephonyManager.getNetworkCountryIso()).thenReturn(""); in testListCurrentCallsCallHandleChanged() 952 mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager; in testListCurrentCallsConferenceEmptyChildrenInference() 953 when(mMockTelephonyManager.getNetworkCountryIso()).thenReturn(""); in testListCurrentCallsConferenceEmptyChildrenInference() 1697 mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager; in testGetBearerTechnology() [all …]
|