Loading tests/telephonytests/src/com/android/internal/telephony/ServiceStateTrackerTest.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -539,6 +539,8 @@ public class ServiceStateTrackerTest extends TelephonyTest { mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.notifyVoiceNetworkStateChanged(); mSimulatedCommands.notifyVoiceNetworkStateChanged(); waitForMs(100); sst.registerForDataConnectionAttached(mTestHandler, EVENT_DATA_CONNECTION_ATTACHED, null); sst.registerForDataConnectionAttached(mTestHandler, EVENT_DATA_CONNECTION_ATTACHED, null); // set service state in service and trigger events to post message on handler // set service state in service and trigger events to post message on handler Loading Loading @@ -646,6 +648,8 @@ public class ServiceStateTrackerTest extends TelephonyTest { mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.notifyVoiceNetworkStateChanged(); mSimulatedCommands.notifyVoiceNetworkStateChanged(); waitForMs(100); sst.registerForNetworkAttached(mTestHandler, EVENT_REGISTERED_TO_NETWORK, null); sst.registerForNetworkAttached(mTestHandler, EVENT_REGISTERED_TO_NETWORK, null); // set service state in service and trigger events to post message on handler // set service state in service and trigger events to post message on handler Loading Loading @@ -743,7 +747,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { public void testEnableLocationUpdates() throws Exception { public void testEnableLocationUpdates() throws Exception { sst.enableLocationUpdates(); sst.enableLocationUpdates(); verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(true), verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(true), eq(any(Message.class))); any(Message.class)); } } @Test @Test Loading @@ -751,7 +755,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { public void testDisableLocationUpdates() throws Exception { public void testDisableLocationUpdates() throws Exception { sst.disableLocationUpdates(); sst.disableLocationUpdates(); verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(false), verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(false), eq(any(Message.class))); any(Message.class)); } } @Test @Test Loading Loading
tests/telephonytests/src/com/android/internal/telephony/ServiceStateTrackerTest.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -539,6 +539,8 @@ public class ServiceStateTrackerTest extends TelephonyTest { mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.notifyVoiceNetworkStateChanged(); mSimulatedCommands.notifyVoiceNetworkStateChanged(); waitForMs(100); sst.registerForDataConnectionAttached(mTestHandler, EVENT_DATA_CONNECTION_ATTACHED, null); sst.registerForDataConnectionAttached(mTestHandler, EVENT_DATA_CONNECTION_ATTACHED, null); // set service state in service and trigger events to post message on handler // set service state in service and trigger events to post message on handler Loading Loading @@ -646,6 +648,8 @@ public class ServiceStateTrackerTest extends TelephonyTest { mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.setDataRegState(ServiceState.RIL_REG_STATE_UNKNOWN); mSimulatedCommands.notifyVoiceNetworkStateChanged(); mSimulatedCommands.notifyVoiceNetworkStateChanged(); waitForMs(100); sst.registerForNetworkAttached(mTestHandler, EVENT_REGISTERED_TO_NETWORK, null); sst.registerForNetworkAttached(mTestHandler, EVENT_REGISTERED_TO_NETWORK, null); // set service state in service and trigger events to post message on handler // set service state in service and trigger events to post message on handler Loading Loading @@ -743,7 +747,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { public void testEnableLocationUpdates() throws Exception { public void testEnableLocationUpdates() throws Exception { sst.enableLocationUpdates(); sst.enableLocationUpdates(); verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(true), verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(true), eq(any(Message.class))); any(Message.class)); } } @Test @Test Loading @@ -751,7 +755,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { public void testDisableLocationUpdates() throws Exception { public void testDisableLocationUpdates() throws Exception { sst.disableLocationUpdates(); sst.disableLocationUpdates(); verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(false), verify(mSimulatedCommandsVerifier, times(1)).setLocationUpdates(eq(false), eq(any(Message.class))); any(Message.class)); } } @Test @Test Loading