Merge changes I85926323,Ia4ab69c8 into main
* changes:
Move Time servicestests to their own test module
Move Time coretests to their own test module
diff --git a/core/java/android/app/time/TEST_MAPPING b/core/java/android/app/time/TEST_MAPPING
index 7809048..49a4467 100644
--- a/core/java/android/app/time/TEST_MAPPING
+++ b/core/java/android/app/time/TEST_MAPPING
@@ -1,24 +1,11 @@
{
- "presubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.app.time."
- }
- ]
- }
- ],
// TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
"postsubmit": [
{
- "name": "FrameworksCoreTests",
+ "name": "FrameworksTimeCoreTests",
"options": [
{
- "include-filter": "android.app.timedetector."
- },
- {
- "include-filter": "android.app.timezonedetector."
+ "include-filter": "android.app."
}
]
},
diff --git a/core/java/android/app/timedetector/TEST_MAPPING b/core/java/android/app/timedetector/TEST_MAPPING
index 53fd74b..c050a55 100644
--- a/core/java/android/app/timedetector/TEST_MAPPING
+++ b/core/java/android/app/timedetector/TEST_MAPPING
@@ -2,13 +2,10 @@
// TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
"postsubmit": [
{
- "name": "FrameworksCoreTests",
+ "name": "FrameworksTimeCoreTests",
"options": [
{
- "include-filter": "android.app.time."
- },
- {
- "include-filter": "android.app.timedetector."
+ "include-filter": "android.app."
}
]
},
diff --git a/core/java/android/app/timezonedetector/TEST_MAPPING b/core/java/android/app/timezonedetector/TEST_MAPPING
index 5e64c83..46656d1 100644
--- a/core/java/android/app/timezonedetector/TEST_MAPPING
+++ b/core/java/android/app/timezonedetector/TEST_MAPPING
@@ -1,21 +1,11 @@
{
- "presubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.app.timezonedetector."
- }
- ]
- }
- ],
// TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
"postsubmit": [
{
- "name": "FrameworksCoreTests",
+ "name": "FrameworksTimeCoreTests",
"options": [
{
- "include-filter": "android.app.time."
+ "include-filter": "android.app."
}
]
},
diff --git a/core/java/android/service/timezone/TEST_MAPPING b/core/java/android/service/timezone/TEST_MAPPING
index b0ce1db..21a8eab 100644
--- a/core/java/android/service/timezone/TEST_MAPPING
+++ b/core/java/android/service/timezone/TEST_MAPPING
@@ -2,10 +2,10 @@
// TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
"postsubmit": [
{
- "name": "FrameworksCoreTests",
+ "name": "FrameworksTimeCoreTests",
"options": [
{
- "include-filter": "android.service.timezone."
+ "include-filter": "android.service."
}
]
},
diff --git a/core/tests/coretests/src/android/app/time/TEST_MAPPING b/core/tests/coretests/src/android/app/time/TEST_MAPPING
deleted file mode 100644
index 9d711a2..0000000
--- a/core/tests/coretests/src/android/app/time/TEST_MAPPING
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
- "postsubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.app.time."
- }
- ]
- }
- ]
-}
diff --git a/core/tests/coretests/src/android/app/timedetector/OWNERS b/core/tests/coretests/src/android/app/timedetector/OWNERS
deleted file mode 100644
index c612473..0000000
--- a/core/tests/coretests/src/android/app/timedetector/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 847766
-include /core/java/android/app/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/app/timedetector/TEST_MAPPING b/core/tests/coretests/src/android/app/timedetector/TEST_MAPPING
deleted file mode 100644
index 6c4d48d..0000000
--- a/core/tests/coretests/src/android/app/timedetector/TEST_MAPPING
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
- "postsubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.app.timedetector."
- }
- ]
- }
- ]
-}
diff --git a/core/tests/coretests/src/android/app/timezonedetector/OWNERS b/core/tests/coretests/src/android/app/timezonedetector/OWNERS
deleted file mode 100644
index 2e9c324..0000000
--- a/core/tests/coretests/src/android/app/timezonedetector/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 847766
-include /core/java/android/app/timezonedetector/OWNERS
diff --git a/core/tests/coretests/src/android/app/timezonedetector/TEST_MAPPING b/core/tests/coretests/src/android/app/timezonedetector/TEST_MAPPING
deleted file mode 100644
index 8872f64..0000000
--- a/core/tests/coretests/src/android/app/timezonedetector/TEST_MAPPING
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
- "postsubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.app.timezonedetector."
- }
- ]
- }
- ]
-}
diff --git a/core/tests/coretests/src/android/service/TEST_MAPPING b/core/tests/coretests/src/android/service/TEST_MAPPING
index 7ebda00..bec72d9 100644
--- a/core/tests/coretests/src/android/service/TEST_MAPPING
+++ b/core/tests/coretests/src/android/service/TEST_MAPPING
@@ -10,7 +10,6 @@
{"include-filter": "android.service.notification"},
{"include-filter": "android.service.quicksettings"},
{"include-filter": "android.service.settings.suggestions"},
- {"include-filter": "android.service.timezone"},
{"exclude-annotation": "org.junit.Ignore"}
]
}
diff --git a/core/tests/coretests/src/android/service/timezone/OWNERS b/core/tests/coretests/src/android/service/timezone/OWNERS
deleted file mode 100644
index 8116388..0000000
--- a/core/tests/coretests/src/android/service/timezone/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 847766
-include /core/java/android/service/timezone/OWNERS
diff --git a/core/tests/coretests/src/android/service/timezone/TEST_MAPPING b/core/tests/coretests/src/android/service/timezone/TEST_MAPPING
deleted file mode 100644
index 46f476f..0000000
--- a/core/tests/coretests/src/android/service/timezone/TEST_MAPPING
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
- "postsubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.service.timezone."
- }
- ]
- }
- ]
-}
diff --git a/core/tests/timetests/Android.bp b/core/tests/timetests/Android.bp
new file mode 100644
index 0000000..51181a8
--- /dev/null
+++ b/core/tests/timetests/Android.bp
@@ -0,0 +1,25 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
+android_test {
+ name: "FrameworksTimeCoreTests",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "androidx.test.rules",
+ "device-time-shell-utils",
+ "junit",
+ "junit-params",
+ "mockito-target-minus-junit4",
+ "platform-test-annotations",
+ "truth",
+ ],
+ libs: ["android.test.runner"],
+ certificate: "platform",
+ test_suites: ["device-tests"],
+}
diff --git a/core/tests/timetests/AndroidManifest.xml b/core/tests/timetests/AndroidManifest.xml
new file mode 100644
index 0000000..330e05f
--- /dev/null
+++ b/core/tests/timetests/AndroidManifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.frameworks.coretests.time">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.frameworks.coretests.time"
+ android:label="Frameworks Time Core Tests" />
+
+</manifest>
diff --git a/core/tests/timetests/AndroidTest.xml b/core/tests/timetests/AndroidTest.xml
new file mode 100644
index 0000000..d2d1255
--- /dev/null
+++ b/core/tests/timetests/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Runs Time Core Tests.">
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="apct-instrumentation" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="FrameworksTimeCoreTests.apk" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="com.android.frameworks.coretests.time" />
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+</configuration>
diff --git a/core/tests/coretests/src/android/app/time/OWNERS b/core/tests/timetests/OWNERS
similarity index 100%
rename from core/tests/coretests/src/android/app/time/OWNERS
rename to core/tests/timetests/OWNERS
diff --git a/core/tests/timetests/TEST_MAPPING b/core/tests/timetests/TEST_MAPPING
new file mode 100644
index 0000000..5748044
--- /dev/null
+++ b/core/tests/timetests/TEST_MAPPING
@@ -0,0 +1,8 @@
+{
+ // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
+ "postsubmit": [
+ {
+ "name": "FrameworksTimeCoreTests"
+ }
+ ]
+}
diff --git a/core/tests/coretests/src/android/app/time/DetectorStatusTypesTest.java b/core/tests/timetests/src/android/app/time/DetectorStatusTypesTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/DetectorStatusTypesTest.java
rename to core/tests/timetests/src/android/app/time/DetectorStatusTypesTest.java
diff --git a/core/tests/coretests/src/android/app/time/ExternalTimeSuggestionTest.java b/core/tests/timetests/src/android/app/time/ExternalTimeSuggestionTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/ExternalTimeSuggestionTest.java
rename to core/tests/timetests/src/android/app/time/ExternalTimeSuggestionTest.java
diff --git a/core/tests/coretests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java b/core/tests/timetests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java
rename to core/tests/timetests/src/android/app/time/LocationTimeZoneAlgorithmStatusTest.java
diff --git a/core/tests/coretests/src/android/app/time/ParcelableTestSupport.java b/core/tests/timetests/src/android/app/time/ParcelableTestSupport.java
similarity index 93%
rename from core/tests/coretests/src/android/app/time/ParcelableTestSupport.java
rename to core/tests/timetests/src/android/app/time/ParcelableTestSupport.java
index 13e5e14..d2c9c3a 100644
--- a/core/tests/coretests/src/android/app/time/ParcelableTestSupport.java
+++ b/core/tests/timetests/src/android/app/time/ParcelableTestSupport.java
@@ -47,6 +47,10 @@
return toReturn;
}
+ /**
+ * Asserts that the parameter can be parceled and unparceled and return an object considered
+ * equal to the original.
+ */
public static <T extends Parcelable> void assertRoundTripParcelable(T instance) {
assertEqualsAndHashCode(instance, roundTripParcelable(instance));
}
diff --git a/core/tests/coretests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java b/core/tests/timetests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java
rename to core/tests/timetests/src/android/app/time/TelephonyTimeZoneAlgorithmStatusTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeCapabilitiesTest.java b/core/tests/timetests/src/android/app/time/TimeCapabilitiesTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeCapabilitiesTest.java
rename to core/tests/timetests/src/android/app/time/TimeCapabilitiesTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeManagerTest.java b/core/tests/timetests/src/android/app/time/TimeManagerTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeManagerTest.java
rename to core/tests/timetests/src/android/app/time/TimeManagerTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeStateTest.java b/core/tests/timetests/src/android/app/time/TimeStateTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeStateTest.java
rename to core/tests/timetests/src/android/app/time/TimeStateTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneCapabilitiesTest.java b/core/tests/timetests/src/android/app/time/TimeZoneCapabilitiesTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeZoneCapabilitiesTest.java
rename to core/tests/timetests/src/android/app/time/TimeZoneCapabilitiesTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneConfigurationTest.java b/core/tests/timetests/src/android/app/time/TimeZoneConfigurationTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeZoneConfigurationTest.java
rename to core/tests/timetests/src/android/app/time/TimeZoneConfigurationTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneDetectorStatusTest.java b/core/tests/timetests/src/android/app/time/TimeZoneDetectorStatusTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeZoneDetectorStatusTest.java
rename to core/tests/timetests/src/android/app/time/TimeZoneDetectorStatusTest.java
diff --git a/core/tests/coretests/src/android/app/time/TimeZoneStateTest.java b/core/tests/timetests/src/android/app/time/TimeZoneStateTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/TimeZoneStateTest.java
rename to core/tests/timetests/src/android/app/time/TimeZoneStateTest.java
diff --git a/core/tests/coretests/src/android/app/time/UnixEpochTimeTest.java b/core/tests/timetests/src/android/app/time/UnixEpochTimeTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/time/UnixEpochTimeTest.java
rename to core/tests/timetests/src/android/app/time/UnixEpochTimeTest.java
diff --git a/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java b/core/tests/timetests/src/android/app/timedetector/ManualTimeSuggestionTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java
rename to core/tests/timetests/src/android/app/timedetector/ManualTimeSuggestionTest.java
diff --git a/core/tests/coretests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java b/core/tests/timetests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java
rename to core/tests/timetests/src/android/app/timedetector/TelephonyTimeSuggestionTest.java
diff --git a/core/tests/coretests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java b/core/tests/timetests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java
rename to core/tests/timetests/src/android/app/timezonedetector/ManualTimeZoneSuggestionTest.java
diff --git a/core/tests/coretests/src/android/app/timezonedetector/ShellCommandTestSupport.java b/core/tests/timetests/src/android/app/timezonedetector/ShellCommandTestSupport.java
similarity index 89%
rename from core/tests/coretests/src/android/app/timezonedetector/ShellCommandTestSupport.java
rename to core/tests/timetests/src/android/app/timezonedetector/ShellCommandTestSupport.java
index 4efaed1..59a7304 100644
--- a/core/tests/coretests/src/android/app/timezonedetector/ShellCommandTestSupport.java
+++ b/core/tests/timetests/src/android/app/timezonedetector/ShellCommandTestSupport.java
@@ -29,10 +29,17 @@
public final class ShellCommandTestSupport {
private ShellCommandTestSupport() {}
+ /**
+ * Returns a {@link ShellCommand} from the supplied String, where elements of the command are
+ * separated with spaces. No escaping is performed.
+ */
public static ShellCommand createShellCommandWithArgsAndOptions(String argsWithSpaces) {
return createShellCommandWithArgsAndOptions(Arrays.asList(argsWithSpaces.split(" ")));
}
+ /**
+ * Returns a {@link ShellCommand} from the supplied list of command line elements.
+ */
public static ShellCommand createShellCommandWithArgsAndOptions(List<String> args) {
ShellCommand command = mock(ShellCommand.class);
class ArgProvider {
diff --git a/core/tests/coretests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java b/core/tests/timetests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java
similarity index 100%
rename from core/tests/coretests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java
rename to core/tests/timetests/src/android/app/timezonedetector/TelephonyTimeZoneSuggestionTest.java
diff --git a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java b/core/tests/timetests/src/android/service/timezone/TimeZoneProviderEventTest.java
similarity index 100%
rename from core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java
rename to core/tests/timetests/src/android/service/timezone/TimeZoneProviderEventTest.java
diff --git a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java b/core/tests/timetests/src/android/service/timezone/TimeZoneProviderStatusTest.java
similarity index 98%
rename from core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java
rename to core/tests/timetests/src/android/service/timezone/TimeZoneProviderStatusTest.java
index 9b24559..cf37db6 100644
--- a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderStatusTest.java
+++ b/core/tests/timetests/src/android/service/timezone/TimeZoneProviderStatusTest.java
@@ -32,6 +32,9 @@
import androidx.test.filters.SmallTest;
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -39,9 +42,6 @@
import java.util.List;
import java.util.stream.IntStream;
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
/** Non-SDK tests. See CTS for SDK API tests. */
@RunWith(JUnitParamsRunner.class)
@SmallTest
@@ -83,6 +83,7 @@
providerStatus.couldEnableTelephonyFallback());
}
+ /** Parameters for {@link #couldEnableTelephonyFallback}. */
public static Integer[][] couldEnableTelephonyFallbackParams() {
List<Integer[]> params = new ArrayList<>();
@DependencyStatus int[] dependencyStatuses =
diff --git a/core/tests/coretests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java b/core/tests/timetests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java
similarity index 100%
rename from core/tests/coretests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java
rename to core/tests/timetests/src/android/service/timezone/TimeZoneProviderSuggestionTest.java
diff --git a/services/core/java/com/android/server/timedetector/TEST_MAPPING b/services/core/java/com/android/server/timedetector/TEST_MAPPING
index f1bfea7..5c37680 100644
--- a/services/core/java/com/android/server/timedetector/TEST_MAPPING
+++ b/services/core/java/com/android/server/timedetector/TEST_MAPPING
@@ -1,14 +1,6 @@
{
"presubmit": [
{
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.timedetector."
- }
- ]
- },
- {
"name": "CtsTimeTestCases",
"options": [
{
@@ -16,5 +8,11 @@
}
]
}
+ ],
+ // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
+ "postsubmit": [
+ {
+ "name": "FrameworksTimeServicesTests"
+ }
]
}
diff --git a/services/core/java/com/android/server/timezonedetector/TEST_MAPPING b/services/core/java/com/android/server/timezonedetector/TEST_MAPPING
index 455accd..63dd7b4 100644
--- a/services/core/java/com/android/server/timezonedetector/TEST_MAPPING
+++ b/services/core/java/com/android/server/timezonedetector/TEST_MAPPING
@@ -1,14 +1,6 @@
{
"presubmit": [
- {
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.timezonedetector."
- }
- ]
- },
- {
+ {
"name": "CtsTimeTestCases",
"options": [
{
@@ -21,6 +13,9 @@
"postsubmit": [
{
"name": "CtsLocationTimeZoneManagerHostTest"
+ },
+ {
+ "name": "FrameworksTimeServicesTests"
}
]
}
diff --git a/services/tests/servicestests/src/com/android/internal/location/timezone/OWNERS b/services/tests/servicestests/src/com/android/internal/location/timezone/OWNERS
deleted file mode 100644
index 28aff18..0000000
--- a/services/tests/servicestests/src/com/android/internal/location/timezone/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bug component: 847766
-nfuller@google.com
-include /core/java/android/app/timedetector/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/OWNERS b/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
deleted file mode 100644
index a0f46e1..0000000
--- a/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 847766
-include /services/core/java/com/android/server/timedetector/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TEST_MAPPING b/services/tests/servicestests/src/com/android/server/timedetector/TEST_MAPPING
deleted file mode 100644
index a83d8bf..0000000
--- a/services/tests/servicestests/src/com/android/server/timedetector/TEST_MAPPING
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
- "postsubmit": [
- {
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.timedetector."
- }
- ]
- }
- ]
-}
diff --git a/services/tests/servicestests/src/com/android/server/timezone/OWNERS b/services/tests/servicestests/src/com/android/server/timezone/OWNERS
deleted file mode 100644
index d64cbcd..0000000
--- a/services/tests/servicestests/src/com/android/server/timezone/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 847766
-include /services/core/java/com/android/server/timezone/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TEST_MAPPING b/services/tests/servicestests/src/com/android/server/timezonedetector/TEST_MAPPING
deleted file mode 100644
index f59188c..0000000
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TEST_MAPPING
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
- "postsubmit": [
- {
- "name": "FrameworksServicesTests",
- "options": [
- {
- "include-filter": "com.android.server.timezonedetector."
- }
- ]
- }
- ]
-}
diff --git a/services/tests/timetests/Android.bp b/services/tests/timetests/Android.bp
new file mode 100644
index 0000000..23ab859
--- /dev/null
+++ b/services/tests/timetests/Android.bp
@@ -0,0 +1,27 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
+android_test {
+ name: "FrameworksTimeServicesTests",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "androidx.test.rules",
+ "device-time-shell-utils",
+ "junit",
+ "junit-params",
+ "mockito-target-minus-junit4",
+ "platform-test-annotations",
+ "services.core",
+ "truth",
+ ],
+ libs: ["android.test.runner"],
+ platform_apis: true,
+ certificate: "platform",
+ test_suites: ["device-tests"],
+}
diff --git a/services/tests/timetests/AndroidManifest.xml b/services/tests/timetests/AndroidManifest.xml
new file mode 100644
index 0000000..62fbb05
--- /dev/null
+++ b/services/tests/timetests/AndroidManifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.framework.services.tests.time">
+
+ <!-- Required for user checks -->
+ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.framework.services.tests.time"
+ android:label="Frameworks Time Services Tests" />
+
+</manifest>
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS b/services/tests/timetests/OWNERS
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS
rename to services/tests/timetests/OWNERS
diff --git a/services/tests/timetests/TEST_MAPPING b/services/tests/timetests/TEST_MAPPING
new file mode 100644
index 0000000..b24010c
--- /dev/null
+++ b/services/tests/timetests/TEST_MAPPING
@@ -0,0 +1,8 @@
+{
+ // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows.
+ "postsubmit": [
+ {
+ "name": "FrameworksTimeServicesTests"
+ }
+ ]
+}
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/ArrayMapWithHistoryTest.java b/services/tests/timetests/src/com/android/server/timedetector/ArrayMapWithHistoryTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/ArrayMapWithHistoryTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/ArrayMapWithHistoryTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/ConfigurationInternalTest.java b/services/tests/timetests/src/com/android/server/timedetector/ConfigurationInternalTest.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/timedetector/ConfigurationInternalTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/ConfigurationInternalTest.java
index 808c1ec..392a48f 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/ConfigurationInternalTest.java
+++ b/services/tests/timetests/src/com/android/server/timedetector/ConfigurationInternalTest.java
@@ -33,14 +33,14 @@
import com.android.server.timedetector.TimeDetectorStrategy.Origin;
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import java.time.Instant;
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
/**
* Tests for {@link ConfigurationInternal} and associated {@link TimeCapabilitiesAndConfig}
* behavior.
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/FakeServiceConfigAccessor.java b/services/tests/timetests/src/com/android/server/timedetector/FakeServiceConfigAccessor.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/FakeServiceConfigAccessor.java
rename to services/tests/timetests/src/com/android/server/timedetector/FakeServiceConfigAccessor.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/FakeTimeDetectorStrategy.java b/services/tests/timetests/src/com/android/server/timedetector/FakeTimeDetectorStrategy.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/FakeTimeDetectorStrategy.java
rename to services/tests/timetests/src/com/android/server/timedetector/FakeTimeDetectorStrategy.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/GnssTimeSuggestionTest.java b/services/tests/timetests/src/com/android/server/timedetector/GnssTimeSuggestionTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/GnssTimeSuggestionTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/GnssTimeSuggestionTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java b/services/tests/timetests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/NetworkTimeSuggestionTest.java b/services/tests/timetests/src/com/android/server/timedetector/NetworkTimeSuggestionTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/NetworkTimeSuggestionTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/NetworkTimeSuggestionTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/NetworkTimeUpdateServiceTest.java b/services/tests/timetests/src/com/android/server/timedetector/NetworkTimeUpdateServiceTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/NetworkTimeUpdateServiceTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/NetworkTimeUpdateServiceTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/ReferenceWithHistoryTest.java b/services/tests/timetests/src/com/android/server/timedetector/ReferenceWithHistoryTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/ReferenceWithHistoryTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/ReferenceWithHistoryTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorInternalImplTest.java b/services/tests/timetests/src/com/android/server/timedetector/TimeDetectorInternalImplTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorInternalImplTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/TimeDetectorInternalImplTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java b/services/tests/timetests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java b/services/tests/timetests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
rename to services/tests/timetests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
index dd58135..c64ec72 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
+++ b/services/tests/timetests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
@@ -51,6 +51,9 @@
import com.android.server.timezonedetector.StateChangeListener;
import com.android.server.timezonedetector.TestStateChangeListener;
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -62,9 +65,6 @@
import java.util.ArrayList;
import java.util.List;
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
@RunWith(JUnitParamsRunner.class)
public class TimeDetectorStrategyImplTest {
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java
index 566c6b0..c77fe39 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java
@@ -35,12 +35,12 @@
import android.app.time.TimeZoneCapabilitiesAndConfig;
import android.app.time.TimeZoneConfiguration;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
/**
* Tests for {@link ConfigurationInternal} and associated {@link TimeZoneCapabilitiesAndConfig}
* behavior.
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/FakeServiceConfigAccessor.java b/services/tests/timetests/src/com/android/server/timezonedetector/FakeServiceConfigAccessor.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/FakeServiceConfigAccessor.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/FakeServiceConfigAccessor.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/FakeTimeZoneDetectorStrategy.java b/services/tests/timetests/src/com/android/server/timezonedetector/FakeTimeZoneDetectorStrategy.java
similarity index 98%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/FakeTimeZoneDetectorStrategy.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/FakeTimeZoneDetectorStrategy.java
index 1e72369..7439307 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/FakeTimeZoneDetectorStrategy.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/FakeTimeZoneDetectorStrategy.java
@@ -43,7 +43,7 @@
this::notifyChangeListeners);
}
- public void initializeConfigurationAndStatus(
+ void initializeConfigurationAndStatus(
ConfigurationInternal configuration, TimeZoneDetectorStatus status) {
mFakeServiceConfigAccessor.initializeCurrentUserConfiguration(configuration);
mStatus = Objects.requireNonNull(status);
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/GeolocationTimeZoneSuggestionTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/GeolocationTimeZoneSuggestionTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/GeolocationTimeZoneSuggestionTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/GeolocationTimeZoneSuggestionTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/LocationAlgorithmEventTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/LocationAlgorithmEventTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/LocationAlgorithmEventTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/LocationAlgorithmEventTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/MetricsTimeZoneDetectorStateTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/MetricsTimeZoneDetectorStateTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/MetricsTimeZoneDetectorStateTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/MetricsTimeZoneDetectorStateTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/OrdinalGeneratorTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/OrdinalGeneratorTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/OrdinalGeneratorTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/OrdinalGeneratorTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/ShellCommandTestSupport.java b/services/tests/timetests/src/com/android/server/timezonedetector/ShellCommandTestSupport.java
similarity index 89%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/ShellCommandTestSupport.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/ShellCommandTestSupport.java
index b96c82f..72b1819 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/ShellCommandTestSupport.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/ShellCommandTestSupport.java
@@ -29,10 +29,17 @@
public final class ShellCommandTestSupport {
private ShellCommandTestSupport() {}
+ /**
+ * Returns a {@link ShellCommand} from the supplied String, where elements of the command are
+ * separated with spaces. No escaping is performed.
+ */
public static ShellCommand createShellCommandWithArgsAndOptions(String argsWithSpaces) {
return createShellCommandWithArgsAndOptions(Arrays.asList(argsWithSpaces.split(" ")));
}
+ /**
+ * Returns a {@link ShellCommand} from the supplied list of command line elements.
+ */
public static ShellCommand createShellCommandWithArgsAndOptions(List<String> args) {
ShellCommand command = mock(ShellCommand.class);
class ArgProvider {
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TestCallerIdentityInjector.java b/services/tests/timetests/src/com/android/server/timezonedetector/TestCallerIdentityInjector.java
similarity index 97%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TestCallerIdentityInjector.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TestCallerIdentityInjector.java
index f45b3a8..67b8cc2 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TestCallerIdentityInjector.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/TestCallerIdentityInjector.java
@@ -28,6 +28,7 @@
private int mCallingUserId;
private Integer mCurrentCallingUserId;
+ /** Initializes the calling user ID. */
public void initializeCallingUserId(@UserIdInt int userId) {
mCallingUserId = userId;
mCurrentCallingUserId = userId;
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TestCurrentUserIdentityInjector.java b/services/tests/timetests/src/com/android/server/timezonedetector/TestCurrentUserIdentityInjector.java
similarity index 95%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TestCurrentUserIdentityInjector.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TestCurrentUserIdentityInjector.java
index aad06d8..61f9260 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TestCurrentUserIdentityInjector.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/TestCurrentUserIdentityInjector.java
@@ -23,6 +23,7 @@
private Integer mCurrentUserId;
+ /** Initializes the current user ID. */
public void initializeCurrentUserId(@UserIdInt int userId) {
mCurrentUserId = userId;
}
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TestHandler.java b/services/tests/timetests/src/com/android/server/timezonedetector/TestHandler.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TestHandler.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TestHandler.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TestState.java b/services/tests/timetests/src/com/android/server/timezonedetector/TestState.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TestState.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TestState.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TestStateChangeListener.java b/services/tests/timetests/src/com/android/server/timezonedetector/TestStateChangeListener.java
similarity index 92%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TestStateChangeListener.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TestStateChangeListener.java
index 9cbf0a3..23f96a2 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TestStateChangeListener.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/TestStateChangeListener.java
@@ -27,6 +27,7 @@
mNotificationsReceived++;
}
+ /** Asserts the expected number of notifications have been received, then resets the count. */
public void assertNotificationsReceivedAndReset(int expectedCount) {
assertNotificationsReceived(expectedCount);
resetNotificationsReceivedCount();
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneCanonicalizerTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneCanonicalizerTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneCanonicalizerTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneCanonicalizerTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorInternalImplTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorInternalImplTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorInternalImplTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorInternalImplTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
index 03d406f..e52e8b6 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
@@ -72,6 +72,9 @@
import com.android.server.SystemTimeZone.TimeZoneConfidence;
import com.android.server.timezonedetector.TimeZoneDetectorStrategyImpl.QualifiedTelephonyTimeZoneSuggestion;
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -83,9 +86,6 @@
import java.util.List;
import java.util.function.Function;
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
/**
* White-box unit tests for {@link TimeZoneDetectorStrategyImpl}.
*/
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/FakeTimeZoneProviderEventPreProcessor.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/FakeTimeZoneProviderEventPreProcessor.java
similarity index 94%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/FakeTimeZoneProviderEventPreProcessor.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/FakeTimeZoneProviderEventPreProcessor.java
index f8d169b..e05d84f 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/location/FakeTimeZoneProviderEventPreProcessor.java
+++ b/services/tests/timetests/src/com/android/server/timezonedetector/location/FakeTimeZoneProviderEventPreProcessor.java
@@ -38,6 +38,7 @@
return timeZoneProviderEvent;
}
+ /** Enters a mode where {@link #preProcess} will always return "uncertain" events. */
public void enterUncertainMode() {
mIsUncertain = true;
}
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/HandlerThreadingDomainTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/HandlerThreadingDomainTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/HandlerThreadingDomainTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/HandlerThreadingDomainTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderControllerTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderControllerTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderControllerTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderControllerTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/LocationTimeZoneProviderTest.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/TestSupport.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/TestSupport.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/TestSupport.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/TestSupport.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/TestThreadingDomain.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/TestThreadingDomain.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/TestThreadingDomain.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/TestThreadingDomain.java
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/location/ZoneInfoDbTimeZoneProviderEventPreProcessorTest.java b/services/tests/timetests/src/com/android/server/timezonedetector/location/ZoneInfoDbTimeZoneProviderEventPreProcessorTest.java
similarity index 100%
rename from services/tests/servicestests/src/com/android/server/timezonedetector/location/ZoneInfoDbTimeZoneProviderEventPreProcessorTest.java
rename to services/tests/timetests/src/com/android/server/timezonedetector/location/ZoneInfoDbTimeZoneProviderEventPreProcessorTest.java