Commit graph

13 commits

Author SHA1 Message Date
Colin Cross
9c74a1ee85 Don't build hiddenapi flags or encode dex for unbundled builds
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
2019-05-28 21:48:54 +00:00
Colin Cross
caa0e1e341 Fix panic when missing hiddenapi jar
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
2019-04-02 13:03:46 -07:00
Andrei Onea
896237b7b9 Automatically greylist code in 3P packages
Bug: 129387816
Test: m appcompat
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: Id55abed766a6de6a2c032ee12d5153ab73a8d65c
2019-03-29 16:51:43 +00:00
Andrei Onea
e04da07dfe Differentiate system and test apis in whitelist
@SystemApi and @TestApi entries in the whitelist can now be
differentiated from the rest of the public apis.

Test: m
Change-Id: Ie6a0108540cffe11992739d6391531401378f14b
2019-03-01 17:44:13 +00:00
Paul Duffin
719fed4e95 Fix hiddenapi issue when REMOVE_ATB_FROM_BCP=true
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
2019-02-28 16:15:44 +00:00
Allen Hair
de816cf577 Whitelist Offline.getProbes(..).
Test: atest -v -it CtsSystemUiTestCases -- --abi x86 --test-arg com.android.tradefed.testtype.AndroidJUnitTest:coverage:true
Bug: 122330976
Change-Id: Ieb4a8808de6a3e062297c6a0b9e83a3872247eee
2019-02-25 16:49:05 -08:00
Colin Cross
69f59a3327 Make RuleBuilder methods take Paths
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
2019-02-20 22:06:09 -08:00
Colin Cross
ab898dc4a4 Revert "Make RuleBuilder methods take Paths"
This reverts commit acdd694071.

Reason for revert: broke ndk build

Change-Id: I5655e48c15eb8f5f0267afdd853fbc25765b8623
2019-02-21 05:03:00 +00:00
Colin Cross
acdd694071 Make RuleBuilder methods take Paths
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
2019-02-20 14:23:37 -08:00
Colin Cross
ed023eca73 Allow Singletons to export Make variables
Register any Singletons that implement a MakeVars method as
MakeVarsProviders, and convert the hiddenapi singleton to
use it.

Test: m checkbuild
Change-Id: I6a2044ad34ef46a8b267762ddfeb51aa01d7734d
2019-02-19 12:45:14 -08:00
Colin Cross
697412f058 Remove the hiddenapi presingleton
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
2019-02-07 22:31:44 +00:00
Colin Cross
76e3e1f554 Use a presingleton to create hiddenapi singleton paths early
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
2019-02-07 08:57:26 -08:00
Colin Cross
f24a22a98a Move hiddenapi singleton rules to Soong
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
2019-02-06 11:23:40 -08:00