Commit Graph

32681 Commits

Author SHA1 Message Date
Anton Hansson
47ff71a902 Convert merged module lib stub to api.go
Bug: 169103987
Test: m framework-updatable-stubs-module_libs_api and diff intermediates
      folder before and after.
Change-Id: I6018791ae136bc764a6e846078c6bce59bcc123b
2022-01-13 15:07:09 +00:00
Anton Hansson
b108f75b9d Some minor tweaks for api.go
- Make constants for re-used hardcoded module names
- Add a removeAll function
- Move filtering into individual "create" methods.

Bug: 169103987
Test: mmm frameworks/base/api
Change-Id: Id81c93eafdbdbbd0f55a4a906150b58a001392f6
2022-01-13 15:04:13 +00:00
Anton Hansson
a8e3488cc3 Temporarily add support for conditional modules
Some bootclasspath libraries are currently conditionally included
in the SDK. Add support for that in api.go.

Bug: 169103987
Test: mmm frameworks/base/api
Change-Id: I7704a884675eb58c429a59f99a663cf09807ecec
2022-01-13 09:48:09 +00:00
Anton Hansson
7a173a626f Construct sdk-annotations.zip programmatically
Avoid hardcoding the list of modules in yet another place.

Bug: 169103987
Test: diff zip before & after (identical)
Change-Id: Id3983bf5f4b96b23b1da09fd3617870ac3926ea1
2022-01-12 14:45:22 +00:00
Anton Hansson
648e609e30 Replace manual genrule modules with combined_apis
This simplifies the addition of new modules by cutting down the number
of lists that the new module must be added to. The combined_apis module
generates equivalent genrules in a programmatic fashion.

Bug: 169103987
Test: `mmm frameworks/base/api` before and after and compare the soong
      intermediates of that folder.
Change-Id: Ia718f9374042e5fbb2168476f5bad3b1867b8a05
2022-01-12 12:27:37 +00:00
Anton Hansson
28eda09cf5 Refactor api.go to simplify Android.bp further
The gitlinter tool consumes the Android.bp file and from it mines
the module names of libraries that contribute to the public API surface.
The format required by the previous incarnation of api.go (creating a
list in Android.bp and passing that multiple times) did not lend itself
to being easily consumed by gitlinter.

So, change some of the constructs to simplify the Android.bp definition:
- hardcode a couple of "anomalies" inside the go code instead (which
  modules have only public APIs and what modules should be filtered
  from the lint DB). There's no real benefit to plumb them through the
  Android.bp.
- only pass the list of modules once (this allows inlining the list)

Also change the output filename of the genrules. This makes no practical
difference but does match the existing genrules.

Bug: 169103987
Test: in the followup-change that defines a combined_apis
Change-Id: I6715fa9d24603e3cbb8b09510b64c2bf6bac1f27
2022-01-12 12:27:30 +00:00
Anton Hansson
c99c94be5f Merge "Generate genrule modules for merged api txts" am: faea0b39ec am: 02bf418739 am: be5132914e am: 7cda9336dd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1853040

Change-Id: I8dbe15269ed213a19c6a4ead78275d4748cf86bd
2022-01-11 17:24:04 +00:00
Anton Hansson
0860aaf958 Generate genrule modules for merged api txts
Add a soong plugin that can generate the genrule definitions for the
merged api txt files. This will allow removing a lot of duplicated
lists in the Android.bp and simplify adding new modules.

Bug: 169103987
Test: follow-up that uses these rules (branch dependent)
Change-Id: I0c7a9921b7f4c5b74f8b652cb357abf9444ce93f
2022-01-10 16:50:27 +00:00
Anton Hansson
e73c58ed5a Merge "Remove references to win_sdk" am: dddbdc3b15 am: a9e069273a am: d8393273c3 am: a46d68e30e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1933148

Change-Id: I1ec863baceaa62ebedc669635928d5d981c30917
2022-01-05 19:40:51 +00:00
Anton Hansson
dd8ef67a61 Remove references to win_sdk
This goal doesn't exist anymore. The build system automatically
translates it to "sdk".

Test: m win_sdk dist && inspect out/dist/apistubs
Change-Id: Ifc4fb07ce32ef21906e8bb8eae0003b1486a525a
2022-01-04 08:57:28 +00:00
paulhu
f45fe96a54 Split out the nsd API surface and use framework-connectivity-tiramisu
- Split out nsd APIs and hidden APIs to Connectivity module.
- Keep the all files in f/b/packages/Connectivity-T and add
  framework-connectivity-tiramisu library on p/m/Connectivity.
  Then make framework to use this module library.
- Remove NsdService from SystemServer which will register from
  ConnectivityServiceInitializer

Bug: 206893064
Test: m online-sdk-dev-docs
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Change-Id: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
2021-12-15 02:10:38 +00:00
Gavin Corkery
bc0064491a Revert "Revert "Add SupplementalProcess stubs and bootclasspath ..."
Revert "Revert "Add framework-supplementalprocess to PRODUCT_APE..."

Revert^2 "Add framework-supplementalprocess prebuilts"

e0c2a4dea0d0e27abad0cd3e4d440ab8f82752e4

Change-Id: I98366465906bb6b78ecf75a9a2319f64feb25beb
2021-11-16 22:33:10 +00:00
Gavin Corkery
bddffaa432 Revert "Add SupplementalProcess stubs and bootclasspath fragment"
Revert "Add framework-supplementalprocess to PRODUCT_APEX_BOOT_JARS"

Revert "Add framework-supplementalprocess prebuilts"

Revert submission 16194363-supplementalprocess-stubs

Reason for revert: PDK build break
Reverted Changes:
Ie1d3605d2:Add SupplementalProcess stubs and bootclasspath fr...
I1ea34faba:Add framework-supplementalprocess to PRODUCT_APEX_...
I8ef2a4c0f:Add jars and fragment to SupplementalProcess apex
Ibf9444f89:Add framework-supplementalprocess prebuilts

Change-Id: Ic569389a4b3a54323c283e9573590686ce27f491
2021-11-15 20:39:32 +00:00
Gavin Corkery
1ed8ac994d Add SupplementalProcess stubs and bootclasspath fragment
Test: Builds
Bug: 204989700
Change-Id: Ie1d3605d2991fa0402db8238ca01e4aa6bad3fdb
2021-11-09 11:11:18 +00:00
Chun Zhang
a615ce518d Add nearby mainline module public/system Api to the collection.
Test: skip test for config change.
Bug: 204780849
Change-Id: I51d550cb9cc2a649b7ac5da2aa01d1cb2c7bbb52
2021-11-05 15:57:39 +00:00
Anton Hansson
cedf8bade7 Merge "Rename merged services.txt module" am: 74b15ca3c5 am: 58ae8524f5 am: 590544a108 am: 2e4629a729 am: 7fafe71ffc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1850198

Change-Id: Id0eba8d4c25a84c39e767d4738534880d422523e
2021-10-11 17:03:50 +00:00
Anton Hansson
74b15ca3c5 Merge "Rename merged services.txt module" 2021-10-11 15:57:02 +00:00
Anton Hansson
abce6f0784 Rename merged services.txt module
This makes it follow the same naming pattern as other modules
in this directory, which makes it easier to auto-generate.

Bug: 169103987
Test: m
Change-Id: I1c68a433808c034e83049239a72c9b505546bf20
2021-10-08 16:14:25 +01:00
Anton Hansson
766c2b1365 Merge "Add a tool for merging annotation.zip files" am: 0e4260d772 am: b370ca080a am: 7ccd3666d6 am: 0d084d8990 am: 0ac02ae06e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1837313

Change-Id: If90096b541453e70453069cb2596422001dacef0
2021-09-28 13:00:22 +00:00
Anton Hansson
b370ca080a Merge "Add a tool for merging annotation.zip files" am: 0e4260d772
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1837313

Change-Id: I3f2685923a00e0ef8bf9c6261eae93b5ede287b0
2021-09-28 10:46:16 +00:00
Anton Hansson
0e4260d772 Merge "Add a tool for merging annotation.zip files" 2021-09-28 10:27:22 +00:00
Treehugger Robot
bb68ff944e Merge "Set verbosity for api_versions_trimmer_unittests" am: 3b63045444 am: 86ac824eb9 am: ace5d30a1d am: b7105599ad am: 7335ef8e09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1837394

Change-Id: I1b41d956956888f96596415f13693a39936ad100
2021-09-28 01:03:18 +00:00
Treehugger Robot
86ac824eb9 Merge "Set verbosity for api_versions_trimmer_unittests" am: 3b63045444
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1837394

Change-Id: I5d572a1b11cf7025251b30c6257f0fe854185aea
2021-09-28 00:13:14 +00:00
Anton Hansson
e673784439 Add a tool for merging annotation.zip files
We now produce annotation.zip files individually for each module, but
for the public SDK it's easier to distribute a single zip file with
merged contents. Add a tool for merging these (simple) files.

Bug: 187397779
Test: unittest in cl
Test: diff tests in follow-on CL merging all module annotations.zip
Change-Id: Ic5bb94425dccafab43340805f73fafacab53cb28
2021-09-27 17:46:26 +01:00
yangbill
8ebeef3b20 Set verbosity for api_versions_trimmer_unittests
Tradefed will need the python unit test verbosity to be set as 2 to make
the test cases information could be parsing correctly.

Bug: 201273904
Test: atest api_versions_trimmer_unittests
Change-Id: I414eb9ec18dbe45e9d2360a5c1baa0bc0b315170
2021-09-27 21:42:53 +08:00
Anton Hansson
0e71107764 Merge "Make merged api compat checks output baseline" am: 6c20a2d6b2 am: c010164844 am: 25274a4c6c am: 3afc6af257 am: 5f21da5428
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1832239

Change-Id: I1274c2a17c54768e00733177cb09b0b9fdc45aa0
2021-09-23 06:33:48 +00:00
Anton Hansson
c010164844 Merge "Make merged api compat checks output baseline" am: 6c20a2d6b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1832239

Change-Id: If57aae144cb15d6704a36311b358e892f8ae4f2f
2021-09-21 17:32:26 +00:00
Anton Hansson
b8ce081c1a Make merged api compat checks output baseline
When intentional API breakages are made, the incompatibilities tracking
file must be updated. This makes the failing build rule output the
baseline/incompatibilities file that would have made the build rule
succeed. This file can then be used to update prebuilts/sdk.

Whilst here, also make metalava quiet so we don't need to capture
stdout.

Test: make breaking change, build compat rule, inspect output dir
Change-Id: Ia95b65548371329cd467fd3093db92b471e6986d
2021-09-21 16:29:41 +01:00
Roshan Pius
6c580dd473 Move existing UWB API classes to UWB apex
Following instructions from go/mainline-java-lib to move the existing
UWB API classes to the new apex.

Bug: 194906542
Test: Compiles
Change-Id: I08801b418c7ba42c76952f5a80745cd0057ca329
2021-08-10 11:35:09 -07:00
Pedro Loureiro
dea35e103b Add lint database filtering tool
lint database file (api-versions.xml) is used for NewApi checks. These checks
were written thinking about app developers.

When used inside the platform codebase, quite often it produces false positives
which make relying on it cumbersome.

This CL removes APIs introduced by mainline modules from the lint database to
remove many such false positives. While some of them might be real issues, the
alternative would be not turning these checks on at all.

Bug: 186478867
Bug: 177434707
Test: m lint-check
Test: m filter-api-versions
Test: atest api_versions_trimmer_unittests
Merged-In: Ic45db0b71a2f13dc456463ce04b2f7744a0e330c
Change-Id: Ic45db0b71a2f13dc456463ce04b2f7744a0e330c
2021-06-23 14:44:10 +01:00
Pedro Loureiro
b4350b9dc4 Merge "Add lint database filtering tool" into sc-dev 2021-06-22 13:20:04 +00:00
Pedro Loureiro
b91f45d6f4 Add lint database filtering tool
lint database file (api-versions.xml) is used for NewApi checks. These checks
were written thinking about app developers.

When used inside the platform codebase, quite often it produces false positives
which make relying on it cumbersome.

This CL removes APIs introduced by mainline modules from the lint database to
remove many such false positives. While some of them might be real issues, the
alternative would be not turning these checks on at all.

Bug: 186478867
Bug: 177434707
Test: m lint-check
Test: m filter-api-versions
Test: atest api_versions_trimmer_unittests
Change-Id: Ic45db0b71a2f13dc456463ce04b2f7744a0e330c
2021-06-22 10:24:22 +00:00
Anton Hansson
36fa15b7db Add more owners of API directory
This dir is home of the modularized SDK now. Add hansson and
modularization team as explicit owners so that we can e.g. approve new
modules being added.

Bug: 184125529
Test: No
Change-Id: I97802b98d24309759f9cf5d3192da6b80dc7657b
Merged-In: I97802b98d24309759f9cf5d3192da6b80dc7657b
2021-06-21 16:33:57 +01:00
Anton Hansson
f5da22e711 Add more owners of API directory
This dir is home of the modularized SDK now. Add hansson and
modularization team as explicit owners so that we can e.g. approve new
modules being added.

Bug: 184125529
Test: No
Change-Id: I97802b98d24309759f9cf5d3192da6b80dc7657b
2021-06-21 14:45:35 +01:00
Pedro Loureiro
29365193de Run bpfmt on api/Android.bp
Bug: 186478867
Test: m nothing
Change-Id: I4c7b49e6b5f9b3bec2aba305f8a6eb5e1d0561de
Merged-In: I4c7b49e6b5f9b3bec2aba305f8a6eb5e1d0561de
2021-06-16 11:42:09 +00:00
Pedro Loureiro
4f09b85b38 Run bpfmt on api/Android.bp
Test: m nothing
Change-Id: I4c7b49e6b5f9b3bec2aba305f8a6eb5e1d0561de
2021-06-09 10:59:32 +00:00
Victor Chang
9f5cdff6af Add ART module-lib and system API to the collection
Bug: 157639992
Test: m update-api
Merged-In: Icae91fd724dd1f827a61e0a7a248fd1db8532e53
Change-Id: Icae91fd724dd1f827a61e0a7a248fd1db8532e53
(cherry picked from commit d21107a1e8)
2021-05-20 09:08:24 +00:00
vichang
0799624dc7 Merge "Add ART module-lib and system API to the collection" 2021-05-19 12:27:25 +00:00
Victor Chang
d21107a1e8 Add ART module-lib and system API to the collection
Bug: 157639992
Test: m update-api
Change-Id: Icae91fd724dd1f827a61e0a7a248fd1db8532e53
2021-05-18 14:56:05 +01:00
Victor Chang
d59fb76bcb Merge "Revert "Add ART module-lib and system API to the collection"" into sc-dev 2021-05-13 23:47:34 +00:00
Victor Chang
41ed19599d Revert "Add ART module-lib and system API to the collection"
This reverts commit e06e41e358.

Reason for revert: http://b/188046814
Bug: 188046814
Test: vendor/google/cts/shim/build_all_shim.sh succeded

Change-Id: Id5618d40755782a7156bd2357a436a5f46ad950a
2021-05-13 17:22:00 +01:00
Anton Hansson
7f07dbd499 Merge "Suppress reflection errors and dedupe flags" am: 9e1ca7acf7 am: 2a4b485cc8 am: c3e35eb6ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1588352

Change-Id: Ibbaca4afcf04afda77c730b758dd6a16ad5315b4
2021-05-13 12:07:53 +00:00
Anton Hansson
aa26cc10db Suppress reflection errors and dedupe flags
Bug: 168689341
Test: m frameworks-base-api-current-compat
Change-Id: Ied6452849ef994424500b56a042983b92ecc41f2
2021-05-13 10:27:20 +01:00
Victor Chang
e06e41e358 Add ART module-lib and system API to the collection
Bug: 157639992
Test: m update-api
Change-Id: Id0c62abed4aa932f291b71dcd814d065bb59eb2c
2021-05-12 18:27:41 +01:00
Andrei-Valentin Onea
cfb5663717 Merge "Replace source based system server stubs" am: e93cf9e566 am: fef2035b4f am: d2a270b4e0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1642060

Change-Id: I7208c8e14772a8b5ef5c090fb3913973d9350a3a
2021-04-28 20:22:58 +00:00
Andrei Onea
faa271aa5e Replace source based system server stubs
Use the stubs obtained by merging the system server stubs from
non updatable code in the system server, and the system server apis
exposed by mainline modules in SYSTEMSERVERCLASSPATH.

Test: builds
Bug: 177640454
Change-Id: I3687aeb0a4905418d07c819f1091266aaf708558
2021-04-23 16:23:16 +01:00
Paul Duffin
f5195618f8 Merge "Move global hidden API flags generation to platform_bootclasspath" am: f277259089 am: 72b1ff135f am: 78f9593ff7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1670845

Change-Id: Ic3a1a3531016fa99e397a986bc05c2163d0f88bb
2021-04-12 20:59:22 +00:00
Paul Duffin
81af1f503c Move global hidden API flags generation to platform_bootclasspath
The global hidden API flags generation has moved from the singleton to
the platform_bootclasspath module type so this change provides the
paths to the additional hidden API flag configuration as part of the
definition of the platform-bootclasspath module.

Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
      by this change
Change-Id: Id82b45d2abd6ca2efcfd730689b1eda92d55978e
2021-04-12 11:05:08 +01:00
Anton Hansson
5092350643 Merge "Add a tool to dump git SHAs of API changes" am: 457ccf2d32 am: 20deed1e69 am: eed7191d86
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652488

Change-Id: Ia5a1269f650b9c9214a5499f18d1375cf5856b62
2021-04-08 12:31:04 +00:00
Anton Hansson
8caea0d426 Add a tool to dump git SHAs of API changes
Necessary for use by API council near the end of a release to verify
their server-side tool has filed bugs for all the API changes.

This utilized bazel-query to figure out what contributes to current.txt,
and then finds api subdirectories in the relevant directories. Finally,
it prints the non-merge SHAs of changes in those directories.

Test: frameworks/base/api/dump_api_shas.sh
Change-Id: I330bfe24fb4df5a8a9218241540f7a7ab3b66e2f
2021-04-07 17:33:10 +01:00