2035 Commits

Author SHA1 Message Date
Anton Hansson
215c5ee28d Remove always-empty variable
This has been empty since Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4.

Test: m
Change-Id: I7ac973f82dc07fb74e0aae80c10a68d3ae6e1d72
2020-07-15 13:02:35 +01:00
Dan Willemsen
e8727501ca Fix unzip timestamps
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/activity_actions.txt
  input: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata.zip
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/broadcast_actions.txt
  input: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata.zip
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/categories.txt
  input: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata.zip
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/features.txt
  input: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata.zip
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/service_actions.txt
  input: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata.zip
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/widgets.txt
  input: out/target/common/obj/PACKAGING/framework-doc-stubs-metadata.zip

Which was caused by unzip setting the timestamps of the output files to 2008.

Test: m out/target/common/obj/PACKAGING/framework-doc-stubs-metadata_intermediates/activity_actions.txt
Change-Id: Ie62b0f52eb9aae11db7899c363780daf7d2c0e95
2020-04-28 01:08:49 -07:00
Anton Hansson
82ab0c4fbe Remove obsolete dist rules
The API files are disted to the apistubs/ subdir now, and all
known users have been updated to use that path.

Bug: 152479829
Test: No
Change-Id: I224fd5af8ba740c6ad94bbbdb20f5d53509e51f6
2020-04-17 11:42:01 +01:00
Anton Hansson
ba367d3b7d Convert disting of api txt from mk to bp
droidstubs dist now dists the api file, so convert these manual
mk rules into bp dist instead.

Bug: 149293194
Test: m dist sdk && find out/dist/apistubs -name /android\.txt
Change-Id: I96052b427dc01a6d24b040ad0006129d4d1e48fb
Merged-In: I96052b427dc01a6d24b040ad0006129d4d1e48fb
2020-04-17 11:38:20 +01:00
Anton Hansson
9a01e55cb6 Add module_lib and system-server artifacts to sdk dist
Makes these artifacts available for the update_prebuilts script.

Bug: 149293194
Test: m win_sdk dist && find out/dist -type f
Change-Id: Ia1064e50e987433e5e308527c6770ba2d3e8bde3
Merged-In: Ia1064e50e987433e5e308527c6770ba2d3e8bde3
(cherry picked from commit 7b0414beb77aaf67124c3ef7f2a55a898772bd1d)
2020-03-20 15:22:20 +00:00
Artur Satayev
ec5a86fc08 Move hiddenapi lists droidcore calls to tools/platform-compat/.
Bug: 145132366
Test: m dist
Change-Id: I0863d428cdeb56551caa0fd548ab50fdcad96ece
2020-02-25 12:19:26 +00:00
Jerome Gaillard
b59a1cd637 Use Metalava to get SDK metadata for devtools
Metalava, not Doclava, should be used to extract the metadata used in
devtools. The files created then need to be copied into the SDK.

Bug: 142480924
Test: m sdk
Change-Id: I7eb15341fde9520d51a696a6416a63e6c19c71f9
2019-10-17 13:33:10 +01:00
Colin Cross
196fa2947e Remove framework.aidl rules
They are now located in build/soong/java/sdk.go.

Bug: 130798034
Bug: 122332340
Test: m checkbuild
Change-Id: I4e8ee725e660e52aa56c2a10b626dff517669869
2019-04-18 12:09:34 -07:00
Colin Cross
22ec2e68ff Don't run doc-comment-check-docs for update-api
update-api would be fast except that it spends ~4 minutes doing
doc-comment-check-docs.  doc-comment-check-docs isn't really
related to update-api, so lets just remove it.

Fixes: 124386818
Test: m update-api
Change-Id: I0f5311e98063786671c0d8b6a8db52351d9fcfd7
2019-02-13 17:22:47 -08:00
Colin Cross
c07f3823d7 Unzip offline-sdk-docs for m offline-sdk-docs or m docs
offline-sdk-docs is the most useful target for local developers
verifying documentation changes.  Unzip offline-sdk-docs.zip
into out/target/common/docs/offline-sdk/ whenever the offline-sdk-docs
or docs targets are built.

Fixes: 124115897
Test: m offline-sdk-docs
Change-Id: I92ce65742e7475cc64a688f2b1893c96ecfd2a52
2019-02-08 11:36:08 -08:00
Colin Cross
98d3da8651 Move hiddenapi rules to Soong
The hiddenapi rules are now in build/soong/java/hiddenapi_singleton.go.
The dist goals are still here for now.

Bug: 123645297
Test: m checkbuild
Change-Id: Id25b2bf0d6b49be2f908a4613f012773fb1f02c4
2019-02-05 12:49:54 -08:00
Treehugger Robot
f9ec508556 Merge "Do not generate greylist if UNSAFE_DISABLE_HIDDENAPI_FLAGS=true" 2019-01-31 19:25:59 +00:00
David Brazdil
17d16e84da hiddenapi: Expect public/private API as CSV
Refactor of `hiddenapi` changed the output format of public/private API
lists to a single CSV file. Change API list generation accordingly.

In order to avoid special-casing this CSV file, it is treated the same
as the CSV files produced by `class2greylist`. The merging rules are
relaxed so that signatures in CSV files are not checked against
a pre-initialized set of all signatures (previously generated from the
public/private API files). This should not lead to build errors as the
CSV files are always auto-generated, and a missing/extra signature will
be caught by `hiddenapi`.

API lists in frameworks/base/config are processed later and checked
that they are a subset of the signatures in CSV.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: I33f2cbaa15f2d423a75e6ca64abe1c5b0c40c86f
2019-01-19 15:57:36 +00:00
David Brazdil
4f895b2b16 Add SOONG_HIDDENAPI_FLAGS as hiddenapi_flags.csv dependencies
Hiddenapi build logic has moved to soong and list of flags.csv files
is now being passed to make files through SOONG_HIDDENAPI_FLAGS
variable. Adjust the build rule for hiddenapi_flags.csv accordingly.

Test: aosp compiles
Change-Id: I930f918fb36ce3532478035e83c2632559fd07b6
2019-01-18 16:18:06 +00:00
Adrian Roos
421ec93be2 Do not generate greylist if UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
Fixes: 122957987
Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true make droid
Change-Id: I0b5a18b9d989667122ad942b185b826b637fad89
2019-01-17 12:20:38 +00:00
Treehugger Robot
cb61d10c90 Merge "Add back doc-comment-check-docs back to checkbuild." 2018-12-13 19:10:07 +00:00
David Brazdil
d719f5131a Rename hiddenapi config files
Rename files to reflect new API list naming convention:
  light-greylist => greylist
  max-sdk-p-blacklist => greylist-max-p

This also removes unused files (private-dex.txt, public-dex.txt,
removed-dex.txt) and merges vendor.txt into greylist.txt.

Test: m appcompat
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Merged-In: I4922ecb011a03bef3fa105f8181d1851d2cc496a
Change-Id: I4922ecb011a03bef3fa105f8181d1851d2cc496a
2018-12-05 16:29:53 +00:00
Nan Zhang
96bb1ba1f3 Add back doc-comment-check-docs back to checkbuild.
Test: m -j checkbuild, and build was failed as expected.
Bug: b/118815658 b/120229228
Change-Id: I3a8e869f22e5040a63208169203feec15b847f2f
2018-11-30 19:50:55 +00:00
David Brazdil
89bf0f28bf Turn hidden API lists into a single CSV
Maintaining multiple text files has become too cumbersome as adding
each new category of API requires changes across many projects.
This patch changes generate_hiddenapi_lists.py to produce a single
CSV file in the format:

  <api_signature>,<flag1>,...,<flagN>

It can accept legacy API list files as input (for existing
frameworks/base/config/hiddenapi-*.txt files) as well as per-package
CSVs produced by class2greylist.

Test: m, check lists have not changed
Test: phone boots
Test: tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: Iebcef426ec93ea1d72b662bbff91d4e068fa0a70
2018-11-29 15:43:01 +00:00
Mathew Inwood
5037a7eb93 Merge "Merge hidden API metadata into a single CSV file." 2018-10-17 09:20:04 +00:00
Mathew Inwood
ea14c0c36f Merge hidden API metadata into a single CSV file.
Add a python script to merge the CSV files, dealing with the fact that the
source columns may differ due to the annotation properties present in the
source.

Add this new file and the existing greylist.txt files as dependencies of
the 'dist' target, so that they appear as artifacts on the build server.
This allows them to be processed later by reading them from the build
server.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
Bug: 117314178
Change-Id: Ib9e5da90e4c32333a3f4f02ee7f159f77086ae5e
2018-10-16 12:12:27 +01:00
Mathew Inwood
50dea42729 Add new "max-sdk-p blacklist".
This will contain greylist entries accessible by apps with a
targetSdkVersion of less than Q. Currently empty, will be populated in
follow up CLs.

For now, these APIs are just merged into the light greylist at build time,
pending support in the runtime for implementing the correct runtime
behavior.

Also fix a bug in sort_api.sh so it deals with empty API lists
correctly.

Bug: 115609023
Test: m
Change-Id: I213874062f393f96d120648a934ae5ad7aba93af
2018-10-15 16:38:12 +01:00
Treehugger Robot
61d0ec49ef Merge "Enable jdiff for api-stubs-docs" 2018-09-19 03:02:19 +00:00
Treehugger Robot
324083b211 Merge "Change the dist path of api files" 2018-09-18 02:29:44 +00:00
Nan Zhang
81f29f5cd6 Enable jdiff for api-stubs-docs
And also clean legacy MK code in Android.mk

Test: api-stubs-docs-diff
Bug: b/78245848
Change-Id: I733e0e2c29f8273db3ffb9730c70d5b4e2b1438d
2018-09-17 15:29:11 -07:00
David Brazdil
4a55eebf26 Revert "Check in P dark greylist, use it for hidden API list generation"
This reverts commit 3cc74c71ef907a76547424aea6597f7b2907e9fb.
We saw app crashes due stricter classification of non-SDK APIs.

Bug: 115284625
Bug: 113881436
Test: phone boots

Change-Id: I689d0fbf66fabeffa5032e13f2f1f314c50b6cc5
2018-09-11 11:43:07 +01:00
Mathew Inwood
5e37d22671 Include dark greylist entries from annotations.
@UnsupportedAppUsage annotations support setting a maxTargetSdk property
on the which results in the member being placed on the dark grey list,
or in future on a P or Q blacklist.

Bug: 114361293
Test: m
Change-Id: I33be28f8afb034a030bdf5cf29d43ba72f50bfcd
2018-09-07 16:52:25 +01:00
David Brazdil
081a589ad9 Mark hidden API lists .KATI_RESTAT
Change hidden API list generation build rule so that it checks if
outputs have changed and only commit them when changes have been made.
.KATI_RESTAT instructs ninja to restat the outputs and remove reverse
dependencies when rebuilding dependencies is not needed.

Bug: 113278235
Test: m appcompat
Change-Id: Ic3ec82534a6d79b6a85f865a6e9eb5f0b3f12424
2018-09-06 12:15:11 +01:00
David Brazdil
3cc74c71ef Check in P dark greylist, use it for hidden API list generation
We want to preserve the same semantics as P wrt dark greylist. This will
eventually become the "blacklist for target SDK >= P".

Bug: 113881436
Test: phone boots
Change-Id: I3bb72102e1d054eb0f2cae089ab633a0bc2bb276
2018-09-06 11:10:51 +01:00
Sundong Ahn
c21f78e238 Change the dist path of api files
The dist path of the api files are changed for consistency of dist path.

Test: make -j40 PRODUCT-sdk_phone_armv7-sdk dist sdk_repo
Change-Id: I8dae352288458f6305ab6a0e5210c042ab372e33
2018-09-03 15:13:31 +09:00
David Brazdil
8503b9045b Rewrite hidden API list generation in Python
Generating hidden API lists has grown in complexity and the original
Makefile rule has become a bottleneck for build times. Rewrite the
logic in Python.

Bug: 113278235
Bug: 73736106
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I63f03133d70260d06c55f482b844a4980dc6f734
2018-08-30 16:19:26 +01:00
David Brazdil
9b1068cc52 Support whitelist entries from class2greylist
Whitelist used to be the same as all entries in API stubs. This is no
longer true as libcore will generate hidden bridge methods which are
supposed to be whitelisted. CL in build/make calls class2greylist on
each boot classpath module to dump their list and this patch creates
a build rule for the new whitelist.

Bug: 112186571
Test: m appcompat, diff public-list.txt whitelist.txt
Change-Id: I7b3957ea9ed8bebb483609d94b1e6f169f4379dd
2018-08-23 10:35:05 +01:00
Colin Cross
432141676a Convert platformprotosnano and platformprotoslite to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Icfb0001df2e35b5ed799511ff4f2f563d626134b
2018-08-20 13:57:24 -07:00
Mathew Inwood
627a84c26a resolve merge conflicts of 606d3975b23ec725085f8ae16ba4074fd05a556a to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Merged-In: Iaed1cd6bc7419597510bfc1ab30a169f75e4ae3f
Merged-In: I681c1e97d0929cfb1d357b2243ecb210d18f9e87
Change-Id: I01782459e2b02f065671da640d675b898b4727fe
2018-08-06 16:30:26 +01:00
David Brazdil
80e6ac7d2c Revert^2: Start using new list of non-SDK APIs
The `hiddenapi` build tool has been extended to provide a full list
of non-SDK APIs in an effort to remove dependency on Doclava.
This patch changes the build rules generating non-SDK API lists to
start using hiddenapi's list instead of Doclava's.

Consequences:
(a) some greylist entries change signature (fixing Doclava varargs bug)
(b) cloned public fields are now whitelisted (b/79432238)
(c) new APIs need to be greylisted because they are used by apps

Bug: 79432238
Bug: 79409988
Bug: 76424618
Test: phone boots
Merged-In: I681c1e97d0929cfb1d357b2243ecb210d18f9e87
Change-Id: I681c1e97d0929cfb1d357b2243ecb210d18f9e87
(cherry picked from commit b59c36f51c3c4b7595718f325b38c11352237b2b)
2018-08-03 11:33:07 +00:00
Sundong Ahn
0cb078bba2 Merge "Change the "since" arguments generation."
am: ea77ee39f5

Change-Id: Ia00ed78e8b22875ad2aba2877f6a6b78f7683e81
2018-08-01 15:55:02 -07:00
Treehugger Robot
ea77ee39f5 Merge "Change the "since" arguments generation." 2018-07-31 23:47:44 +00:00
Nan Zhang
2a924543f6 Merge "Add offline/online-sdk-docs in Soong." into stage-aosp-master 2018-07-31 22:14:41 +00:00
TreeHugger Robot
6928e50c26 Merge "Frameworks: convert platformprotos to soong" into stage-aosp-master 2018-07-30 20:30:35 +00:00
Mathew Inwood
ffc8ebefca Merge "Merge generated greylists into final greylist."
am: aa863ca68e

Change-Id: Ia2686a52c5f53f7a82d6dfb70c5c9cf9430443dd
2018-07-26 01:43:37 -07:00
Nan Zhang
e9a76f7317 Add offline/online-sdk-docs in Soong.
Since support libraries have been migrated to Soong, these docs modules
currently are ready to be supported in Soong.

Bug: b/70351683
Test: m -j offline-sdk-docs
Change-Id: I8739d94909c7cc830c30fa3d1047d26761cc5076
Merged-In: I8739d94909c7cc830c30fa3d1047d26761cc5076
2018-07-25 17:42:36 -07:00
Andreas Gampe
37b0763a70 Frameworks: convert platformprotos to soong
(cherry picked from commit af27bf6662efb8bb9fb7943b0fdbac530b0cbc99)

Bug: 64328974
Test: m
Merged-In: I3729a3132c1ef07dded69801373edf51006fa623
Change-Id: I3729a3132c1ef07dded69801373edf51006fa623
2018-07-25 17:35:35 -07:00
Mathew Inwood
1b04588ea6 Merge generated greylists into final greylist.
With annotations for greylist entries, each java target generates it own
greylist.txt file. Merge all of these into the final greylist.txt.

Bug: 110868826
Test: m
Change-Id: I6a64c65000f1fd9f49e09b5b498bdccc3560d606
2018-07-23 18:06:58 +01:00
David Brazdil
c9b5e65747 Merge changes If285d71a,Iffe5be7c
am: f37950d8c3

Change-Id: I667c07fa75e0cc5badad3f297fc14316a2acfc42
2018-07-17 03:43:13 -07:00
Sundong Ahn
4ff08f6b5d Change the "since" arguments generation.
If we add a new sdk library starting with android, there is a build
error because of the wrong "since" argument. So we have to change to
android.txt and android.xml instead of android.* in since-arg.

Bug: 77577799
Test: Verified variable is the same before & after.
Change-Id: I3016181a97e565ebba67c1828d76ddf9a7d6f860
2018-07-16 18:41:36 +09:00
David Brazdil
6f6a126b9c Build dark greylist from public + light grey API
The dark greylist is meant to contain non-SDK APIs which are "related"
to APIs accessible to apps without restrictions. The list used to be
built as all non-SDK APIs in the same package as those on the light
greylist. That is not sufficient and should include the public SDK API
packages too.

This patch modifies the makefile to generate a list of public API DEX
signatures with Doclava and then use that as a basis for the dark
greylist generation.

Bug: 80461842
Bug: 64382372
Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt
Change-Id: I4b1588013f26661207126b4006cdef0a0fc8ae2c
2018-06-07 09:45:01 +00:00
David Brazdil
bad3bf6c22 Merge "Include in hidden API dark greylist based on package name" into pi-dev
am: f36144f575

Change-Id: I2f1e1ccd9de49b95f1c5439b13134cc166645612
2018-05-11 08:24:12 -07:00
David Brazdil
f24f0a9c71 Include in hidden API dark greylist based on package name
Dark greylist has so far been populated with the remaining class
members of classes listed on the light greylist. This patch changes
the rule to include all remaining classes and class members in the
same package (sub-packages not included).

Bug: 64382372
Test: make -j64 out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt
Change-Id: Icf3f60f1e776f092103c612fc3995ce0e66617ea
Merged-In: Icf3f60f1e776f092103c612fc3995ce0e66617ea
(cherry picked from commit 4c3c03129ba95dccab30ba7579dc91b97843271f)
2018-05-11 16:18:32 +01:00
David Brazdil
4c3c03129b Include in hidden API dark greylist based on package name
Dark greylist has so far been populated with the remaining class
members of classes listed on the light greylist. This patch changes
the rule to include all remaining classes and class members in the
same package (sub-packages not included).

Bug: 64382372
Test: make -j64 out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt
Change-Id: Icf3f60f1e776f092103c612fc3995ce0e66617ea
2018-05-11 13:27:26 +01:00
David Brazdil
259e1629af Manualy blacklist certain hidden APIs
Previous CL introduced the concept of populating the dark greylist
with remaining members of classes on the light greylist. This breaks
the assumption that some methods/fields will always remain blacklisted.
Introduce a new file which forces their blacklisting and adjust the
build rules accordingly.

Bug: 64382372
Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt
Merged-In: I8b20e03c50f4027a24d2a6081bedb08bc8a34011
Change-Id: I8b20e03c50f4027a24d2a6081bedb08bc8a34011
(cherry picked from commit 4b34f79a35a6602962ed1df1accd9d6ea6e41e77)
2018-05-09 09:33:42 +01:00