Reinstate the enforcement of stable core platform API usage
It appears as though change I3a39be5f0b8736de4822c6a14072c78d4e4ad89d accidentally stopped enforcing the use of the stable core platform API in AOSP when the changes from rvc-dev-plus-aosp-without-vendor were merged in. Unfortunately, since then some additional usages of legacy core platform APIs have crept in so this adds the affected modules to the list of modules allowed to use the legacy core platform APIs. Bug: 180399951 Test: m checkbuild Merged-In: Ieddaf859f568bc8ee486692474a4dec48b3d25e6 Change-Id: Iacbee67fa103279a9823bd26c559821b04849be6
This commit is contained in:
parent
5b58ea07dd
commit
6fb6cffce2
|
@ -19,10 +19,6 @@ import (
|
|||
"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{
|
||||
"ahat-test-dump",
|
||||
"android.car",
|
||||
|
@ -34,29 +30,44 @@ var legacyCorePlatformApiModules = []string{
|
|||
"art_cts_jvmti_test_library",
|
||||
"art-gtest-jars-MyClassNatives",
|
||||
"BackupFrameworksServicesRoboTests",
|
||||
"backuplib",
|
||||
"BandwidthEnforcementTest",
|
||||
"BlockedNumberProvider",
|
||||
"BluetoothInstrumentationTests",
|
||||
"BluetoothMidiService",
|
||||
"CarDeveloperOptions",
|
||||
"CarService",
|
||||
"CarServiceTest",
|
||||
"car-apps-common",
|
||||
"car-service-test-lib",
|
||||
"car-service-test-static-lib",
|
||||
"CertInstaller",
|
||||
"ConnectivityManagerTest",
|
||||
"ContactsProvider",
|
||||
"CorePerfTests",
|
||||
"core-tests-support",
|
||||
"CtsAppExitTestCases",
|
||||
"CtsContentTestCases",
|
||||
"CtsIkeTestCases",
|
||||
"CtsAppExitTestCases",
|
||||
"CtsLibcoreWycheproofBCTestCases",
|
||||
"CtsMediaTestCases",
|
||||
"CtsNetTestCases",
|
||||
"CtsNetTestCasesLatestSdk",
|
||||
"CtsSecurityTestCases",
|
||||
"CtsSuspendAppsTestCases",
|
||||
"CtsUsageStatsTestCases",
|
||||
"DeadpoolService",
|
||||
"DeadpoolServiceBtServices",
|
||||
"DeviceInfo",
|
||||
"DiagnosticTools",
|
||||
"DisplayCutoutEmulationEmu01Overlay",
|
||||
"DocumentsUIPerfTests",
|
||||
"DocumentsUITests",
|
||||
"DownloadProvider",
|
||||
"DownloadProviderTests",
|
||||
"DownloadProviderUi",
|
||||
"ds-car-docs", // for AAOS API documentation only
|
||||
"DynamicSystemInstallationService",
|
||||
"EmergencyInfo-lib",
|
||||
"ethernet-service",
|
||||
|
@ -73,6 +84,7 @@ var legacyCorePlatformApiModules = []string{
|
|||
"FrameworksServicesRoboTests",
|
||||
"FrameworksServicesTests",
|
||||
"FrameworksUtilTests",
|
||||
"FrameworksWifiTests",
|
||||
"hid",
|
||||
"hidl_test_java_java",
|
||||
"hwbinder",
|
||||
|
@ -95,6 +107,9 @@ var legacyCorePlatformApiModules = []string{
|
|||
"platform_library-docs",
|
||||
"PrintSpooler",
|
||||
"RollbackTest",
|
||||
"service-blobstore",
|
||||
"service-connectivity",
|
||||
"service-jobscheduler",
|
||||
"services",
|
||||
"services.accessibility",
|
||||
"services.backup",
|
||||
|
@ -136,10 +151,6 @@ var legacyCorePlatformApiModules = []string{
|
|||
"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{})
|
||||
|
||||
func init() {
|
||||
|
@ -149,12 +160,8 @@ func init() {
|
|||
}
|
||||
|
||||
func useLegacyCorePlatformApi(ctx android.EarlyModuleContext) bool {
|
||||
// In pre-master branches, we don't attempt to force usage of the stable
|
||||
// version of the core/platform API. Instead, we always use the legacy
|
||||
// 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
|
||||
_, found := legacyCorePlatformApiLookup[ctx.ModuleName()]
|
||||
return found
|
||||
}
|
||||
|
||||
func corePlatformSystemModules(ctx android.EarlyModuleContext) string {
|
||||
|
|
Loading…
Reference in New Issue