- Car framework has removed system APIs.
- These APIs should be tracked at run-time.
Bug: 154832144
Test: 1) android.signature.cts.api.AnnotationTest#testAnnotation
2) diff $OUT/soong/hiddenapi/hiddenapi-flags.csv before and after this CL
Change-Id: I9813df4b514da41e82d45e6c0bc92643916fe0d8
This reverts commit b0dc851ff4.
Reason for revert: relanding original change. Build failures were
caused by a race with another CL: https://r.android.com/1320920
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ic9016582dae7773b4d4f84a63425f1ef7a5d061f
This is a prerequisite change before adding DexJarInstallPath.
Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I033e08b8bb06c0a844a6bbbfcdc48ce33e9c95cf
Use droidstubs for public and system stubs to provide a list of @removed APIs. As these APIs are not present in the stubs, they are not whitelisted / greylised automatically. Keep them on greylist manually.
Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Merged-In: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Exempt-From-Owner-Approval: clean cherry-pick
(cherry picked from commit c7fb5c9964)
Use droidstubs for public and system stubs to provide a list of @removed APIs. As these APIs are not present in the stubs, they are not whitelisted / greylised automatically. Keep them on greylist manually.
Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Flow:
1. Annotation processor generates a CSV file per class as a CLASS_OUTPUT resource.
2. hiddenapi.go extracts individual .csv files and merges them into an index.csv file per module.
3. hiddenapi_singleton.go merges individual index.csv files into a combined .csv file.
In a follow up hiddenapi-index.csv would replace unsupportedappusage_index.csv
Bug: 145132366
Change-Id: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Merged-In: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Test: diff unsupportedappusage_index.csv hiddenapi-index.csv
Exempt-From-Owner-Approval: cp from r.android.com/1239709
Flow:
1. Annotation processor generates a CSV file per class as a CLASS_OUTPUT resource.
2. hiddenapi.go extracts individual .csv files and merges them into an index.csv file per module.
3. hiddenapi_singleton.go merges individual index.csv files into a combined .csv file.
In a follow up hiddenapi-index.csv would replace unsupportedappusage_index.csv
Bug: 145132366
Change-Id: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Test: diff unsupportedappusage_index.csv hiddenapi-index.csv
Original Commit Message:
"""
Rename modules that are APEX-only
The renamed modules are only available for APEXes, but not for the
platform. Use the <module_name>.<apex_name> syntax to correctly install
the APEX variant of the modules.
"""
Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds.
Reverted Changes:
I190ce2d10:Use apex_available property
I990e0a67e:Use apex_available property
I0d1295683:Revert "Avoid duplicated classes for boot dex jars...
I5fb725403:Find the jar libraries in APEX from the correct pa...
I322b1efcc:Rename modules that are APEX-only
Ifa2bd0f8f:Use apex_available property
Iac6533177:Use apex_available property
Ie999602c6:Use apex_available property
I2a3d73397:Use apex_available property
Ic91bcbb9a:Use apex_available property
Ia6c324eed:Use apex_available property
I964d0125c:Use apex_available property
Change-Id: I48b998629b0676cd7353e6844fd87585e0e42989
This reverts commit 2812df4edb.
This is no longer required as we have
I6463ebc59cf7fd861b812999d7a79c387bbb3335.
hostdex files are available even when the module doesn't have
"//apex_available:platform"
Bug: 128708192
Test: m
Change-Id: I0d1295683222bc9cdbb82630e61ab3421c717daf
When a boot classpath java library is directly or indirectly included in
APEXes, multiple variant of the library exist. When running the
hiddenapi tool, we need to eliminate the duplication, otherwise the tool
will complain.
Previously, we simply choose the platform variant of the java library
among the multiple variants. However, if the java library is marked not
available for the platform (i.e. "//apex_available:platform" is not in
the apex_available property), the platform variant does not exist and
thus it is not fed into the hiddenapi tool, which causes missing
references in the tool.
To solve the problem, the platform variant is selected only for the java
libs that are available for the platform. For those libs that are not
available for the platform, we choose one variant of it using a
heuristic; skip testing APEXes and choose com.android.art.release among
the com.android.art.* variants.
Bug: 128708192
Test: m
Change-Id: I33bf297eb3029696ae3504a011486210708fb2c2
Just like native libs, a java library that is included in an APEX is
mutated for the APEX. This allows us to infer the context (e.g.
sdk_version, etc.) for building a java library in an APEX.
Bug: 138182343
Test: apex_test added
Change-Id: I9292ea097b98e74a8a794f164bd2bed3921d6337
This change fixes two problems:
1) the prebuilt apexes are force disabled for the unbundled builds
because we need to build the modules from the source then
2) the dependencies from an sdk_library module to
*.stubs.{public|system|tests} are not added for the unbundled build
because the stubs modules are disabled.
Bug: 137282010
Test: unbundled mainline builds are successful
Test: build com.android.media and inspect the jar file to see if
hiddenapi flags are there
$ cd out/dist/mainline_modules_arm
$ unzip com.android.media.apex apex_payload.img
$ mkdir -p mnt
$ sudo mount -o ro,loop apex_payload.img mnt
$ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi
shows results
Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc
This reverts commit 7b8a567f44.
Bug: 137282010
Test: With the CL above this one, the unbundled mainline module build
does not fail.
Change-Id: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17
The build generates a file out/soong/hiddenapi/hiddenapi-flags.csv
which is used by the hiddenapi-blacklist tests in cts/tests/signature.
The generation is done at the ninja level and so is not accessible from
the soong layer that runs on top. This change adds the hiddenapi-flags
module type which makes the file accessible from other soong modules.
Bug: 122332514
Test: atest -p cts/tests/signature
Change-Id: If38c8a8ffca110f2ae01f97f19a2740ca3fde1b7
Exempt-From-Owner-Approval: Colin has already reviewed and only had minor
nits and this is blocking other changes.
Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags
or encode dex files even if frameworks/base exists.
Bug: 133343287
Test: mainline modules build
Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46
Fix a panic after reporting an error when a module is listed
in ProductHiddenAPIStubs but doesn't exist or doesn't produce
a dex jar.
Test: manual
Change-Id: I43643cbc5303536bfe0b02feedb03563ea0b540a
@SystemApi and @TestApi entries in the whitelist can now be
differentiated from the rest of the public apis.
Test: m
Change-Id: Ie6a0108540cffe11992739d6391531401378f14b
If the android.test.base is not on the bootclasspath then its stubs
should not be used as input to the hiddenapi processor.
Bug: 73711752
Test: make REMOVE_ATB_FROM_BCP=true droid && atest -p cts/tests/signature
Change-Id: Ib03899001e4350c9ad9e757e9e6d7d41bb0a3896
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.
This reapplies I886f803d9a3419a43b2cae412537645f94c5dfbf with
fixes to disable preopt for Soong-only builds when the global
dexpreopt.config doesn't exist.
Test: all soong tests
Test: m checkbuild
Change-Id: I4dae9ecd5de22f062f9478ec8f0747f099cf8190
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.
Test: all soong tests
Test: m checkbuild
Change-Id: I886f803d9a3419a43b2cae412537645f94c5dfbf
Register any Singletons that implement a MakeVars method as
MakeVarsProviders, and convert the hiddenapi singleton to
use it.
Test: m checkbuild
Change-Id: I6a2044ad34ef46a8b267762ddfeb51aa01d7734d
The presingleton is no longer necessary now that MakeVarsContext
is a PathContext, just call hiddenAPISingletonPaths directly.
Test: m checkbuild
Test: forrest build of unbundled branch
If no module uses hiddenapi (because it is an unbundled build that
does not build any boot image modules), then the makevars singleton
panics because it will always run before the hiddenapi singleton
(due to package init() function ordering), and the hiddenapi singleton
paths have not been initialized yet. Add a presingleton to initialize
the paths early.
Bug: 123645297
Test: tapas Launcher3 && m on unbundled branch
Change-Id: I9386ac87848a2181f51140129288df80fff9acfd
Move the rules that build hiddenapi-stubs-flags.txt,
hiddenapi-flags.csv and hiddenapi-greylist.csv into Soong.
Bug: 123645297
Test: m checkbuild
Test: m UNSAFE_DISABLE_HIDDEN_API_FLAGS=true
Change-Id: I90bf58710f6153ee8565994f799d3ec5699bc7fa