/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/telephony/ |
D | TelephonyListenerManagerTest.java | 48 private TelephonyManager mTelephonyManager; field in TelephonyListenerManagerTest 59 mTelephonyManager, mExecutor, mTelephonyCallback); in setUp() 70 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_ActiveDataSubscriptionIdListener() 82 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_CallStateListener() 94 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_ServiceStateListener() 108 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_mixed() 119 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_ActiveDataSubscriptionIdListener() 121 reset(mTelephonyManager); in testRemoveListenerUnregisters_ActiveDataSubscriptionIdListener() 128 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_ActiveDataSubscriptionIdListener() 139 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_CallStateListener() [all …]
|
/frameworks/base/services/core/java/com/android/server/location/injector/ |
D | SystemEmergencyHelper.java | 46 TelephonyManager mTelephonyManager; field in SystemEmergencyHelper 57 if (mTelephonyManager != null) { in onSystemReady() 61 mTelephonyManager = Objects.requireNonNull( in onSystemReady() 66 mTelephonyManager.registerTelephonyCallback(FgThread.getExecutor(), in onSystemReady() 77 mIsInEmergencyCall = mTelephonyManager.isEmergencyNumber( in onSystemReady() 102 if (mTelephonyManager == null) { in isInEmergency() 112 || mTelephonyManager.getEmergencyCallbackMode() in isInEmergency() 113 || mTelephonyManager.isInEmergencySmsMode(); in isInEmergency() 119 emergencyCallbackMode = mTelephonyManager.getEmergencyCallbackMode(); in isInEmergency() 122 emergencySmsMode = mTelephonyManager.isInEmergencySmsMode(); in isInEmergency()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | CarrierServiceBindHelperTest.java | 51 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in setUp() 71 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in testMultiSimConfigChanged() 83 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in testMultiSimConfigChanged() 107 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in testCarrierPrivilegesCallbackRegistration() 115 verify(mTelephonyManager).registerCarrierPrivilegesCallback(eq(PHONE_ID_0), any(), in testCarrierPrivilegesCallbackRegistration() 122 verify(mTelephonyManager).registerCarrierPrivilegesCallback(eq(PHONE_ID_1), any(), in testCarrierPrivilegesCallbackRegistration() 128 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in testCarrierPrivilegesCallbackRegistration() 133 verify(mTelephonyManager).unregisterCarrierPrivilegesCallback(eq(phone1Callback)); in testCarrierPrivilegesCallbackRegistration() 134 verify(mTelephonyManager, never()).unregisterCarrierPrivilegesCallback(eq(phone0Callback)); in testCarrierPrivilegesCallbackRegistration()
|
D | CarrierAppUtilsTest.java | 72 private TelephonyManager mTelephonyManager; field in CarrierAppUtilsTest 95 mTelephonyManager = Mockito.mock(TelephonyManager.class); in setUp() 122 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mTelephonyManager, in testDisableCarrierAppsUntilPrivileged_EmptyList() 125 Mockito.verifyNoMoreInteractions(mPackageManager, mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_EmptyList() 138 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mTelephonyManager, in testDisableCarrierAppsUntilPrivileged_MissingApp() 150 Mockito.verifyNoMoreInteractions(mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_MissingApp() 162 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mTelephonyManager, in testDisableCarrierAppsUntilPrivileged_NonSystemApp() 173 Mockito.verifyNoMoreInteractions(mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_NonSystemApp() 193 Mockito.when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(CARRIER_APP)) in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() 196 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mTelephonyManager, in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() [all …]
|
D | VisualVoicemailSmsFilterTest.java | 84 private TelephonyManager mTelephonyManager; field in VisualVoicemailSmsFilterTest 90 mTelephonyManager = Mockito.mock(TelephonyManager.class); in setUp() 94 .thenReturn(mTelephonyManager); in setUp() 111 mTelephonyManager = null; in tearDown() 136 when(mTelephonyManager.getSimOperator(anyInt())) in testFilterNotSet_matchesVvmPattern_filtered() 204 when(mTelephonyManager.getActiveVisualVoicemailSmsFilterSettings(anyInt())) in setSettings()
|
D | SmsNumberUtilsTest.java | 122 doReturn(TMO_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in setUp() 149 doReturn(TelephonyManager.PHONE_TYPE_CDMA).when(mTelephonyManager).getPhoneType(); in testNaPcCountryCodeAreaLocalNumberConversion() 166 doReturn(INDIA_AIRTEL_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testIndiaPcCountryCodeAreaLocalNumberConversion() 191 doReturn(TAIWAN_FET_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testLocalIddCountryCodeAreaLocalNumberConversion() 200 doReturn(INDIA_AIRTEL_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testIndiaLocalIddCountryCodeAreaLocalNumberConversion() 209 doReturn(JAPAN_NTTDOCOMO_MCC_MNC).when(mTelephonyManager).getNetworkOperator(); in testJapanLocalIddCountryCodeAreaLocalNumberConversion()
|
D | CarrierResolverTest.java | 119 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierMatch() 137 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testMnoCarrierId() 147 doReturn(MCCMNC_VODAFONE).when(mTelephonyManager) in testMnoCarrierId() 161 doReturn(MCCMNC_TRACFONE_ATT).when(mTelephonyManager) in testPreciseCarrierId() 175 doReturn(MCCMNC_TRACFONE_TMO).when(mTelephonyManager) in testPreciseCarrierId() 182 doReturn(MCCMNC_O2).when(mTelephonyManager) in testPreciseCarrierId() 189 doReturn(MCCMNC_O2).when(mTelephonyManager) in testPreciseCarrierId() 202 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierMatchSimAbsent() 221 doReturn("12345").when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierNoMatch() 255 doReturn(MCCMNC).when(mTelephonyManager).getSimOperatorNumericForPhone(eq(phoneId)); in testCarrierMatchPreferApnChange()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/ |
D | DataUsageControllerTest.java | 54 private TelephonyManager mTelephonyManager; field in DataUsageControllerTest 71 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); in setUp() 72 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 78 doReturn(SUB_ID).when(mTelephonyManager).getSubscriberId(); in setUp() 142 doReturn(SUB_ID_2).when(mTelephonyManager).getSubscriberId(); in getDataUsageInfo_hasUsageData_shouldReturnCorrectUsageForExplicitSubId() 156 when(mTelephonyManager.createForSubscriptionId(eq(explicitSubId))).thenReturn(tmForSub1); in getTelephonyManager_shouldCreateWithExplicitSubId() 162 verify(mTelephonyManager).createForSubscriptionId(eq(explicitSubId)); in getTelephonyManager_shouldCreateWithExplicitSubId() 169 when(mTelephonyManager.createForSubscriptionId(mDefaultSubscriptionId)) in getTelephonyManager_noExplicitSubId_shouldCreateWithDefaultDataSubId() 174 verify(mTelephonyManager).createForSubscriptionId(mDefaultSubscriptionId); in getTelephonyManager_noExplicitSubId_shouldCreateWithDefaultDataSubId() 186 when(mTelephonyManager.createForSubscriptionId(activeSubId)) in getTelephonyManager_noExplicitSubIdOrDefaultSub_shouldCreateWithActiveSub() [all …]
|
/frameworks/base/location/java/com/android/internal/location/ |
D | GpsNetInitiatedHandler.java | 46 private final TelephonyManager mTelephonyManager; field in GpsNetInitiatedHandler 108 mTelephonyManager = in GpsNetInitiatedHandler() 110 mTelephonyManager.registerTelephonyCallback(mContext.getMainExecutor(), in GpsNetInitiatedHandler() 148 isInEmergencyCallback = mTelephonyManager.getEmergencyCallbackMode(); in getInEmergency() 149 isInEmergencySmsMode = mTelephonyManager.isInEmergencySmsMode(); in getInEmergency() 153 isInEmergencyCallback = mTelephonyManager.getEmergencyCallbackMode(); in getInEmergency() 156 isInEmergencySmsMode = mTelephonyManager.isInEmergencySmsMode(); in getInEmergency()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/connectivity/ |
D | ConnectivitySubsystemsRecoveryManager.java | 49 private TelephonyManager mTelephonyManager = null; field in ConnectivitySubsystemsRecoveryManager 108 mTelephonyManager = mContext.getSystemService(TelephonyManager.class); in ConnectivitySubsystemsRecoveryManager() 109 if (mTelephonyManager == null) { in ConnectivitySubsystemsRecoveryManager() 214 if (mTelephonyManager == null) return; in startTrackingTelephonyRestart() 215 mTelephonyManager.registerTelephonyCallback(new HandlerExecutor(mHandler), in startTrackingTelephonyRestart() 221 if (mTelephonyManager == null) return; in stopTrackingTelephonyRestart() 222 mTelephonyManager.unregisterTelephonyCallback(mTelephonyCallback); in stopTrackingTelephonyRestart() 284 if (mTelephonyManager != null && !isApmEnabled()) { in triggerSubsystemRestart() 285 if (mTelephonyManager.rebootRadio()) { in triggerSubsystemRestart()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/telephony/ |
D | TelephonyListenerManager.java | 43 private final TelephonyManager mTelephonyManager; field in TelephonyListenerManager 54 mTelephonyManager = telephonyManager; in TelephonyListenerManager() 99 mTelephonyManager.registerTelephonyCallback(mExecutor, mTelephonyCallback); in updateListening() 101 mTelephonyManager.unregisterTelephonyCallback(mTelephonyCallback); in updateListening()
|
/frameworks/base/tests/vcn/java/com/android/server/vcn/ |
D | TelephonySubscriptionTrackerTest.java | 144 @NonNull private final TelephonyManager mTelephonyManager; field in TelephonySubscriptionTrackerTest 159 mTelephonyManager = mock(TelephonyManager.class); in TelephonySubscriptionTrackerTest() 166 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in TelephonySubscriptionTrackerTest() 197 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in setUp() 215 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(anyInt()); in setUp() 237 verify(mTelephonyManager, atLeastOnce()) in getCarrierPrivilegesCallbacks() 246 verify(mTelephonyManager).registerTelephonyCallback(any(), captor.capture()); in getActiveDataSubscriptionIdListener() 304 doReturn(privilegedPackages).when(mTelephonyManager).getPackagesWithCarrierPrivileges(); in setPrivilegedPackagesForMock() 325 verify(mTelephonyManager, times(2)) in testRegister() 327 verify(mTelephonyManager) in testRegister() [all …]
|
D | VcnTest.java | 92 private TelephonyManager mTelephonyManager; field in VcnTest 110 mTelephonyManager = in setUp() 214 verify(mTelephonyManager, times(3)) in testMobileDataStateListenersRegistered() 222 verify(mTelephonyManager).isDataEnabled(); in testMobileDataStateCheckedOnInitialization_enabled() 240 verify(mTelephonyManager).isDataEnabled(); in testMobileDataStateCheckedOnInitialization_disabled() 266 doReturn(false).when(mTelephonyManager).isDataEnabled(); in testSubscriptionSnapshotUpdatesMobileDataState() 286 verify(mTelephonyManager, times(4)) in testSubscriptionSnapshotUpdatesMobileDataStateListeners() 288 verify(mTelephonyManager, times(2)) in testSubscriptionSnapshotUpdatesMobileDataStateListeners() 474 doReturn(endingToggleState).when(mTelephonyManager).isDataEnabled(); in verifyGlobalMobileDataToggled() 515 verify(mTelephonyManager, times(3)).registerTelephonyCallback(any(), captor.capture()); in verifySubscriptionMobileDataToggled() [all …]
|
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger/ |
D | PhoneCallStateHandler.java | 56 private final TelephonyManager mTelephonyManager; field in PhoneCallStateHandler 67 mTelephonyManager = Objects.requireNonNull(telephonyManager); in PhoneCallStateHandler() 127 mTelephonyManager in checkCallStatus() 136 return isCallOngoingFromState(mTelephonyManager in checkCallStatus() 157 .map(s -> mTelephonyManager.createForSubscriptionId(s.getSubscriptionId()))
|
/frameworks/base/tests/vcn/java/com/android/server/vcn/routeselection/ |
D | NetworkEvaluationTestBase.java | 112 @Mock protected TelephonyManager mTelephonyManager; field in NetworkEvaluationTestBase 150 mContext, mTelephonyManager, Context.TELEPHONY_SERVICE, TelephonyManager.class); in setUp() 151 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 152 when(mTelephonyManager.getNetworkOperator()).thenReturn(PLMN_ID); in setUp() 153 when(mTelephonyManager.getSimSpecificCarrierId()).thenReturn(CARRIER_ID); in setUp()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/emergencynumber/ |
D | EmergencyNumberUtilsTest.java | 65 private TelephonyManager mTelephonyManager; field in EmergencyNumberUtilsTest 94 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in getDefaultPoliceNumber_hasTelephony_shouldLoadFromTelephony() 105 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in getPoliceNumber_hasUserOverride_shouldLoadFromUserOverride() 120 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in getPoliceNumber_noUserOverride_shouldLoadFromTelephony() 131 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in getPoliceNumber_hasCarrierPrefix_shouldRemovePrefix() 153 when(mTelephonyManager.getEmergencyNumberList(anyInt())).thenReturn(numbers); in addEmergencyNumberToTelephony()
|
/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/ |
D | Ts43AuthenticationTest.java | 105 private TelephonyManager mTelephonyManager; field in Ts43AuthenticationTest 120 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in setUp() 121 doReturn(IMEI).when(mTelephonyManager).getImei(0); in setUp() 122 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(anyInt()); in setUp() 125 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | OperatorNameViewController.java | 47 private final TelephonyManager mTelephonyManager; field in OperatorNameViewController 68 mTelephonyManager = telephonyManager; in OperatorNameViewController() 103 mTelephonyManager.isDataCapable(), in update() 124 private final TelephonyManager mTelephonyManager; field in OperatorNameViewController.Factory 142 mTelephonyManager = telephonyManager; in Factory() 155 mTelephonyManager, in create()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/ |
D | DataConnectionStateTracker.java | 203 private TelephonyManager mTelephonyManager = null; field in DataConnectionStateTracker.TelephonyListenerImpl 213 mTelephonyManager = tm; in register() 214 mTelephonyManager.registerTelephonyCallback(mExecutor, this); in register() 218 if (mTelephonyManager != null) { in unregister() 219 mTelephonyManager.unregisterTelephonyCallback(this); in unregister() 220 mTelephonyManager = null; in unregister()
|
/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/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/tests/DataIdleTest/src/com/android/tests/dataidle/ |
D | DataIdleTest.java | 37 private TelephonyManager mTelephonyManager; field in DataIdleTest 47 mTelephonyManager = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE); in setUp() 64 final String subscriberId = mTelephonyManager.getSubscriberId(); in testMobile()
|
/frameworks/base/services/core/java/com/android/server/location/countrydetector/ |
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() 458 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE); in addPhoneStateListener() 464 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); in removePhoneStateListener()
|
/frameworks/base/services/core/java/com/android/server/vcn/ |
D | TelephonySubscriptionTracker.java | 90 @NonNull private final TelephonyManager mTelephonyManager; field in TelephonySubscriptionTracker 133 mTelephonyManager = mContext.getSystemService(TelephonyManager.class); in TelephonySubscriptionTracker() 160 mTelephonyManager.registerTelephonyCallback(executor, mActiveDataSubIdListener); in register() 171 final int modemCount = mTelephonyManager.getActiveModemCount(); in registerCarrierPrivilegesCallbacks() 187 mTelephonyManager.registerCarrierPrivilegesCallback( in registerCarrierPrivilegesCallbacks() 204 mTelephonyManager.unregisterTelephonyCallback(mActiveDataSubIdListener); in unregister() 216 mTelephonyManager.unregisterCarrierPrivilegesCallback(carrierPrivilegesCallback); in unregisterCarrierPrivilegesCallbacks() 256 mTelephonyManager.createForSubscriptionId(subInfo.getSubscriptionId()); in handleSubscriptionsChanged() 305 final int modemCount = mTelephonyManager.getActiveModemCount(); in handleActionMultiSimConfigChanged()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/ |
D | InternetDialogController.java | 169 private TelephonyManager mTelephonyManager; field in InternetDialogController 266 mTelephonyManager = telephonyManager; in InternetDialogController() 311 mTelephonyManager = mTelephonyManager.createForSubscriptionId(mDefaultDataSubId); in onStart() 312 mSubIdTelephonyManagerMap.put(mDefaultDataSubId, mTelephonyManager); in onStart() 316 mTelephonyManager.registerTelephonyCallback(mExecutor, telephonyCallback); in onStart() 494 if (mTelephonyManager == null) { in getSignalStrengthDrawable() 527 TelephonyManager tm = mSubIdTelephonyManagerMap.getOrDefault(subId, mTelephonyManager); in getSignalStrengthDrawableWithLevel() 675 TelephonyManager secondaryTm = mTelephonyManager.createForSubscriptionId(subId); 896 return mTelephonyManager; 907 if (isAirplaneModeEnabled() || mTelephonyManager == null) { [all …]
|