Home
last modified time | relevance | path

Searched refs:ServiceState (Results 1 – 25 of 121) sorted by relevance

12345

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DServiceStateTest.java24 import android.telephony.ServiceState;
38 ServiceState ss = new ServiceState(); in testRoaming()
61 ss.setDataRoamingType(ServiceState.ROAMING_TYPE_DOMESTIC); in testRoaming()
63 assertEquals(ServiceState.ROAMING_TYPE_DOMESTIC, ss.getDataRoamingType()); in testRoaming()
65 ss.setVoiceRoamingType(ServiceState.ROAMING_TYPE_DOMESTIC); in testRoaming()
67 assertEquals(ServiceState.ROAMING_TYPE_DOMESTIC, ss.getVoiceRoamingType()); in testRoaming()
72 ServiceState ss = new ServiceState(); in testRegState()
74 ss.setDataRegState(ServiceState.STATE_IN_SERVICE); in testRegState()
75 assertEquals(ServiceState.STATE_IN_SERVICE, ss.getDataRegState()); in testRegState()
77 ss.setVoiceRegState(ServiceState.STATE_IN_SERVICE); in testRegState()
[all …]
DPhoneStateListenerExecutorTest.java25 import android.telephony.ServiceState;
57 public void onServiceStateChanged(ServiceState serviceState) { in setUp()
88 ServiceState ss = new ServiceState(); in testTriggerServiceStateChanged()
89 ss.setDataRegState(ServiceState.STATE_IN_SERVICE); in testTriggerServiceStateChanged()
90 ss.setVoiceRegState(ServiceState.STATE_EMERGENCY_ONLY); in testTriggerServiceStateChanged()
94 verify(mServiceState).setDataRegState(ServiceState.STATE_IN_SERVICE); in testTriggerServiceStateChanged()
95 verify(mServiceState).setVoiceRegState(ServiceState.STATE_EMERGENCY_ONLY); in testTriggerServiceStateChanged()
DPhoneStateListenerTest.java26 import android.telephony.ServiceState;
53 public void onServiceStateChanged(ServiceState serviceState) { in onLooperPrepared()
98 ServiceState ss = new ServiceState(); in testTriggerServiceStateChanged()
99 ss.setDataRegState(ServiceState.STATE_IN_SERVICE); in testTriggerServiceStateChanged()
100 ss.setVoiceRegState(ServiceState.STATE_EMERGENCY_ONLY); in testTriggerServiceStateChanged()
106 verify(mServiceState).setDataRegState(ServiceState.STATE_IN_SERVICE); in testTriggerServiceStateChanged()
107 verify(mServiceState).setVoiceRegState(ServiceState.STATE_EMERGENCY_ONLY); in testTriggerServiceStateChanged()
DCallManagerTest.java38 import android.telephony.ServiceState;
102 doReturn(ServiceState.STATE_IN_SERVICE).when(mServiceState).getState(); in setUp()
271 ServiceState mSecondServiceState = mock(ServiceState.class); in testGetServiceState()
282 doReturn(ServiceState.STATE_OUT_OF_SERVICE).when(mSecondServiceState).getState(); in testGetServiceState()
283 assertEquals(ServiceState.STATE_IN_SERVICE, CallManager.getInstance().getServiceState()); in testGetServiceState()
286 doReturn(ServiceState.STATE_EMERGENCY_ONLY).when(mSecondServiceState).getState(); in testGetServiceState()
287 assertEquals(ServiceState.STATE_IN_SERVICE, CallManager.getInstance().getServiceState()); in testGetServiceState()
290 doReturn(ServiceState.STATE_POWER_OFF).when(mSecondServiceState).getState(); in testGetServiceState()
291 assertEquals(ServiceState.STATE_IN_SERVICE, CallManager.getInstance().getServiceState()); in testGetServiceState()
294 doReturn(ServiceState.STATE_OUT_OF_SERVICE).when(mSecondServiceState).getState(); in testGetServiceState()
[all …]
DLocaleTrackerTest.java37 import android.telephony.ServiceState;
112 ServiceState ss = new ServiceState(); in sendServiceState()
161 sendServiceState(ServiceState.STATE_EMERGENCY_ONLY); in testNoSim()
171 sendServiceState(ServiceState.STATE_POWER_OFF); in testBootupInAirplaneModeOn()
180 sendServiceState(ServiceState.STATE_IN_SERVICE); in testToggleAirplaneModeOn()
191 sendServiceState(ServiceState.STATE_POWER_OFF); in testToggleAirplaneModeOn()
198 sendServiceState(ServiceState.STATE_POWER_OFF); in testToggleAirplaneModeOff()
205 sendServiceState(ServiceState.STATE_OUT_OF_SERVICE); in testToggleAirplaneModeOff()
DServiceStateTrackerTest.java83 import android.telephony.ServiceState;
233 doReturn(new ServiceState()).when(mPhone).getServiceState(); in setUp()
248 mSimulatedCommands.setVoiceRadioTech(ServiceState.RIL_RADIO_TECHNOLOGY_HSPA); in setUp()
250 mSimulatedCommands.setDataRadioTech(ServiceState.RIL_RADIO_TECHNOLOGY_HSPA); in setUp()
447 assertEquals(ServiceState.RIL_RADIO_TECHNOLOGY_HSPA, in testSpnUpdateShowPlmnOnly()
555 ServiceState ss = new ServiceState(); in testOnImsServiceStateChanged()
556 ss.setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE); in testOnImsServiceStateChanged()
563 verify(mPhone).notifyServiceStateChanged(any(ServiceState.class)); in testOnImsServiceStateChanged()
566 ss = new ServiceState(); in testOnImsServiceStateChanged()
567 ss.setVoiceRegState(ServiceState.STATE_IN_SERVICE); in testOnImsServiceStateChanged()
[all …]
DRatRatcheterTest.java21 import android.telephony.ServiceState;
31 private ServiceState mServiceState;
35 mServiceState = new ServiceState(); in setUp()
DCellularNetworkServiceTest.java37 import android.telephony.ServiceState;
102 int voiceRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_HSPA; in testGetNetworkRegistrationInfo()
103 int dataRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_HSPA; in testGetNetworkRegistrationInfo()
141 ServiceState.rilRadioTechnologyToNetworkType(voiceRadioTech), reasonForDenial, in testGetNetworkRegistrationInfo()
168 ServiceState.rilRadioTechnologyToNetworkType(voiceRadioTech), reasonForDenial, in testGetNetworkRegistrationInfo()
DCarrierDisplayNameResolverTest.java27 import android.telephony.ServiceState;
67 private final ServiceState mSS = new ServiceState();
90 mSS.setVoiceRegState(ServiceState.STATE_IN_SERVICE); in setUp()
91 mSS.setDataRegState(ServiceState.STATE_IN_SERVICE); in setUp()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/
DImsCallTest.java20 import android.telephony.ServiceState;
60 assertNotEquals(mTestImsCall.getRadioTechnology(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetWifi()
62 ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); in testSetWifi()
64 assertNotEquals(mTestImsCall.getRadioTechnology(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetWifi()
72 assertNotEquals(mTestImsCall.getRadioTechnology(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetWifiAlt()
74 ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); in testSetWifiAlt()
76 assertNotEquals(mTestImsCall.getRadioTechnology(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetWifiAlt()
84 assertNotEquals(mTestImsCall.getRadioTechnology(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetLteNoWifi()
86 ServiceState.RIL_RADIO_TECHNOLOGY_LTE + ""); in testSetLteNoWifi()
88 assertEquals(mTestImsCall.getRadioTechnology(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetLteNoWifi()
[all …]
DImsPhoneTest.java54 import android.telephony.ServiceState;
496 mImsPhoneUT.setServiceState(ServiceState.STATE_IN_SERVICE); in testShouldSendNotificationWhenServiceStateIsChanged()
499 mImsPhoneUT.setServiceState(ServiceState.STATE_OUT_OF_SERVICE); in testShouldSendNotificationWhenServiceStateIsChanged()
505 mImsPhoneUT.setServiceState(ServiceState.STATE_IN_SERVICE); in testShouldNotSendNotificationWhenServiceStateIsNotChanged()
508 mImsPhoneUT.setServiceState(ServiceState.STATE_IN_SERVICE); in testShouldNotSendNotificationWhenServiceStateIsNotChanged()
655 ServiceState.RIL_RADIO_TECHNOLOGY_LTE, ServiceState.STATE_IN_SERVICE, true)); in testRoamingDuplicateMessages()
678 ServiceState.RIL_RADIO_TECHNOLOGY_LTE, ServiceState.STATE_IN_SERVICE, true)); in testRoamingToOutOfService()
703 ServiceState.RIL_RADIO_TECHNOLOGY_LTE, ServiceState.STATE_IN_SERVICE, true)); in testRoamingChangeForLteInLegacyMode()
712 ServiceState.RIL_RADIO_TECHNOLOGY_LTE, ServiceState.STATE_IN_SERVICE, false)); in testRoamingChangeForLteInLegacyMode()
727 ServiceState.RIL_RADIO_TECHNOLOGY_LTE, ServiceState.STATE_IN_SERVICE, true)); in testDataOnlyRoamingCellToIWlanInLegacyMode()
[all …]
DImsPhoneConnectionTest.java25 import android.telephony.ServiceState;
247 doReturn(ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN).when(mImsCall).getRadioTechnology(); in testSetWifi()
249 ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); in testSetWifi()
260 doReturn(ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN).when(mImsCall).getRadioTechnology(); in testSetWifi2()
264 ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); in testSetWifi2()
273 assertNotEquals(mConnectionUT.getCallRadioTech(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetLTE()
275 doReturn(ServiceState.RIL_RADIO_TECHNOLOGY_LTE).when(mImsCall).getRadioTechnology(); in testSetLTE()
277 ServiceState.RIL_RADIO_TECHNOLOGY_LTE + ""); in testSetLTE()
279 assertEquals(mConnectionUT.getCallRadioTech(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetLTE()
286 assertNotEquals(mConnectionUT.getCallRadioTech(), ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testSetLTE2()
[all …]
/frameworks/base/telephony/java/android/telephony/
DServiceState.java60 public class ServiceState implements Parcelable { class
380 public static ServiceState newFromBundle(Bundle m) { in newFromBundle()
381 ServiceState ret; in newFromBundle()
382 ret = new ServiceState(); in newFromBundle()
390 public ServiceState() { in ServiceState() method in ServiceState
398 public ServiceState(ServiceState s) { in ServiceState() method in ServiceState
402 protected void copyFrom(ServiceState s) { in copyFrom()
441 public ServiceState(Parcel in) { in ServiceState() method in ServiceState
505 public static final @android.annotation.NonNull Parcelable.Creator<ServiceState> CREATOR =
506 new Parcelable.Creator<ServiceState>() {
[all …]
DAccessNetworkUtils.java3 import static android.telephony.ServiceState.DUPLEX_MODE_FDD;
4 import static android.telephony.ServiceState.DUPLEX_MODE_TDD;
5 import static android.telephony.ServiceState.DUPLEX_MODE_UNKNOWN;
8 import android.telephony.ServiceState.DuplexMode;
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DUtilsTest.java41 import android.telephony.ServiceState;
76 private ServiceState mServiceState;
218 when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE); in isInService_voiceInService_returnTrue()
224 when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); in isInService_voiceOutOfServiceDataInService_returnTrue()
225 when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); in isInService_voiceOutOfServiceDataInService_returnTrue()
231 when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); in isInService_voiceOutOfServiceDataInServiceOnIwLan_returnFalse()
233 .thenReturn(ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN); in isInService_voiceOutOfServiceDataInServiceOnIwLan_returnFalse()
234 when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); in isInService_voiceOutOfServiceDataInServiceOnIwLan_returnFalse()
240 when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); in isInService_voiceOutOfServiceDataOutOfService_returnFalse()
241 when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); in isInService_voiceOutOfServiceDataOutOfService_returnFalse()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DKeyguardUpdateMonitorTest.java43 import android.telephony.ServiceState;
170 ServiceState state = new ServiceState(); in testTelephonyCapable_SimInvalid_ServiceState_InService()
171 state.setState(ServiceState.STATE_IN_SERVICE); in testTelephonyCapable_SimInvalid_ServiceState_InService()
187 ServiceState state = new ServiceState(); in testTelephonyCapable_SimValid_ServiceState_PowerOff()
188 state.setState(ServiceState.STATE_POWER_OFF); in testTelephonyCapable_SimValid_ServiceState_PowerOff()
207 ServiceState state = new ServiceState(); in testTelephonyCapable_BootInitState_ServiceState_OutOfService()
208 state.setState(ServiceState.STATE_OUT_OF_SERVICE); in testTelephonyCapable_BootInitState_ServiceState_OutOfService()
220 ServiceState state = new ServiceState(); in testTelephonyCapable_BootInitState_SimState_NotReady()
221 state.setState(ServiceState.STATE_OUT_OF_SERVICE); in testTelephonyCapable_BootInitState_SimState_NotReady()
235 ServiceState state = new ServiceState(); in testTelephonyCapable_BootInitState_SimState_Ready()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DRatRatcheter.java29 import android.telephony.ServiceState;
64 public static boolean updateBandwidths(int[] bandwidths, ServiceState serviceState) { in updateBandwidths()
93 int oldRat = ServiceState.networkTypeToRilRadioTechnology(oldNetworkType); in ratchetRat()
94 int newRat = ServiceState.networkTypeToRilRadioTechnology(newNetworkType); in ratchetRat()
109 return ServiceState.rilRadioTechnologyToNetworkType( in ratchetRat()
115 public void ratchet(@NonNull ServiceState oldSS, @NonNull ServiceState newSS, in ratchet()
161 private boolean isSameRatFamily(ServiceState ss1, ServiceState ss2) { in isSameRatFamily()
165 int dataRat1 = ServiceState.networkTypeToRilRadioTechnology( in isSameRatFamily()
169 int dataRat2 = ServiceState.networkTypeToRilRadioTechnology( in isSameRatFamily()
DServiceStateTracker.java72 import android.telephony.ServiceState;
150 public ServiceState mSS;
152 private ServiceState mNewSS;
374 ServiceState.rilRadioTechnologyToString( in onSubscriptionsChanged()
677 if (mSS != null && mSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE) { in updatePhoneType()
693 mSS = new ServiceState(); in updatePhoneType()
695 mNewSS = new ServiceState(); in updatePhoneType()
743 ServiceState.rilRadioTechnologyToString(ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)); in updatePhoneType()
829 int rat = ServiceState.networkTypeToRilRadioTechnology( in notifyDataRegStateRilRadioTechnologyChanged()
842 ServiceState.rilRadioTechnologyToString(mSS.getRilDataRadioTechnology())); in notifyDataRegStateRilRadioTechnologyChanged()
[all …]
DPhoneStateIntentReceiver.java26 import android.telephony.ServiceState;
49 ServiceState mServiceState = new ServiceState();
90 public ServiceState getServiceState() { in getServiceState()
195 mServiceState = ServiceState.newFromBundle(intent.getExtras()); in onReceive()
/frameworks/base/core/java/com/android/internal/app/procstats/
DServiceState.java33 public final class ServiceState { class
74 public ServiceState(ProcessStats processStats, String pkg, String name, in ServiceState() method in ServiceState
214 public void add(ServiceState other) { in add()
404 mRunCount, ServiceState.SERVICE_RUN, mRunState, in dumpStats()
407 mStartedCount, ServiceState.SERVICE_STARTED, mStartedState, in dumpStats()
410 mForegroundCount, ServiceState.SERVICE_FOREGROUND, mForegroundState, in dumpStats()
413 mBoundCount, ServiceState.SERVICE_BOUND, mBoundState, in dumpStats()
416 mExecCount, ServiceState.SERVICE_EXEC, mExecState, in dumpStats()
505 ServiceState.SERVICE_RUN, mRunCount, mRunState, mRunStartTime, now);
507 ServiceState.SERVICE_STARTED, mStartedCount, mStartedState, mStartedStartTime, now);
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DNetworkControllerDataTest.java11 import android.telephony.ServiceState;
183 ServiceState ss = Mockito.mock(ServiceState.class); in testNr5GIcon_NrConnectedWithoutMMWave_show5GIcon()
185 doReturn(ServiceState.FREQUENCY_RANGE_HIGH).when(ss).getNrFrequencyRange(); in testNr5GIcon_NrConnectedWithoutMMWave_show5GIcon()
197 ServiceState ss = Mockito.mock(ServiceState.class); in testNr5GIcon_NrConnectedWithMMWave_show5GPlusIcon()
199 doReturn(ServiceState.FREQUENCY_RANGE_MMWAVE).when(ss).getNrFrequencyRange(); in testNr5GIcon_NrConnectedWithMMWave_show5GPlusIcon()
211 ServiceState ss = Mockito.mock(ServiceState.class); in testNr5GIcon_NrRestricted_showLteIcon()
/frameworks/opt/telephony/tests/telephonytests/src/android/telephony/ims/
DImsRegistrationTests.java29 import android.telephony.ServiceState;
123 mRegistration.onRegistered(ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testRegistrationCallbackOnRegistered()
125 verify(mCallback).onRegistered(ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testRegistrationCallbackOnRegistered()
131 mRegistration.onRegistering(ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testRegistrationCallbackOnRegistering()
133 verify(mCallback).onRegistering(ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testRegistrationCallbackOnRegistering()
172 mRegistration.onRegistered(ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testRegistrationCallbackAfterUnregistered()
174 verify(mCallback, never()).onRegistered(ServiceState.RIL_RADIO_TECHNOLOGY_LTE); in testRegistrationCallbackAfterUnregistered()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DUtils.java3 import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
28 import android.telephony.ServiceState;
391 public static boolean isInService(ServiceState serviceState) { in isInService()
396 if (state == ServiceState.STATE_POWER_OFF in isInService()
397 || state == ServiceState.STATE_OUT_OF_SERVICE in isInService()
398 || state == ServiceState.STATE_EMERGENCY_ONLY) { in isInService()
411 public static int getCombinedServiceState(ServiceState serviceState) { in getCombinedServiceState()
413 return ServiceState.STATE_OUT_OF_SERVICE; in getCombinedServiceState()
425 if (state == ServiceState.STATE_OUT_OF_SERVICE in getCombinedServiceState()
426 || state == ServiceState.STATE_EMERGENCY_ONLY) { in getCombinedServiceState()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DDataConnectionStats.java26 import android.telephony.ServiceState;
45 private ServiceState mServiceState;
127 && mServiceState.getState() != ServiceState.STATE_OUT_OF_SERVICE in hasService()
128 && mServiceState.getState() != ServiceState.STATE_POWER_OFF; in hasService()
138 public void onServiceStateChanged(ServiceState state) {
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DDataConnection.java49 import android.telephony.ServiceState;
578 ServiceState ss = mPhone.getServiceState(); in DataConnection()
696 ServiceState.rilRadioTechnologyToAccessNetworkType(cp.mRilRat), in connect()
970 if (rilRat == ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA) { in updateTcpBufferSizes()
973 rilRat = ServiceState.RIL_RADIO_TECHNOLOGY_LTE; in updateTcpBufferSizes()
975 String ratName = ServiceState.rilRadioTechnologyToString(rilRat).toLowerCase(Locale.ROOT); in updateTcpBufferSizes()
978 if (rilRat == ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_0 || in updateTcpBufferSizes()
979 rilRat == ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_A || in updateTcpBufferSizes()
980 rilRat == ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B) { in updateTcpBufferSizes()
986 if (rilRat == ServiceState.RIL_RADIO_TECHNOLOGY_LTE && isNRConnected()) { in updateTcpBufferSizes()
[all …]

12345