256 Commits

Author SHA1 Message Date
markchien
cd813a30ed Compile android-non-updatable with framework-tethering module-lib stub
To resolve framework-tethering's module-lib for android-non-updatable
API, compile android-non-updatable with
sdk_module-lib_current_framework-tethering.

Bug: 205658040
Test: make update-api && make

Change-Id: Ib4bd0312f6c621ba19552a2608e47f9158b0fe25
2021-11-12 23:13:18 +08:00
vichang
fc36d2f0a7 Merge "Add ART's module-lib to "module_current"" am: 2d6933bbae am: 66c446a38e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1740375

Change-Id: I47b87b730039fd837201c96386b3ddc5d6e5761e
2021-06-21 10:36:20 +00:00
Victor Chang
6b107a93e1 Add ART's module-lib to "module_current"
Bug: 157639992
Test: m droid
Change-Id: I435140f19a0f5a81310154728c828ac70e12192a
2021-06-17 23:51:12 +01:00
Anton Hansson
c954550513 Make ApiLint's new_since arg the merged txt file
ApiLint tries to only lint "new" APIs, i.e. those introduced since the
last frozen API. Using android-non-updatable's last frozen txt does not
work well for this, as it is incomplete API surface on its own, so
metalava cannot see all APIs that were present in the previous API
(such as methods inherited from ART), and so makes the wrong decisions
for which APIs are new.

Bug: 171506470
Test: m checkapi
Change-Id: I00d25f2ae0ba8f0ee6fa8564d86642efd74e0d44
Merged-In: I00d25f2ae0ba8f0ee6fa8564d86642efd74e0d44
(cherry picked from commit 4f90aa5148544f3bf9edebb68e02966f69a3ae03)
2021-06-07 14:42:59 +01:00
Anton Hansson
1f44941dcb Baseline SAM errors
With the finalization of SDK 31, metalava now detects certain old APIs
like new APIs and runs ApiLint to them. Because we cannot change these
shipped APIs, add them to baselines for now until the detection of new
apis can be improved.

Bug: 171506470
Bug: 190240500
Test: m checkapi
Change-Id: I62e7c911977165acc53b2151e7e44bb528a0ba92
2021-06-05 09:03:00 +01:00
Anton Hansson
4f90aa5148 Make ApiLint's new_since arg the merged txt file
ApiLint tries to only lint "new" APIs, i.e. those introduced since the
last frozen API. Using android-non-updatable's last frozen txt does not
work well for this, as it is incomplete API surface on its own, so
metalava cannot see all APIs that were present in the previous API
(such as methods inherited from ART), and so makes the wrong decisions
for which APIs are new.

Bug: 171506470
Test: m checkapi
Change-Id: I00d25f2ae0ba8f0ee6fa8564d86642efd74e0d44
2021-06-04 22:23:59 +01: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 d21107a1e8be2a0c34de3ab5ff26c966f4989ce7)
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
41ed19599d Revert "Add ART module-lib and system API to the collection"
This reverts commit e06e41e35841fff0e091bae2414cbd66b5c90234.

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
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
Anton Hansson
369bb74a97 Merge "Apply the same filtering for docstubs and jarstubs" am: 46dff8e09f am: 8f1928f4ca am: 9e8186aaaf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700027

Change-Id: I83b173302f75d5536e47fcbb221fe806c691536a
2021-05-11 12:59:34 +00:00
Anton Hansson
76ac4cc96f Apply the same filtering for docstubs and jarstubs
A package filter was previously applied to just the jarstubs package,
but not the docstubs. This lead to various internal classes appearing in
the public documentation. Fix that to apply the same filter for both.

This removes the following classes from the docs:
    android/telephony/PackageChangeReceiver
    com/android/net/module/util/CollectionUtils
    com/android/net/module/util/ConnectivityUtils
    com/android/net/module/util/NetworkCapabilitiesUtils
    com/android/net/module/util/NetworkIdentityUtils
    com/google/android/collect/Lists
    com/google/android/collect/Maps
    com/google/android/collect/Sets
    com/google/android/gles_jni/EGLConfigImpl
    com/google/android/gles_jni/EGLContextImpl
    com/google/android/gles_jni/EGLDisplayImpl
    com/google/android/gles_jni/EGLImpl
    com/google/android/gles_jni/EGLSurfaceImpl
    com/google/android/gles_jni/GLImpl
    com/google/android/util/AbstractMessageParser
    com/google/android/util/AbstractMessageParser$Acronym
    com/google/android/util/AbstractMessageParser$FlickrPhoto
    com/google/android/util/AbstractMessageParser$Format
    com/google/android/util/AbstractMessageParser$Html
    com/google/android/util/AbstractMessageParser$Link
    com/google/android/util/AbstractMessageParser$MusicTrack
    com/google/android/util/AbstractMessageParser$Part
    com/google/android/util/AbstractMessageParser$Photo
    com/google/android/util/AbstractMessageParser$Resources
    com/google/android/util/AbstractMessageParser$Smiley
    com/google/android/util/AbstractMessageParser$Token
    com/google/android/util/AbstractMessageParser$Token$Type
    com/google/android/util/AbstractMessageParser$TrieNode
    com/google/android/util/AbstractMessageParser$Video
    com/google/android/util/AbstractMessageParser$YouTubeVideo
    com/google/android/util/Procedure
    com/google/android/util/SmileyParser
    com/google/android/util/SmileyResources

Bug: 187386774
Test: diff framework-doc-stubs/../api-versions.xml before and after
Change-Id: I85b1485b4c5bc1b30a5d537e96d961382f298fb7
2021-05-10 17:06:04 +01:00
Anton Hansson
c7f5e7d439 Add targets to build doc-stubs for non-updatable
Like the jar stubs, the doc stubs need modularization to avoid depending
on module sources and instead being assembled by merging the doc stubs
of the constituent modules. This will allow generating e.g. the lint
database, annotation zips, and the documentation itself from prebuilts
(which in turn allows mixing e.g. non-updatable R with the latest
modules).

Move the defaults for the non-updatable jar stubs to the shared bp file
and reuse it for the non-updatable doc stubs, and add two targets for
the public and the system stubs.

Bug: 186197911
Test: m android-non-updatable-doc-stubs{,-system}
Merged-In: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
Change-Id: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
2021-05-07 13:51:28 +01:00
Anton Hansson
867f94c755 Add targets to build doc-stubs for non-updatable
Like the jar stubs, the doc stubs need modularization to avoid depending
on module sources and instead being assembled by merging the doc stubs
of the constituent modules. This will allow generating e.g. the lint
database, annotation zips, and the documentation itself from prebuilts
(which in turn allows mixing e.g. non-updatable R with the latest
modules).

Move the defaults for the non-updatable jar stubs to the shared bp file
and reuse it for the non-updatable doc stubs, and add two targets for
the public and the system stubs.

Bug: 186197911
Test: m android-non-updatable-doc-stubs{,-system}
Change-Id: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
2021-05-07 13:48:13 +01:00
Anton Hansson
059a42d17e Merge "Convert java_library_static to java_library" am: 0f6542d422 am: 6b26dfae04 am: 76dbe0d124
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686656

Change-Id: I381ce7489c4747a3f26d2821b2b1acdb2dab3195
2021-04-29 11:38:31 +00:00
Anton Hansson
0f6542d422 Merge "Convert java_library_static to java_library" 2021-04-29 10:45:25 +00: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-Valentin Onea
e93cf9e566 Merge "Replace source based system server stubs" 2021-04-28 15:06:22 +00:00
Anton Hansson
bbdd64be7d Convert java_library_static to java_library
They're the same, and the latter is preferred.

Test: presubmit
Change-Id: Ib201bccba60be2d3cd3a9fa940d9ab2ae22d5acf
2021-04-26 18:47:39 +01: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
Anton Hansson
dda049457b Merge "Rename and move stub defaults to modules/common" am: 373a27036b am: 3d7a4355c1 am: 25adb03255
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675888

Change-Id: I0a4eb4cf84973274920b4614f8eac63db38b7551
2021-04-23 11:41:56 +00:00
Anton Hansson
65057af935 Rename and move stub defaults to modules/common
These default need to be used by the module sdk repo, which doesn't
want to depend on frameworks/base. Move the defaults over there, and
give them a more obvious name at the same time.

Bug: 184839225
Test: m nothing
Change-Id: I543a0abad101fbaf2dae7486aadcb2c963842dc4
2021-04-22 17:55:55 +01:00
Anton Hansson
6312b4e6d9 Merge "Remove dependencies on art-notices jar" am: 69063e8646 am: a3d2533234 am: d52af43960
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684187

Change-Id: I11ca60b9723ed6089c090e108e75b07e61e261b2
2021-04-22 13:39:57 +00:00
Anton Hansson
83d858004c Remove dependencies on art-notices jar
These notices are now included in the art stub itself.

Bug: 173186484
Bug: 184839599
Test: m android_stubs_current && unzip -l | grep NOTICE
Change-Id: I0cfbedd729ed1178297674b5d589205d1f942abe
2021-04-22 10:23:44 +01:00
Anton Hansson
a325ab1202 Merge "Add visibility rules to StubLibraries.bp" am: 6c57d63fcd am: d30fc17ddd am: 8a19796728
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675886

Change-Id: Id741b27d4497f0ed76474b9bfedecb3b114765a5
2021-04-16 10:11:31 +00:00
Anton Hansson
6c57d63fcd Merge "Add visibility rules to StubLibraries.bp" 2021-04-16 08:52:46 +00:00
Anton Hansson
28bbba90d0 Merge "Remove custom android_test.jar disting" am: 6339fba8a8 am: 8049f5cda2 am: 2b221cb6ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675507

Change-Id: Ib57ebd1d648b66caf8e71d617533c66169eb93a3
2021-04-14 18:35:35 +00:00
Anton Hansson
22efcf8590 Merge "Run bpfmt on StubLibraries.bp" am: cf54ae883b am: 38658a5658 am: 30d0c52c6a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675506

Change-Id: Ie936c09e70c22558cffdfae4648b99291a4d1c80
2021-04-14 18:35:07 +00:00
Anton Hansson
86925687e6 Add visibility rules to StubLibraries.bp
Stubs libraries are public, other stuff is not.

Bug: 185128417
Test: m nothing
Change-Id: I2c378e39995a88bb34a8f88819c05e75223734fd
2021-04-14 18:58:23 +01:00
Anton Hansson
68615ec0c8 Remove custom android_test.jar disting
This jar is dist already at apistubs/android/test/android.jar.

Bug: 185128417
Test: in production
Change-Id: Id972b3a8e4e6065bc09e4358e89c6423ed989295
2021-04-14 12:53:09 +01:00
Anton Hansson
240ee48eec Run bpfmt on StubLibraries.bp
It's part of the repo hooks now.

Test: No
Change-Id: Iccd07b1ce918fa50a166b106f281f31277391cea
2021-04-14 12:52:00 +01:00
Anton Hansson
1ea3057847 Merge "Update references incompatibilies files" 2021-04-13 18:03:59 +00:00
Anton Hansson
aec8866a37 Merge "Remove disabling of errorprone checks for stubs" am: 34fb03a88f am: 24eb9ef668 am: d7b991b329
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1671725

Change-Id: Ic64eec164c442ff8933d368e7ecda4d4266f4488
2021-04-13 16:30:32 +00:00
Anton Hansson
6b0e5aa9d5 Merge "Update references incompatibilies files" into sc-dev 2021-04-12 17:10:16 +00:00
Anton Hansson
65ffc7fabe Update references incompatibilies files
Use finer grain tracking targets, now they're available.

Bug: 178171189
Test: m android_{,system_,module_lib-}stubs_current \
        frameworks-base-api-{,system-,module-lib-}current-compat
Merged-In: I94e2ecd2075a577c5362293622ce5be5167cd91a
Change-Id: I94e2ecd2075a577c5362293622ce5be5167cd91a
2021-04-12 13:06:12 +01:00
Anton Hansson
7f3393d849 Update references incompatibilies files
Use finer grain tracking targets, now they're available.

Bug: 178171189
Test: m android_{,system_,module_lib-}stubs_current \
        frameworks-base-api-{,system-,module-lib-}current-compat
Change-Id: I94e2ecd2075a577c5362293622ce5be5167cd91a
2021-04-12 11:56:53 +01:00
Anton Hansson
d7440a1c68 Merge "Dist android-non-updatable.jar for sdk" am: e93771bfca am: 9ed545c4e7 am: 27fe7fa70e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1671727

Change-Id: I619111352f5510e69b6074ffcf11b8234fa3cc87
2021-04-12 10:39:12 +00:00
Anton Hansson
b63991e700 Merge "Compile android-non-updatable separately" am: e4d95a9e15 am: c26f163ad3 am: f2118995b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1671726

Change-Id: I7b36622e3355c1c8eb365813579958b8260c8c17
2021-04-12 10:38:29 +00:00
Anton Hansson
b2f9756d70 Remove disabling of errorprone checks for stubs
Doesn't appear to be necessary (?).

Test: RUN_ERROR_PRONE=true m javac-check lint-check
Change-Id: Iabe61ae39e97a8e419a6c39bcba12f3ed0b24ee9
2021-04-12 11:12:12 +01:00
Anton Hansson
a410891802 Dist android-non-updatable.jar for sdk
So that it is recorded when we finalize the SDK.

Bug: 184839599
Test: (cd out/dist; diff -r apistubs /tmp/apistubs-before)
    Only in apistubs/android/module-lib: android-non-updatable.jar
    Only in apistubs/android/public: android-non-updatable.jar
    Only in apistubs/android/system: android-non-updatable.jar
    Only in apistubs/android/test: android-non-updatable.jar
Change-Id: I8fe2d46b4574e602f258ab6f941e07443dfdd2a7
2021-04-09 13:41:11 +01:00
Anton Hansson
a4748cd10d Compile android-non-updatable separately
The java stubs for android-non-updatable were previously only compiled
into the "main android stubs" target. This change refactors the build so
that we compile android-non-updatable stubs as a separate jar file. That
jar is then statically included into the main android stubs, making it
effectively a noop for the existing stub.

This has the benefit of making it possible to finalize the
android-non-updatable when the rest of the SDK artifacts are frozen,
so that we can later re-create android.jar with a mix of different
android-non-updatable and module stubs.

Bug: 184839599
Test: `m sdk dist` && diff -r out/apistubs{before,after}
Change-Id: I624e2e7ab5723eb5e27cf26dbe247aac2a799b72
2021-04-09 13:35:10 +01:00
Anton Hansson
6603593474 Separate out lists of modules from build rules
This simplifies management of the build rules across different branches
that may have different lists of modules.

Additionally, we dedupe the list of module system stubs.

Bug: 184839225
Test: m
Merged-In: Ibef1fb686305b5b1b50811b7d1c6d677d07d7177
Change-Id: Ibef1fb686305b5b1b50811b7d1c6d677d07d7177
2021-04-09 10:38:35 +01:00
Anton Hansson
33b9b855f3 Separate out lists of modules from build rules
This simplifies management of the build rules across different branches
that may have different lists of modules.

Additionally, we dedupe the list of module system stubs.

Bug: 184839225
Test: m
Change-Id: Ibef1fb686305b5b1b50811b7d1c6d677d07d7177
2021-04-09 10:22:34 +01:00
Anton Hansson
28e58b4783 Merge "Add a shared filegroup for non-updatable stub sources" am: 4ffb28c5f3 am: 4d79002c3c am: 916e38597d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655731

Change-Id: I1ac2e12c782acac9087ff741676406557a19859e
2021-03-30 18:32:35 +00:00
Anton Hansson
77ff72fd71 Add a shared filegroup for non-updatable stub sources
It is always a mistake to add something to the stub sources but not
the doc stub sources.

Test: m
Change-Id: I6b76f5d2c7f0adc01b8a9eb141f2f34d9c2d2967
2021-03-30 10:45:27 +01:00
Colin Cross
9c3cceac50 Merge "Use framework-annotation-libs for hwbinder-stubs-docs" am: 35f70208f8 am: b4f0aacecd am: ad8bcb3ac6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652998

Change-Id: I786eec77e59d86f204108830a5f2f1eca4a815ed
2021-03-26 19:27:42 +00:00
Colin Cross
037d7fb498 Use framework-annotation-libs for hwbinder-stubs-docs
hwbinder.stubs and hwbinder-stubs-docs use SystemApi annotations.
Provide an explicit definition of SystemApi to metalava by adding
framework-annotations-libs to libs so it doesn't find it on its
own without a dependency.  Replace stub-annotations with
framework-annotations-libs in hwbinder.stubs for consistency.

Bug: 153703940
Test: m hwbinder.stubs
Change-Id: I777d68e446f8c7c1064667fd7c07b1e2ee6bfb1b
2021-03-26 17:44:07 +00:00
Colin Cross
1d0d1b3d6e Merge "Use stub-annotations to provide NonNull for hwbinder-stubs-docs" am: c4b72cd7ef am: 950e51fbd4 am: 4ee9e4609f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1636905

Change-Id: I7a1b447f85bda54aa00847918146e4ccff4ab0d5
2021-03-17 22:21:51 +00:00
Colin Cross
4ea5318b7f Use stub-annotations to provide NonNull for hwbinder-stubs-docs
The annotations in srcs aren't doing anything because they are all
@hide.  The only thing keeping hwbinder-stubs-docs compiling is
a hack in metalava that treats anything with
hwbinder-stubs-docs-stubs.srcjar.rsp in its input files as
effectively having annotations_enabled: false.

Remove the unnecessry srcs, and add stub-annotations, which contains
a stub definition for android.annotation.NonNull, to hwbinder.stubs.
None of the rest of the annotations in srcs are used in the
generated stubs.

Test: m hwbinder.stubs
Change-Id: I7ec9afb41ea9617f25d1dffd3382fed90997b751
2021-03-15 17:55:19 -07:00