As part of that this change:
* Moves code that will be common to platform_bootclasspath and
bootclasspath_fragment from hiddenapi_singleton.go into
hiddenapi_modular.go.
* Fixes the tests in hiddenapi_singleton_test.go but intentionally
does not rename them or move them into a more appropriate place so
as to make it easier to see the differences. A TODO has been added
and these will be cleaned up in a follow up change.
Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
unchanged by this change
Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
The stubFlagsRule does three separate tasks:
1. It computes the set of modules that provide the stubs.
2. It scans all the modules to find the stub modules and retrieves the
paths to their dex files.
3. It constructs the ninja rule.
Of those three tasks, 1 and 3 will be same for the
platform_bootclasspath. Instead of searching all the modules for the
ones that provide the stubs it will simply add dependencies onto the
stub modules and retrieve the dex file paths from them.
This change extracts tasks 1 and 3 into separate methods for reuse. It
also parameterizes the generation of the ninja rule.
Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
unchanged by this change
Change-Id: I893845dbddc4b001dfd44d0e0b1c8a31b7f3f89f
Previously, there were two approaches used to construct the temporary
path needed by the commitChangeForRestat method and neither was
suitable for general use. One was:
android.PathForOutput(ctx, outputPath.Rel()+".tmp")
The other was:
combinedAidl.ReplaceExtension(ctx, "aidl.tmp")
The first approach would not work if the supplied path had been created
by PathForModuleOut() or similar as it would drop the module directory.
That could lead to the same path being used for multiple rules.
The second approach would not work for files with a different
extension.
The tempPathForRestat combines the two approaches so it can be used
generally with any WritablePath.
Bug: 179354495
Test: verified that the ninja rules that used these files were not
changed by these changes.
Change-Id: I4439dea0a823512c281eeb1366522fb49dceb4e3
Aggregates hidden API flag files from the bootclasspath_fragments which
will allow the hidden API flag files in frameworks/base/boot/hiddenapi
to be modularized and moved to the appropriate repo.
Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
by this change
also verified that changes to the fragment provided files do
affect the monolithic files.
Change-Id: Ifce14c9ef24c58c7ab1085475d85b61cfbfefecd
Previously, each category of flag file had its own property in the
hiddenAPIAugmentationInfo struct that required a lot of repetition
to use. This change moves the flag file specific handling into a
new hiddenAPIFlagFileCategory struct which allows use of the
hiddenAPIAugmentationInfo struct to be parameterized.
Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
by this change
Change-Id: I4413134c0c9382139bef3813f847e453f426692c
This change moves the generation of the global hidden API flags from
the singleton to the platform_bootclasspath module. It involves:
1. Moving the ruleToGenerateHiddenApiFlags to hiddenapi_modular.go.
2. Adding HiddenAPIAugmentationProperties to be used by the
platform_bootclasspath type.
3. Moving the file paths into the platform-bootclasspath module
definition in frameworks/base/boot/Android.bp.
The flagsRule is kept as a placeholder for now. The emptyFlagsRule is
also kept so that builds continue to work even when the frameworks/base
repository is not present.
Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
by this change
Change-Id: Idf4dd414a016831bfe04a01f93234c1c33819881
Extracts the code for creating the rule that creates the monolithic
hidden API flags file which is encoded into dex implementation jars.
This refactoring is in preparation for moving the functionality from
the hiddenapi_singleton into the platform_bootclasspath.
A follow up change will move the method into the new
hiddenapi_modular.go alongside the hiddenAPIAugmentationInfo as they
will both be used to perform hidden API processing for a
bootclasspath_fragment.
Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
by this change
Change-Id: I2729afa80cdfd2d1d4717365001648453d65632f