Fix broken EuiccManager supported country tests
Bug: 157259634
Test: Manuallt tested it
Change-Id: I2b1620aedcda64b06aef0879ce2ac3b44177d290
diff --git a/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java b/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java
index 2b4e3ac..80cfc02 100644
--- a/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java
@@ -318,6 +318,11 @@
@Test
public void testSetSupportedCountries() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalSupportedCountry = mEuiccManager.getSupportedCountries();
@@ -334,6 +339,11 @@
@Test
public void testSetUnsupportedCountries() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalUnsupportedCountry = mEuiccManager.getUnsupportedCountries();
@@ -350,6 +360,11 @@
@Test
public void testIsSupportedCountry_returnsTrue_ifCountryIsOnSupportedList() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalSupportedCountry = mEuiccManager.getSupportedCountries();
@@ -365,6 +380,11 @@
@Test
public void testIsSupportedCountry_returnsTrue_ifCountryIsNotOnUnsupportedList() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalSupportedCountry = mEuiccManager.getSupportedCountries();
List<String> originalUnsupportedCountry = mEuiccManager.getUnsupportedCountries();
@@ -384,6 +404,11 @@
@Test
public void testIsSupportedCountry_returnsFalse_ifCountryIsNotOnSupportedList() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalSupportedCountry = mEuiccManager.getSupportedCountries();
@@ -399,6 +424,11 @@
@Test
public void testIsSupportedCountry_returnsFalse_ifCountryIsOnUnsupportedList() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalSupportedCountry = mEuiccManager.getSupportedCountries();
List<String> originalUnsupportedCountry = mEuiccManager.getUnsupportedCountries();
@@ -418,6 +448,11 @@
@Test
public void testIsSupportedCountry_returnsFalse_ifBothListsAreEmpty() {
+ // Only test it when EuiccManager is enabled.
+ if (!mEuiccManager.isEnabled()) {
+ return;
+ }
+
// Get country list for restoring later.
List<String> originalSupportedCountry = mEuiccManager.getSupportedCountries();
List<String> originalUnsupportedCountry = mEuiccManager.getUnsupportedCountries();