Merge "Tidy up test annotations and enable presubmit" into main
diff --git a/core/tests/coretests/src/android/app/time/DetectorStatusTypesTest.java b/core/tests/coretests/src/android/app/time/DetectorStatusTypesTest.java
index f57ee43..2e1e09c 100644
--- a/core/tests/coretests/src/android/app/time/DetectorStatusTypesTest.java
+++ b/core/tests/coretests/src/android/app/time/DetectorStatusTypesTest.java
@@ -26,9 +26,17 @@
import android.app.time.DetectorStatusTypes.DetectionAlgorithmStatus;
import android.app.time.DetectorStatusTypes.DetectorStatus;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
+import org.junit.runner.RunWith;
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class DetectorStatusTypesTest {
@Test
diff --git a/core/tests/coretests/src/android/app/time/ExternalTimeSuggestionTest.java b/core/tests/coretests/src/android/app/time/ExternalTimeSuggestionTest.java
index 92149eb..ae3357a 100644
--- a/core/tests/coretests/src/android/app/time/ExternalTimeSuggestionTest.java
+++ b/core/tests/coretests/src/android/app/time/ExternalTimeSuggestionTest.java
@@ -21,13 +21,21 @@
import static org.junit.Assert.assertEquals;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for non-SDK methods on {@link ExternalTimeSuggestion}.
* Also see {@link android.app.time.cts.ExternalTimeSuggestionTest}
*/
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class ExternalTimeSuggestionTest {
@Test(expected = IllegalArgumentException.class)
diff --git a/core/tests/coretests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java b/core/tests/coretests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java
index fc69f69..384a5a8 100644
--- a/core/tests/coretests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java
+++ b/core/tests/coretests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java
@@ -39,10 +39,18 @@
import static org.junit.Assert.assertTrue;
import android.app.time.LocationTimeZoneAlgorithmStatus.ProviderStatus;
+import android.platform.test.annotations.Presubmit;
import android.service.timezone.TimeZoneProviderStatus;
-import org.junit.Test;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class LocationTimeZoneAlgorithmStatusTest {
private static final TimeZoneProviderStatus ARBITRARY_PROVIDER_RUNNING_STATUS =
diff --git a/core/tests/coretests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java b/core/tests/coretests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java
index b90c485..e6e2371 100644
--- a/core/tests/coretests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java
+++ b/core/tests/coretests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java
@@ -23,8 +23,17 @@
import static org.junit.Assert.assertNotEquals;
-import org.junit.Test;
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TelephonyTimeZoneAlgorithmStatusTest {
@Test
diff --git a/core/tests/coretests/src/android/app/time/TimeCapabilitiesTest.java b/core/tests/coretests/src/android/app/time/TimeCapabilitiesTest.java
index 1a276ad..3ead97f 100644
--- a/core/tests/coretests/src/android/app/time/TimeCapabilitiesTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeCapabilitiesTest.java
@@ -32,6 +32,7 @@
import static org.junit.Assert.fail;
import android.os.UserHandle;
+import android.platform.test.annotations.Presubmit;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -41,6 +42,7 @@
@RunWith(AndroidJUnit4.class)
@SmallTest
+@Presubmit
public class TimeCapabilitiesTest {
private static final UserHandle TEST_USER_HANDLE = UserHandle.of(332211);
diff --git a/core/tests/coretests/src/android/app/time/TimeManagerTest.java b/core/tests/coretests/src/android/app/time/TimeManagerTest.java
index 6370f3b..89c8d6a 100644
--- a/core/tests/coretests/src/android/app/time/TimeManagerTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeManagerTest.java
@@ -33,8 +33,11 @@
import android.app.time.cts.shell.TimeZoneDetectorShellHelper;
import android.app.time.cts.shell.device.InstrumentationShellCommandExecutor;
import android.content.Context;
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.AdoptShellPermissionsRule;
@@ -42,11 +45,15 @@
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for non-SDK methods / internal behavior related to {@link TimeManager}.
* Also see {@link android.app.time.cts.TimeManagerTest}
*/
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TimeManagerTest {
/**
diff --git a/core/tests/coretests/src/android/app/time/TimeStateTest.java b/core/tests/coretests/src/android/app/time/TimeStateTest.java
index 25e6e2b..50da3a6 100644
--- a/core/tests/coretests/src/android/app/time/TimeStateTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeStateTest.java
@@ -24,7 +24,9 @@
import static org.junit.Assert.assertNotEquals;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
@@ -34,6 +36,8 @@
* Tests for non-SDK methods on {@link TimeState}.
*/
@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TimeStateTest {
@Test
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneCapabilitiesTest.java b/core/tests/coretests/src/android/app/time/TimeZoneCapabilitiesTest.java
index 6636cbd..e368d28 100644
--- a/core/tests/coretests/src/android/app/time/TimeZoneCapabilitiesTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeZoneCapabilitiesTest.java
@@ -27,6 +27,7 @@
import static org.junit.Assert.assertNull;
import android.os.UserHandle;
+import android.platform.test.annotations.Presubmit;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -36,6 +37,7 @@
@RunWith(AndroidJUnit4.class)
@SmallTest
+@Presubmit
public class TimeZoneCapabilitiesTest {
private static final UserHandle TEST_USER_HANDLE = UserHandle.of(12345);
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneConfigurationTest.java b/core/tests/coretests/src/android/app/time/TimeZoneConfigurationTest.java
index 17d2492..4ad3e41 100644
--- a/core/tests/coretests/src/android/app/time/TimeZoneConfigurationTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeZoneConfigurationTest.java
@@ -20,6 +20,8 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import android.platform.test.annotations.Presubmit;
+
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -29,6 +31,7 @@
/** Also see {@link android.app.time.cts.TimeZoneConfigurationTest}, which covers the SDK APIs. */
@RunWith(AndroidJUnit4.class)
@SmallTest
+@Presubmit
public class TimeZoneConfigurationTest {
@Test
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneDetectorStatusTest.java b/core/tests/coretests/src/android/app/time/TimeZoneDetectorStatusTest.java
index dfff7ec..4ef60a33 100644
--- a/core/tests/coretests/src/android/app/time/TimeZoneDetectorStatusTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeZoneDetectorStatusTest.java
@@ -25,8 +25,17 @@
import static org.junit.Assert.assertNotEquals;
-import org.junit.Test;
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TimeZoneDetectorStatusTest {
private static final TelephonyTimeZoneAlgorithmStatus ARBITRARY_TELEPHONY_ALGORITHM_STATUS =
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneStateTest.java b/core/tests/coretests/src/android/app/time/TimeZoneStateTest.java
index 595b700..0b816ec 100644
--- a/core/tests/coretests/src/android/app/time/TimeZoneStateTest.java
+++ b/core/tests/coretests/src/android/app/time/TimeZoneStateTest.java
@@ -24,7 +24,9 @@
import static org.junit.Assert.assertNotEquals;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
@@ -34,6 +36,8 @@
* Tests for non-SDK methods on {@link TimeZoneState}.
*/
@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TimeZoneStateTest {
@Test
diff --git a/core/tests/coretests/src/android/app/time/UnixEpochTimeTest.java b/core/tests/coretests/src/android/app/time/UnixEpochTimeTest.java
index e7d352c..0b485c0 100644
--- a/core/tests/coretests/src/android/app/time/UnixEpochTimeTest.java
+++ b/core/tests/coretests/src/android/app/time/UnixEpochTimeTest.java
@@ -21,7 +21,9 @@
import static org.junit.Assert.assertEquals;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
@@ -33,6 +35,8 @@
* <p>See also {@link android.app.time.cts.UnixEpochTimeTest} for SDK methods.
*/
@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class UnixEpochTimeTest {
@Test(expected = IllegalArgumentException.class)
diff --git a/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java b/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java
index 28da164..b068456 100644
--- a/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java
+++ b/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java
@@ -25,9 +25,17 @@
import android.app.time.UnixEpochTime;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
+import org.junit.runner.RunWith;
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class ManualTimeSuggestionTest {
private static final UnixEpochTime ARBITRARY_TIME = new UnixEpochTime(1111L, 2222L);
diff --git a/core/tests/coretests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java b/core/tests/coretests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java
index e9ca069..2716ebf 100644
--- a/core/tests/coretests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java
+++ b/core/tests/coretests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java
@@ -25,9 +25,17 @@
import android.app.time.UnixEpochTime;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
+import org.junit.runner.RunWith;
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TelephonyTimeSuggestionTest {
private static final int SLOT_INDEX = 99999;
diff --git a/core/tests/coretests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java b/core/tests/coretests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java
index b5bdea7..8e1f0a1 100644
--- a/core/tests/coretests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java
+++ b/core/tests/coretests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java
@@ -25,12 +25,20 @@
import static org.junit.Assert.assertTrue;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
+import org.junit.runner.RunWith;
import java.io.PrintWriter;
import java.io.StringWriter;
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class ManualTimeZoneSuggestionTest {
private static final String ARBITRARY_ZONE_ID1 = "Europe/London";
diff --git a/core/tests/coretests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java b/core/tests/coretests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java
index d5dcac2..42cb856 100644
--- a/core/tests/coretests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java
+++ b/core/tests/coretests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java
@@ -25,12 +25,20 @@
import static org.junit.Assert.assertTrue;
import android.os.ShellCommand;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
+import org.junit.runner.RunWith;
import java.io.PrintWriter;
import java.io.StringWriter;
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TelephonyTimeZoneSuggestionTest {
private static final int SLOT_INDEX = 99999;
diff --git a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java b/core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java
index 7f772dd..26e4245 100644
--- a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java
+++ b/core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java
@@ -32,11 +32,20 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
+import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.Collections;
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TimeZoneProviderEventTest {
public static final TimeZoneProviderStatus ARBITRARY_TIME_ZONE_PROVIDER_STATUS =
diff --git a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java b/core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java
index 0c1630e..9b24559 100644
--- a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java
+++ b/core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java
@@ -26,9 +26,12 @@
import static org.junit.Assert.assertEquals;
+import android.platform.test.annotations.Presubmit;
import android.service.timezone.TimeZoneProviderStatus.DependencyStatus;
import android.service.timezone.TimeZoneProviderStatus.OperationStatus;
+import androidx.test.filters.SmallTest;
+
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -41,6 +44,8 @@
/** Non-SDK tests. See CTS for SDK API tests. */
@RunWith(JUnitParamsRunner.class)
+@SmallTest
+@Presubmit
public class TimeZoneProviderStatusTest {
@Test
diff --git a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java b/core/tests/coretests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java
index e800739..a091036 100644
--- a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java
+++ b/core/tests/coretests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java
@@ -22,11 +22,20 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
+import org.junit.runner.RunWith;
import java.util.Collections;
/** Tests for non-API methods */
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+@Presubmit
public class TimeZoneProviderSuggestionTest {
@Test