diff --git a/core/java/android/provider/TEST_MAPPING b/core/java/android/provider/TEST_MAPPING index 773be80be2706..ae2836f4d915b 100644 --- a/core/java/android/provider/TEST_MAPPING +++ b/core/java/android/provider/TEST_MAPPING @@ -4,17 +4,21 @@ "name": "CtsProviderTestCases", "options": [ { - "include-annotation": "android.platform.test.annotations.Presubmit" + "exclude-filter": "android.provider.cts.SettingsPanelTest" } ] }, { - "name": "SettingsProviderTest", - "options": [ - { - "include-annotation": "android.platform.test.annotations.Presubmit" - } - ] + "name": "CalendarProviderTests" + }, + { + "name": "ContactsProviderTests" + }, + { + "name": "MediaProviderTests" + }, + { + "name": "SettingsProviderTest" } ] } diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsBackupAgentTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsBackupAgentTest.java index 12ca92f02e7ac..57e22db6a55cd 100644 --- a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsBackupAgentTest.java +++ b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsBackupAgentTest.java @@ -30,6 +30,7 @@ import android.database.Cursor; import android.database.MatrixCursor; import android.net.Uri; import android.os.Build; +import android.os.Bundle; import android.provider.Settings; import android.test.mock.MockContentProvider; import android.test.mock.MockContentResolver; @@ -47,6 +48,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; @@ -270,5 +272,17 @@ public class SettingsBackupAgentTest extends BaseSettingsProviderTest { } return result; } + + @Override + public Bundle call(String method, String request, Bundle args) { + for (Object[] resultRow : RESULT_ROWS) { + if (Objects.equals(request, resultRow[0])) { + final Bundle res = new Bundle(); + res.putString("value", String.valueOf(resultRow[1])); + return res; + } + } + return Bundle.EMPTY; + } } } diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java index 183f5997a6b5a..d67a9bc97cb8d 100644 --- a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java +++ b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java @@ -33,6 +33,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.util.Log; +import org.junit.Ignore; import org.junit.Test; import java.util.concurrent.atomic.AtomicBoolean; @@ -693,6 +694,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest { } @Test + @Ignore("b/140250974") public void testLocationModeChanges_viaFrontEndApi() throws Exception { setStringViaFrontEndApiSetting( SETTING_TYPE_SECURE, @@ -735,6 +737,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest { } @Test + @Ignore("b/140250974") public void testLocationProvidersAllowed_disableProviders() throws Exception { setStringViaFrontEndApiSetting( SETTING_TYPE_SECURE, @@ -766,6 +769,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest { } @Test + @Ignore("b/140250974") public void testLocationProvidersAllowed_enableAndDisable() throws Exception { setStringViaFrontEndApiSetting( SETTING_TYPE_SECURE, @@ -788,6 +792,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest { } @Test + @Ignore("b/140250974") public void testLocationProvidersAllowedLocked_invalidInput() throws Exception { setStringViaFrontEndApiSetting( SETTING_TYPE_SECURE,