51 Commits

Author SHA1 Message Date
Anton Hansson
111e15841a Re-submit "Change the default docs build to use module stubs"
This reverts commit 7333a054d93fe75d7553cbb6707149fc8ae43508.

Reason for revert: Wifi fix: Ia82033ed22e9f07d982eb35740350ac1ef11fe49

Change-Id: I6ccb1d3fa6311bb66d78d93a567fddb1bb2d5be1
2021-10-26 14:12:10 +00:00
Anton Hansson
7333a054d9 Revert "Change the default docs build to use module stubs"
This reverts commit 4863931934083f806a6627600d1d91bb6edd42cc.

Reason for revert: broke the build due to missing wifi change

Change-Id: I9610a92c1b19aeb0ddab68d10f2abf2f9ed3a205
2021-10-26 14:09:46 +00:00
Anton Hansson
4863931934 Change the default docs build to use module stubs
The two are almost identical, and the target using sources as input
can be deleted.

The diffs that remain are minor and as far as I can tell OK:
- A few constants are removed from the metadata.zip. It looks to
  me like metalava was previously including @SystemApi constants in the
  public SDK's metadata. This bug is now worked around by only feeding
  metalava the public APIs.
- There are some very minor diffs in the docs of a few APIs.

Bug: 186197911
Test: build sdk before/after and diff
Change-Id: Iac7de64f353bc1467fc4b249e531f034ef702d51
2021-10-20 18:52:21 +01:00
Anton Hansson
1bf568ed3e Add build rule to merge annotation zips
This target produces nearly identical contents to the build target
framework-doc-stubs (the only diffs are in whitespace). Using this
module in the SDK zip will allow changing the inputs of
framework-doc-stubs to java sources that don't have all the annotations
(the jar stubs).

Bug: 187397779
Test: m sdk-annotations.zip and diff with framework-doc-stubs zip
Change-Id: Id163473c455f25c5f31c965d907c0c3b0e7755fc
2021-10-13 19:46:31 +01:00
Mohammad Samiul Islam
205229f5e9 Revert "Add build rule to merge annotation zips"
This reverts commit bab3cc34de78f7e737990a5f10a5c8341a26e30c.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_sc-dev-plus-aosp&target=build_test2&lkgb=7785129&lkbb=7785207&fkbb=7785207, bug b/201757759.

Bug: 201757759
Change-Id: I653b3cf1bbc2c3c11ceb34e578bd9b860057c527
2021-10-01 11:13:50 +00:00
Anton Hansson
bab3cc34de Add build rule to merge annotation zips
This target produces nearly identical contents to the build target
framework-doc-stubs (the only diffs are in whitespace). Using this
module in the SDK zip will allow changing the inputs of
framework-doc-stubs to java sources that don't have all the annotations
(the jar stubs).

Bug: 187397779
Test: m sdk-annotations.zip and diff with framework-doc-stubs zip
Change-Id: Id163473c455f25c5f31c965d907c0c3b0e7755fc
2021-09-30 18:57:31 +01:00
Anton Hansson
fa5d0bc676 Add doc stubs target that uses module stub source
The framework-doc-stubs target currently takes the module source code
as input. Work is being done to change that over to use module sdk
artifacts, primarily the jar stub source code. Check in a
work-in-progress target that does so, to avoid it breaking and to
simplify iterating on improvements.

Bug: 186197911
Test: m framework-doc-stubs{,-module-stubs}
Change-Id: I1a275b3f44632e6655dc84d711a58fc0c5b3a46a
2021-09-17 17:22:03 +01:00
Jeff Sharkey
ce6a9699b6 Merge "Pass metadata as AttributionSourceSource." into sc-dev am: a57ee36d6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15388734

Change-Id: Iabda6bed8f2392201a0fc87eb31f9d01a3ecac1e
2021-07-27 19:43:33 +00:00
Jeff Sharkey
75d4f93a4e Pass metadata as AttributionSourceSource.
These two PermissionManager methods are using AttributionSource as
metadata only, and aren't interested in the remote caller enforcing
that the claimed UID matches the caller, since they're not actually
being used for permission enforcement.

Thus we pass the metadata using the AttributionSourceState holder
object and reconstruct on the remote side, entirely avoiding the
enforceCallingUid() check.

Bug: 193842956
Test: atest CtsPermission5TestCases
Change-Id: I576b6feb8cc2b0586b4341268866d8027689293f
2021-07-27 09:45:54 -06:00
Treehugger Robot
65f87374ba Merge "Build framework-doc-system-stubs with system stubs." am: bc7044d235 am: 2ab185586f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1751501

Change-Id: I82a2ab808fc99cb5f95bbbb18f94856aca1f293b
2021-07-02 16:34:15 +00:00
satayev
bc7c83eff9 Build framework-doc-system-stubs with system stubs.
Specifing the new property makes soong pass system stub jars for
metalava to process.

Bug: 190665366
Test: m framework-doc-system-stubs
Change-Id: I0da0a0aa79d0128d81a5a6df7f9ce4a190a2b650
2021-06-29 22:27:06 +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
160d104df9 Merge "Use filegroups for test-{base,mock,runner} srcs" am: af9b5f0a04 am: 06e56695cc am: 4eecbfcd41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700026

Change-Id: I5444e5d1028c8cf9cd3fa624e05ad5b102866d94
2021-05-11 10:49:42 +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
2e25fdc90f Use filegroups for test-{base,mock,runner} srcs
This allows soong to infer the package of the given srcs, which in turns
make it able to filter the inputs to metalava to exclude unwanted
packages.

This is part of a larger topic of changes intended to remove undesired
classes from the public documentation.

Bug: 187386774
Test: m
Change-Id: I8196c306b743ce6ca8a6452d212f3d7c0b5b2b82
2021-05-10 12:41:01 +01:00
Anton Hansson
ee95f486e5 Merge "Add targets to build doc-stubs for non-updatable" 2021-05-10 08:55:07 +00: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
297bdc9035 Merge "Remove --ignore-classes-on-classpath argument" am: c02168f5d1 am: 481ba3e20a am: 8bf15714d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697265

Change-Id: I15a0a33b96f8a57ba7146166c458e92d397862fb
2021-05-05 14:25:16 +00:00
Anton Hansson
26c843fd12 Remove --ignore-classes-on-classpath argument
This argument doesn't appear to alter the output.

Bug: 186197911
Test: diff metadata.zip, stubs.srcjar, annotations.zip before and after
Change-Id: I5147cf1f0658c78e5ab24952285c8fc1c036a55d
2021-05-05 11:11:57 +01:00
Anton Hansson
703cde0322 Delete framework-updatable-sources filegroup
Inline these sources in the only place it is used.

Test: presubmit
Merged-In: I42e7044471262bf901b8c130a50e1a8a8170c600
Change-Id: I42e7044471262bf901b8c130a50e1a8a8170c600
2021-03-31 13:16:11 +00:00
Anton Hansson
35c0b09876 Delete framework-updatable-sources filegroup
Inline these sources in the only place it is used.

Bug: 184125529
Test: presubmit
Change-Id: I42e7044471262bf901b8c130a50e1a8a8170c600
2021-03-31 09:33:33 +00:00
Anton Hansson
c092d80a11 Merge "Add framework-mime-sources to stubs generation" am: ba4eeb87dd am: 9c26127d17 am: 7e0527c567
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655732

Change-Id: Id8119533bbd8320d81d0e8166086fd6565ba54b4
2021-03-30 18:34:04 +00: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
1e291ff6a0 Merge "Add **/package.html to docs srcs" am: f68b61fcee am: 28f3de76c3 am: 9f04baf35c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655730

Change-Id: I2f65ea1516f747b49f75d857a0e7f16a66649e94
2021-03-30 17:05:41 +00:00
Anton Hansson
a08dc6905f Add framework-mime-sources to stubs generation
It was used in the docs stubs generation but it doesn't have its own
(jar) stub generation. Add it to the shared non-updatable sources for
consistency.

The only class in these sources is @hide, so it makes no
immediate difference.

Test: diff android_stubs_current artifact before/after
Change-Id: I33e75623d8d71da362fb16befb78c8c7596fa400
2021-03-30 10:45:27 +01: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
Anton Hansson
406fe4ab27 Add **/package.html to docs srcs
It is being used implicitly at the moment, make it explicit instead.

r.android.com/1305139 added this to the other droidstubs.

Bug: 153703940
Test: diff soong intermediates for framework-doc-stubs before and after
Change-Id: I708cfd02b9096b0245fddbbfb46893d912edd197
2021-03-30 10:45:26 +01:00
Anton Hansson
6080e03adf Merge "Stop ignoring classes on the classpath for stubs" am: 61e082abdb am: ab3f2d3aba am: 81bfcb40a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1533280

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I814572df3ea32202a9f348901143d0b244dad56f
2020-12-22 12:34:57 +00:00
Anton Hansson
121ccbcfee Stop ignoring classes on the classpath for stubs
We're working on moving the libcore classes away from srcs and into the
classpath, and ignoring classes on the classpath will cause incorrect
API signatures once that happens (several libcore classes appear in
public API signatures).

Keep the docs building in the same way they were before. They will be
addressed in separate CLs.

Bug: 173606718
Test: m checkapi
Change-Id: I471327c3657662d7a093e9baa2fb6e08d640f895
2020-12-21 10:46:53 +00:00
Paul Duffin
24c79cdb88 Merge "Unbundle i18n API from android-non-updatable" am: 17e6d5b6a3 am: 3322b2800a am: f358ccece0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513291

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I576e27b966d5e7b731a3f944bdee353e2cac9106
2020-12-11 10:50:29 +00:00
Paul Duffin
5a4e8f234d Unbundle i18n API from android-non-updatable
This removes the i18n source from the non-updatable stubs which removes
them from the frameworks/base/core/api files too. The API is still
protected by both the build and Gerrit review as the API is specified
in the external/icu/android_icu4j/api/public/ directory.

The i18n stubs source is used instead of the implementation source for
generating the JavaDoc. That revealed a minor issue with metalava which
is fixed in this topic.

The i18n stubs library was statically included alongside the conscrypt
stubs library so it will still appear in the monolothic android.jar.

Bug: 174344410
Test: m offline-sdk-docs
      - check that i18n classes are present
      m android_stubs_current android_system_stubs_current android_test_stubs_current
      - check that i18n classes are present in each jar
      m droid
Change-Id: I744c8bac54a8a5518ca0eca2a7700abbfa0997f4
2020-12-10 11:23:19 +00:00
Ytai Ben-Tsvi
c3cd3cda9b Remove manual parceling from Interpolator and VolumeShaper
Change-Id: Ic5c3bfeb67c6e1b9b2b3c6275ea4badbef8536d3
2020-11-03 16:21:15 -08:00
Paul Duffin
43a8dd7943 Merge "Get ART public API doctag information from java_sdk_library" am: 08e7cbb0b5 am: ec334d86e0 am: c0ea6a6330 am: 0acdd44047 am: 23c51bd63b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1432683

Change-Id: If490ca0b4edd19766d1f86b6cb5ab0ef717f0a3e
2020-09-29 15:50:48 +00:00
Paul Duffin
1f541e24ea Merge "Use ART stubs source generated by java_sdk_library" am: b996945678 am: 54fa7623bc am: ad9299dcdb am: 471182f89e am: 860f8b380b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1428569

Change-Id: I530d440c283af2e592a13f08a694ec788b9adf29
2020-09-29 15:50:19 +00:00
Paul Duffin
8c083f683e Get ART public API doctag information from java_sdk_library
Uses an output tag to access the doctag_files exposed by the
art.module.public.api java_sdk_library. This ensures that the doctags
will be available from the ART prebuilts as well.

Bug: 168301990
Test: Built offline-sdk-docs with and without the change and
      diffed them. The only difference was the timestamp.js
      file.
Change-Id: Ibd51899e4aeb9b11727a54644330bbbe8b7e86a7
2020-09-28 19:51:09 +01:00
Paul Duffin
404b26a761 Use ART stubs source generated by java_sdk_library
Bug: 168301990
Test: Built offline-sdk-docs with and without the change and
      diffed them. There were some changes other than the timestamp.js
      file. With these changes classes that implemented the
      Object.equals(Object) method had some extra documentation that
      explained that the parameter could be null. The reason for this
      change is that the stubs generated with this change includes
      android.annotation.Nullable whereas previously they included
      androidx.annotation.Nullable. The change is a very minor
      improvement over what is currently uploaded to
      developer.android.com/reference so not worth backporting.
      Diffed api/public/current.txt against
      frameworks/base/api/current.txt and made sure that the latter was
      a superset of the former and there were no differences in the area
      that overlapped.
Change-Id: I3767948b4659b18b813c8eed66258af98ac4a241
2020-09-28 19:50:24 +01:00
Ytai Ben-Tsvi
da7c21ec51 Separate AIDL packages
This moves the android.media.audio.common, android.media.permission and
android.media.soundtrigger_middleware AIDL files to a their own
separate aidl_interface module for Java.

Previously, because of how the framework JAR is configured, those
files were automatically compiled into it and we had to disable Java
for this target, creating a discrepancy between C++ and Java, which
would require us to similarly diverge any dependent targets if we want
cross-language support.

As part of this change, we also had to switch from using the
FileDescriptor type to ParcelFileDescriptor, as this is the only type
supported outside of the framework JAR and is also the recommended
practice.

Test: Manual verification of basic soundtrigger functionality.
Change-Id: Ib65c19dd7c7f5433cfa527fa74bb61ac677f5cf5
2020-09-22 10:07:00 -07:00
Liz Kammer
16f2f94b7e Remove create_stubs: false from droiddoc
`create_stubs: false` is the default behavior in soong as of
https://r.android.com/1380730

Test: m docs
Bug: 144248501
Bug: 143136634
Change-Id: If13de5c0a4071b032bc460f5c57e27819b33051d
2020-08-03 14:48:04 -07:00
Ramy Medhat
602016c7db Revert "Enable metalava sandbox in StubLibraries.bp and ApiDocs.bp."
Reason for revert: breaking several builds downstream
Reverted Changes:
Ia5767debc:Enable metalava sandbox in StubLibraries.bp and Ap...
I7256d29f1:Add sandbox property to the javadoc rule.
Ia69440800:Only report a violation when the file exists.

Change-Id: I5651212314fd39b7ba404936dee416f566c682c9
2020-06-20 13:02:35 +00:00
Ramy Medhat
7462d23b12 Enable metalava sandbox in StubLibraries.bp and ApiDocs.bp.
Test: built entire topic with and without RBE_METALAVA.
Change-Id: Ia5767debc713a420b8d008943903238413d0816d
2020-06-18 09:47:16 -04:00
Paul Duffin
e55d4e3b62 Use tags to access conscrypt sources
Avoids direct access to the stub sources and instead access them via
tags passed to the java_sdk_library.

Bug: 155164730
Test: m checkapi
Change-Id: I93dfb8bfac60bd7ab628292667c8d7a9d5e8eb82
2020-05-26 14:08:01 +01:00
Anton Hansson
f68ddeaa8a Change last-released filegroup
There were two different filegroups referencing the same last released
APIs. Delete the manually defined one and switch references over to use
the one defined by prebuilt_apis.

Bug: 155197156
Test: m
Change-Id: Ib15d2c08e6400546ca03de6bfd4e5cbcc938c992
Merged-In: Ib15d2c08e6400546ca03de6bfd4e5cbcc938c992
2020-05-04 13:54:10 +01:00
Jiyong Park
022553332d Remove process parameter from SystemApi
SystemApi no longer has the process parameter. Fixing the last remaining
place where the parameter was still used.

Bug: 155531519
Test: m
Merged-In: I4b1395b3a6e17ff8ce634059f8787c1b6392b1b9
(cherry picked from commit 92514d5b71ab01f4c3ba3882b3acbee768c03671)
Change-Id: I4b1395b3a6e17ff8ce634059f8787c1b6392b1b9
2020-05-03 10:38:21 +09:00
Dan Willemsen
cece97c664 Remove proofread files that aren't created
These would cause these actions (and any that depended upon them) to
re-run during every incremental build. These now produce warnings:

ninja: output file missing after successful execution: out/soong/.intermediates/frameworks/base/ds-ref-navtree-docs/android_common/ds-ref-navtree-docs-proofrerad.txt

It turns out that the -proofread argument to doclava is ignored with the
following argument combinations:

 * -static -devsite
 * -navtreeonly

Test: m docs; m docs (nothing to do)
Change-Id: I21b939951f5a2f33914e9fc9414df8206091d262
2020-04-20 22:43:18 -07:00
Paul Duffin
29adf462b6 Rename conscrypt-module-public-api-stubs-source
Renamed conscrypt-module-public-api-stubs-source to
conscrypt.module.public.api.stubs.source to match the format of the
name created by java_sdk_library.

This is in preparation for switching to use java_sdk_library to
generate conscrypt's public API.

Bug: 153443117
Test: m nothing
Change-Id: I26ad21cf74ad3600de250df8e84deec65b91b3f9
2020-04-09 21:45:27 +01:00
Paul Duffin
5c89e70a1f Reference libcore, conscrypt and icu sources directly
Avoids an extra aggregation step in the creation of the API sources.

Test: m nothing
Bug: 142935992
Change-Id: Ia15c3ceb9fc59e7945687536c60ce265ec95781e
2020-03-26 15:41:25 +00:00
Colin Cross
a2410ebbb9 Quiet ds-docs-switched
The ds-docs-switched genrule was producing 18947 lines of output,
including a single line with 266986 bytes.  Quiet all the tools
used in the genrule.

Test: m ds-docs-switched
Change-Id: I5549c34f6310469e7791b56190d5b7c1f386a5f7
2020-02-26 13:10:07 -08:00
atrost
b1ee27b3b7 Build rules for compat config docs.
Add compat_config to offline SDK docs for now, to generate the
compatibility changes documentation.

Test: m -j offline-sdk-docs
Bug: 144927670
Change-Id: I856a0972212cb23ff97800243671e9c8280d5287
2020-02-03 11:05:43 +00:00
Artur Satayev
ffd7f95db9 Use android.compat.annotation.UnsupportedAppUsage everywhere.
The new annotation replaces existing two annotations in libcore/ and frameworks/base/. This helps avoid human confusion and allows better and correct tool support.

Bug: 145132366
Test: m
Change-Id: I9078b124ddf0273250c645fe17f27088092c8b18
2020-01-13 17:37:52 +00:00