Merge "Reinstate the enforcement of stable core platform API usage"
This commit is contained in:
commit
a0acfa8b85
|
@ -19,10 +19,6 @@ import (
|
||||||
"android/soong/java/config"
|
"android/soong/java/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This variable is effectively unused in pre-master branches, and is
|
|
||||||
// included (with the same value as it has in AOSP) only to ease
|
|
||||||
// merges between branches (see the comment in the
|
|
||||||
// useLegacyCorePlatformApi() function):
|
|
||||||
var legacyCorePlatformApiModules = []string{
|
var legacyCorePlatformApiModules = []string{
|
||||||
"ahat-test-dump",
|
"ahat-test-dump",
|
||||||
"android.car",
|
"android.car",
|
||||||
|
@ -34,29 +30,44 @@ var legacyCorePlatformApiModules = []string{
|
||||||
"art_cts_jvmti_test_library",
|
"art_cts_jvmti_test_library",
|
||||||
"art-gtest-jars-MyClassNatives",
|
"art-gtest-jars-MyClassNatives",
|
||||||
"BackupFrameworksServicesRoboTests",
|
"BackupFrameworksServicesRoboTests",
|
||||||
|
"backuplib",
|
||||||
"BandwidthEnforcementTest",
|
"BandwidthEnforcementTest",
|
||||||
"BlockedNumberProvider",
|
"BlockedNumberProvider",
|
||||||
"BluetoothInstrumentationTests",
|
"BluetoothInstrumentationTests",
|
||||||
"BluetoothMidiService",
|
"BluetoothMidiService",
|
||||||
|
"CarDeveloperOptions",
|
||||||
|
"CarService",
|
||||||
|
"CarServiceTest",
|
||||||
"car-apps-common",
|
"car-apps-common",
|
||||||
|
"car-service-test-lib",
|
||||||
|
"car-service-test-static-lib",
|
||||||
"CertInstaller",
|
"CertInstaller",
|
||||||
"ConnectivityManagerTest",
|
"ConnectivityManagerTest",
|
||||||
"ContactsProvider",
|
"ContactsProvider",
|
||||||
|
"CorePerfTests",
|
||||||
"core-tests-support",
|
"core-tests-support",
|
||||||
|
"CtsAppExitTestCases",
|
||||||
"CtsContentTestCases",
|
"CtsContentTestCases",
|
||||||
"CtsIkeTestCases",
|
"CtsIkeTestCases",
|
||||||
|
"CtsAppExitTestCases",
|
||||||
"CtsLibcoreWycheproofBCTestCases",
|
"CtsLibcoreWycheproofBCTestCases",
|
||||||
"CtsMediaTestCases",
|
"CtsMediaTestCases",
|
||||||
"CtsNetTestCases",
|
"CtsNetTestCases",
|
||||||
"CtsNetTestCasesLatestSdk",
|
"CtsNetTestCasesLatestSdk",
|
||||||
"CtsSecurityTestCases",
|
"CtsSecurityTestCases",
|
||||||
|
"CtsSuspendAppsTestCases",
|
||||||
"CtsUsageStatsTestCases",
|
"CtsUsageStatsTestCases",
|
||||||
|
"DeadpoolService",
|
||||||
|
"DeadpoolServiceBtServices",
|
||||||
|
"DeviceInfo",
|
||||||
|
"DiagnosticTools",
|
||||||
"DisplayCutoutEmulationEmu01Overlay",
|
"DisplayCutoutEmulationEmu01Overlay",
|
||||||
"DocumentsUIPerfTests",
|
"DocumentsUIPerfTests",
|
||||||
"DocumentsUITests",
|
"DocumentsUITests",
|
||||||
"DownloadProvider",
|
"DownloadProvider",
|
||||||
"DownloadProviderTests",
|
"DownloadProviderTests",
|
||||||
"DownloadProviderUi",
|
"DownloadProviderUi",
|
||||||
|
"ds-car-docs", // for AAOS API documentation only
|
||||||
"DynamicSystemInstallationService",
|
"DynamicSystemInstallationService",
|
||||||
"EmergencyInfo-lib",
|
"EmergencyInfo-lib",
|
||||||
"ethernet-service",
|
"ethernet-service",
|
||||||
|
@ -73,6 +84,7 @@ var legacyCorePlatformApiModules = []string{
|
||||||
"FrameworksServicesRoboTests",
|
"FrameworksServicesRoboTests",
|
||||||
"FrameworksServicesTests",
|
"FrameworksServicesTests",
|
||||||
"FrameworksUtilTests",
|
"FrameworksUtilTests",
|
||||||
|
"FrameworksWifiTests",
|
||||||
"hid",
|
"hid",
|
||||||
"hidl_test_java_java",
|
"hidl_test_java_java",
|
||||||
"hwbinder",
|
"hwbinder",
|
||||||
|
@ -95,6 +107,9 @@ var legacyCorePlatformApiModules = []string{
|
||||||
"platform_library-docs",
|
"platform_library-docs",
|
||||||
"PrintSpooler",
|
"PrintSpooler",
|
||||||
"RollbackTest",
|
"RollbackTest",
|
||||||
|
"service-blobstore",
|
||||||
|
"service-connectivity",
|
||||||
|
"service-jobscheduler",
|
||||||
"services",
|
"services",
|
||||||
"services.accessibility",
|
"services.accessibility",
|
||||||
"services.backup",
|
"services.backup",
|
||||||
|
@ -136,10 +151,6 @@ var legacyCorePlatformApiModules = []string{
|
||||||
"wifi-service",
|
"wifi-service",
|
||||||
}
|
}
|
||||||
|
|
||||||
// This variable is effectively unused in pre-master branches, and is
|
|
||||||
// included (with the same value as it has in AOSP) only to ease
|
|
||||||
// merges between branches (see the comment in the
|
|
||||||
// useLegacyCorePlatformApi() function):
|
|
||||||
var legacyCorePlatformApiLookup = make(map[string]struct{})
|
var legacyCorePlatformApiLookup = make(map[string]struct{})
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -149,12 +160,8 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func useLegacyCorePlatformApi(ctx android.EarlyModuleContext) bool {
|
func useLegacyCorePlatformApi(ctx android.EarlyModuleContext) bool {
|
||||||
// In pre-master branches, we don't attempt to force usage of the stable
|
_, found := legacyCorePlatformApiLookup[ctx.ModuleName()]
|
||||||
// version of the core/platform API. Instead, we always use the legacy
|
return found
|
||||||
// version --- except in tests, where we always use stable, so that we
|
|
||||||
// can make the test assertions the same as other branches.
|
|
||||||
// This should be false in tests and true otherwise:
|
|
||||||
return ctx.Config().TestProductVariables == nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func corePlatformSystemModules(ctx android.EarlyModuleContext) string {
|
func corePlatformSystemModules(ctx android.EarlyModuleContext) string {
|
||||||
|
|
Loading…
Reference in New Issue