/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | TelephonyUtilTest.java | 58 TelephonyManager mTelephonyManager; field in TelephonyUtilTest 66 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mDataTelephonyManager); in setUp() 79 assertEquals(expectedIdentity, TelephonyUtil.getSimIdentity(mTelephonyManager, in getSimIdentityEapSim() 84 TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getSimIdentityEapSim() 100 TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getSimIdentityEapAka() 104 TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getSimIdentityEapAka() 120 TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getSimIdentityEapAkaPrime() 125 TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getSimIdentityEapAkaPrime() 162 TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getEncryptedIdentity_WithRfc4648() 195 assertNull(TelephonyUtil.getSimIdentity(mTelephonyManager, mTelephonyUtil, in getEncryptedIdentityFailed() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/ |
D | DataUsageControllerTest.java | 59 private TelephonyManager mTelephonyManager; field in DataUsageControllerTest 77 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); in setUp() 78 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 88 doReturn(SUB_ID).when(mTelephonyManager).getSubscriberId(); in setUp() 148 doReturn(SUB_ID_2).when(mTelephonyManager).getSubscriberId(); in getDataUsageInfo_hasUsageData_shouldReturnCorrectUsageForExplicitSubId() 162 when(mTelephonyManager.createForSubscriptionId(eq(explicitSubId))).thenReturn(tmForSub1); in getTelephonyManager_shouldCreateWithExplicitSubId() 168 verify(mTelephonyManager).createForSubscriptionId(eq(explicitSubId)); in getTelephonyManager_shouldCreateWithExplicitSubId() 175 when(mTelephonyManager.createForSubscriptionId(mDefaultSubscriptionId)) in getTelephonyManager_noExplicitSubId_shouldCreateWithDefaultDataSubId() 180 verify(mTelephonyManager).createForSubscriptionId(mDefaultSubscriptionId); in getTelephonyManager_noExplicitSubId_shouldCreateWithDefaultDataSubId() 192 when(mTelephonyManager.createForSubscriptionId(activeSubId)) in getTelephonyManager_noExplicitSubIdOrDefaultSub_shouldCreateWithActiveSub() [all …]
|
D | DataUsageUtilsTest.java | 52 private TelephonyManager mTelephonyManager; field in DataUsageUtilsTest 69 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 71 when(mTelephonyManager.getSubscriberId(SUB_ID)).thenReturn(SUBSCRIBER_ID); in setUp() 72 when(mTelephonyManager.getSubscriberId(SUB_ID_2)).thenReturn(SUBSCRIBER_ID_2); in setUp() 73 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); in setUp() 90 when(mTelephonyManager.getMergedSubscriberIdsFromGroup()) in getMobileTemplate_groupUuidNull_returnMobileAll() 102 when(mTelephonyManager.getMergedSubscriberIdsFromGroup()) in getMobileTemplate_groupUuidExist_returnMobileMerged()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | CarrierAppUtilsTest.java | 64 @Mock private TelephonyManager mTelephonyManager; field in CarrierAppUtilsTest 86 mTelephonyManager, mContentResolver, USER_ID, new ArraySet<>(), in testDisableCarrierAppsUntilPrivileged_EmptyList() 88 Mockito.verifyNoMoreInteractions(mPackageManager, mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_EmptyList() 102 mTelephonyManager, mContentResolver, USER_ID, in testDisableCarrierAppsUntilPrivileged_MissingApp() 111 Mockito.verifyNoMoreInteractions(mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_MissingApp() 123 mTelephonyManager, mContentResolver, USER_ID, CARRIER_APPS, ASSOCIATED_APPS); in testDisableCarrierAppsUntilPrivileged_NonSystemApp() 131 Mockito.verifyNoMoreInteractions(mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_NonSystemApp() 153 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() 156 mTelephonyManager, mContentResolver, USER_ID, CARRIER_APPS, ASSOCIATED_APPS); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() 180 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled() [all …]
|
D | VisualVoicemailSmsFilterTest.java | 82 private TelephonyManager mTelephonyManager; field in VisualVoicemailSmsFilterTest 88 mTelephonyManager = Mockito.mock(TelephonyManager.class); in setUp() 92 .thenReturn(mTelephonyManager); in setUp() 132 when(mTelephonyManager.getSimOperator(anyInt())) in testFilterNotSet_matchesVvmPattern_filtered() 200 when(mTelephonyManager.getActiveVisualVoicemailSmsFilterSettings(anyInt())) in setSettings()
|
D | SmsNumberUtilsTest.java | 121 doReturn(TMO_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in setUp() 147 doReturn(TelephonyManager.PHONE_TYPE_CDMA).when(mTelephonyManager).getPhoneType(); in testNaPcCountryCodeAreaLocalNumberConversion() 164 doReturn(INDIA_AIRTEL_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testIndiaPcCountryCodeAreaLocalNumberConversion() 189 doReturn(TAIWAN_FET_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testLocalIddCountryCodeAreaLocalNumberConversion() 198 doReturn(INDIA_AIRTEL_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testIndiaLocalIddCountryCodeAreaLocalNumberConversion() 207 doReturn(JAPAN_NTTDOCOMO_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testJapanLocalIddCountryCodeAreaLocalNumberConversion()
|
D | CarrierResolverTest.java | 117 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierMatch() 135 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testMnoCarrierId() 145 doReturn(MCCMNC_VODAFONE).when(mTelephonyManager) in testMnoCarrierId() 159 doReturn(MCCMNC_TRACFONE_ATT).when(mTelephonyManager) in testPreciseCarrierId() 173 doReturn(MCCMNC_TRACFONE_TMO).when(mTelephonyManager) in testPreciseCarrierId() 180 doReturn(MCCMNC_O2).when(mTelephonyManager) in testPreciseCarrierId() 187 doReturn(MCCMNC_O2).when(mTelephonyManager) in testPreciseCarrierId() 200 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierMatchSimAbsent() 219 doReturn("12345").when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierNoMatch() 253 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierMatchPreferApnChange()
|
D | CarrierServiceBindHelperTest.java | 41 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in setUp() 61 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in testMultiSimConfigChanged() 73 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in testMultiSimConfigChanged()
|
D | SubscriptionControllerTest.java | 98 doReturn(SINGLE_SIM).when(mTelephonyManager).getSimCount(); in setUp() 99 doReturn(SINGLE_SIM).when(mTelephonyManager).getPhoneCount(); in setUp() 661 doReturn(10).when(mTelephonyManager).getSimCount(); in makeThisDeviceMultiSimCapable() 720 doReturn(true).when(mTelephonyManager).hasCarrierPrivileges(1); in testCreateSubscriptionGroupWithCarrierPrivilegePermission() 729 doReturn(true).when(mTelephonyManager).hasCarrierPrivileges(2); in testCreateSubscriptionGroupWithCarrierPrivilegePermission() 773 doReturn(true).when(mTelephonyManager).hasCarrierPrivileges(1); in testAddSubscriptionIntoGroupWithCarrierPrivilegePermission() 787 doReturn(false).when(mTelephonyManager).hasCarrierPrivileges(1); in testAddSubscriptionIntoGroupWithCarrierPrivilegePermission() 788 doReturn(true).when(mTelephonyManager).hasCarrierPrivileges(2); in testAddSubscriptionIntoGroupWithCarrierPrivilegePermission() 799 doReturn(true).when(mTelephonyManager).hasCarrierPrivileges(1); in testAddSubscriptionIntoGroupWithCarrierPrivilegePermission() 824 doReturn(true).when(mTelephonyManager).hasCarrierPrivileges(1); in testUpdateSubscriptionGroupWithCarrierPrivilegePermission() [all …]
|
D | SubscriptionInfoUpdaterTest.java | 136 doReturn(1).when(mTelephonyManager).getSimCount(); in setUp() 137 doReturn(1).when(mTelephonyManager).getPhoneCount(); in setUp() 138 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in setUp() 370 doReturn(FAKE_MCC_MNC_1).when(mTelephonyManager).getSimOperatorNumeric(FAKE_SUB_ID_1); in loadSim() 410 verify(mTelephonyManager).getSimOperatorNumeric(FAKE_SUB_ID_1); in testSimLoaded() 447 doReturn("").when(mTelephonyManager).getSimOperatorNumeric(FAKE_SUB_ID_1); in testSimLoadedEmptyOperatorNumeric() 457 verify(mTelephonyManager).getSimOperatorNumeric(FAKE_SUB_ID_1); in testSimLoadedEmptyOperatorNumeric() 512 doReturn(2).when(mTelephonyManager).getPhoneCount(); in testDualSimLoaded() 513 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in testDualSimLoaded() 516 doReturn(FAKE_MCC_MNC_1).when(mTelephonyManager).getSimOperatorNumeric(eq(FAKE_SUB_ID_1)); in testDualSimLoaded() [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | SIMAccessor.java | 11 private final TelephonyManager mTelephonyManager; field in SIMAccessor 16 mTelephonyManager = TelephonyManager.from(context); in SIMAccessor() 27 String imsi = mTelephonyManager.getSubscriberId(subId); in getMatchingImsis()
|
D | CarrierNetworkEvaluator.java | 55 private TelephonyManager mTelephonyManager; field in CarrierNetworkEvaluator 67 if (mTelephonyManager == null) { in getTelephonyManager() 68 mTelephonyManager = mWifiInjector.makeTelephonyManager(); in getTelephonyManager() 70 return mTelephonyManager; in getTelephonyManager()
|
/frameworks/base/tests/net/java/com/android/server/net/ |
D | NetworkStatsSubscriptionsMonitorTest.java | 68 @Mock private TelephonyManager mTelephonyManager; field in NetworkStatsSubscriptionsMonitorTest 80 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); in setUp() 85 .thenReturn(mTelephonyManager); in setUp() 134 when(mTelephonyManager.getSubscriberId(subId)).thenReturn(subscriberId); in addTestSub() 176 verify(mTelephonyManager, times(2)).listen(ratTypeListenerCaptor.capture(), in testSubChangedAndRatTypeChanged() 203 verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_NONE)); in testSubChangedAndRatTypeChanged() 217 verify(mTelephonyManager, times(2)).listen(any(), eq(PhoneStateListener.LISTEN_NONE)); in testSubChangedAndRatTypeChanged() 231 verify(mTelephonyManager, times(1)).listen(ratTypeListenerCaptor.capture(), in test5g()
|
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/ |
D | TrackerService.java | 68 private TelephonyManager mTelephonyManager; field in TrackerService 143 mTelephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); in initLocationListeners() 147 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_LOCATION); in initLocationListeners() 161 mTelephonyManager.listen(mPhoneStateListener, in initLocationListeners() 251 if (mTelephonyManager != null) { in stopListeners() 252 mTelephonyManager.listen(mPhoneStateListener, 0); in stopListeners() 370 if (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) { 373 } else if (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | ComprehensiveCountryDetector.java | 77 private final TelephonyManager mTelephonyManager; field in ComprehensiveCountryDetector 145 mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); in ComprehensiveCountryDetector() 213 final int phoneType = mTelephonyManager.getPhoneType(); in isNetworkCountryCodeAvailable() 224 countryIso = mTelephonyManager.getNetworkCountryIso(); in getNetworkBasedCountry() 244 countryIso = mTelephonyManager.getSimCountryIso(); in getSimBasedCountry() 451 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE); in addPhoneStateListener() 457 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); in removePhoneStateListener()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/emergency/ |
D | EmergencyAffordanceServiceTest.java | 80 @Mock private TelephonyManager mTelephonyManager; field in EmergencyAffordanceServiceTest 109 return mTelephonyManager; in getSystemService() 398 doReturn(voiceCapable).when(mTelephonyManager).isVoiceCapable(); in setUpVoiceCapable() 417 doReturn(ACTIVE_MODEM_COUNT).when(mTelephonyManager).getActiveModemCount(); in setUpCell() 418 doReturn(NON_EMERGENCY_ISO_CODE).when(mTelephonyManager).getNetworkCountryIso(0); in setUpCell() 420 .when(mTelephonyManager).getNetworkCountryIso(1); in setUpCell() 425 .when(mTelephonyManager).getNetworkCountryIso(1); in resetCell()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/vendor/dataconnection/ |
D | VendorDataResetEventTracker.java | 56 private TelephonyManager mTelephonyManager = null; field in VendorDataResetEventTracker 114 mTelephonyManager = (TelephonyManager) mContext in VendorDataResetEventTracker() 162 mTelephonyManager. in startResetEventTracker() 176 mTelephonyManager.listen(mPhoneStateListener, in stopResetEventTracker() 192 mTelephonyManager = null; in dispose()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ims/ |
D | ImsManagerTest.java | 335 doReturn(true).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcSetting_true_shouldSetWfcModeWrtRoamingState() 348 doReturn(false).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcSetting_true_shouldSetWfcModeWrtRoamingState() 362 doReturn(false).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcSetting_true_shouldSetWfcModeWrtRoamingState() 392 doReturn(false).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcSetting_shouldSetWfcModeRoamingDisabledUserEnabled() 428 doReturn(true).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcSetting_shouldSetWfcModeRoamingEnabledUserEnabled() 456 doReturn(false).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcMode_shouldSetWfcModeRoamingDisabled() 501 doReturn(true).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcMode_wfcEnabledShouldSetWfcModeRoamingEnabled() 548 doReturn(true).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcMode_WfcDisabledShouldNotSetWfcModeRoamingEnabled() 592 doReturn(false).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcMode_shouldSetWfcModeRoamingDisabledUserEnabled() 627 doReturn(true).when(mTelephonyManager).isNetworkRoaming(eq(mSubId[0])); in testSetWfcMode_shouldSetWfcModeRoamingEnabledUserDisabled() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | SystemInfoTest.java | 42 @Mock TelephonyManager mTelephonyManager; field in SystemInfoTest 53 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); in setUp() 54 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mDataTelephonyManager); in setUp()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/ |
D | SystemInfo.java | 40 private final TelephonyManager mTelephonyManager; field in SystemInfo 47 mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); in SystemInfo() 103 TelephonyManager defaultDataTm = mTelephonyManager.createForSubscriptionId( in getDeviceId()
|
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/ |
D | DataIdleTest.java | 38 private TelephonyManager mTelephonyManager; field in DataIdleTest 49 mTelephonyManager = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE); in setUp() 64 String subscriberId = mTelephonyManager.getSubscriberId(); in testMobile()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | CellularLinkLayerStatsCollectorTest.java | 78 @Mock TelephonyManager mTelephonyManager; field in CellularLinkLayerStatsCollectorTest 85 .thenReturn(mTelephonyManager); in setUp() 88 when(mTelephonyManager.createForSubscriptionId(anyInt())) in setUp() 89 .thenReturn(mTelephonyManager); in setUp() 181 when(mTelephonyManager.getSignalStrength()).thenReturn(ss); in testCollectorUpdate() 182 when(mTelephonyManager.getAllCellInfo()).thenReturn(allList); in testCollectorUpdate() 183 when(mTelephonyManager.getDataNetworkType()).thenReturn(networkType); in testCollectorUpdate()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/ |
D | DataEnabledSettings.java | 130 private TelephonyManager mTelephonyManager; field in DataEnabledSettings 153 mTelephonyManager.listen(mPhoneStateListener, LISTEN_NONE); in updatePhoneStateListener() 155 mTelephonyManager = mTelephonyManager.createForSubscriptionId(mSubId); in updatePhoneStateListener() 157 mTelephonyManager.listen(mPhoneStateListener, LISTEN_CALL_STATE); in updatePhoneStateListener() 185 mTelephonyManager = (TelephonyManager) mPhone.getContext() in DataEnabledSettings()
|
/frameworks/base/services/core/java/com/android/server/emergency/ |
D | EmergencyAffordanceService.java | 75 private TelephonyManager mTelephonyManager; field in EmergencyAffordanceService 181 mTelephonyManager = mContext.getSystemService(TelephonyManager.class); in handleThirdPartyBootPhase() 182 mVoiceCapable = mTelephonyManager.isVoiceCapable(); in handleThirdPartyBootPhase() 247 final int activeModems = mTelephonyManager.getActiveModemCount(); in updateNetworkCountry() 249 String countryIso = mTelephonyManager.getNetworkCountryIso(i); in updateNetworkCountry()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
D | KeyguardHostView.java | 55 private TelephonyManager mTelephonyManager = null; field in KeyguardHostView 333 if (mTelephonyManager == null) { in interceptMediaKey() 334 mTelephonyManager = (TelephonyManager) getContext().getSystemService( in interceptMediaKey() 337 if (mTelephonyManager != null && in interceptMediaKey() 338 mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) { in interceptMediaKey()
|