aboutsummaryrefslogtreecommitdiff
path: root/tests/telephonytests
diff options
context:
space:
mode:
authorMalcolm Chen <refuhoo@google.com>2020-06-12 13:01:24 -0700
committerXiangyu/Malcolm Chen <refuhoo@google.com>2020-06-12 22:53:56 +0000
commit847f5bff7b09f95c7e40ef88c0e36f227ba6cc3f (patch)
tree5468774b0de19c5aceb1044d977f4bf66ae14c05 /tests/telephonytests
parente899a48c62ff49aeabb155579598a50bff51a8be (diff)
downloadtelephony-847f5bff7b09f95c7e40ef88c0e36f227ba6cc3f.tar.gz
Remove redundant logging and message sending when Radio is null
Bug: 158717911 Test: unittest Change-Id: I494a0d4649e5ef6edbd3e73e5fe781261141f8a4
Diffstat (limited to 'tests/telephonytests')
-rw-r--r--tests/telephonytests/src/com/android/internal/telephony/RILTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/telephonytests/src/com/android/internal/telephony/RILTest.java b/tests/telephonytests/src/com/android/internal/telephony/RILTest.java
index 8dcff0fa0e..792e525b22 100644
--- a/tests/telephonytests/src/com/android/internal/telephony/RILTest.java
+++ b/tests/telephonytests/src/com/android/internal/telephony/RILTest.java
@@ -2491,6 +2491,19 @@ public class RILTest extends TelephonyTest {
}
@Test
+ public void testAreUiccApplicationsEnabled_nullRadioProxy() throws Exception {
+ // Not supported on Radio 1.0.
+ doReturn(null).when(mRILUnderTest).getRadioProxy(any());
+ Message message = obtainMessage();
+ mRILUnderTest.areUiccApplicationsEnabled(message);
+ processAllMessages();
+ verify(mRadioProxy, never()).areUiccApplicationsEnabled(mSerialNumberCaptor.capture());
+ // Sending message is handled by getRadioProxy when proxy is null.
+ // areUiccApplicationsEnabled shouldn't explicitly send another callback.
+ assertEquals(null, message.obj);
+ }
+
+ @Test
public void testSetGetCompatVersion() throws Exception {
final int testRequest = RIL_REQUEST_GET_UICC_APPLICATIONS_ENABLEMENT;