Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a674cb8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Skip testSendMultipartSmsByCarrierAppNoResponse on automotive" into main

parents 07806de6 f6081311
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeFalse;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
@@ -42,6 +43,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
import android.location.Country;
import android.location.CountryDetector;
@@ -59,6 +61,7 @@ import android.telephony.SmsManager;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
@@ -534,9 +537,15 @@ public class GsmSmsDispatcherTest extends TelephonyTest {
        }
    }

    private void skipOnAutomotive() {
        assumeFalse(InstrumentationRegistry.getTargetContext().getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_AUTOMOTIVE));
    }

    @Test
    @SmallTest
    public void testSendMultipartSmsByCarrierAppNoResponse() throws Exception {
        skipOnAutomotive(); // TODO(b/401440427): don't skip
        mockCarrierApp();
        // do not mock result, instead reduce the timeout for test
        mGsmSmsDispatcher.mCarrierMessagingTimeout = 100;