Metalava no longer requires it at least for droidstubs in this
directory. Even when local_sourcepath is not set, the -sourcepath option
is set to the module directory (frameworks/base in this case), and
metalava tries to find package.html files under the directory to know if
a package is hidden or not.
Exempt-From-Owner-Approval: cherry-pick from internal
Bug: 144264106
Test: m
Merged-In: Idfa2aa392ae1da9582e7691a8c06c986baad5088
(cherry picked from commit e53786e864fd3f3097603ef9dfcfcb6b604ee7b1)
Change-Id: Idfa2aa392ae1da9582e7691a8c06c986baad5088
Test: m offline-sdk-docs
diffed against previous version to ensure this did not change it
Bug: 129765390
Change-Id: I28b5b76744b096c56959ef3b0a6f31fe163b5e4d
The annotations are already merged into the stubs that are exported
from libcore so this is unnecessary.
Bug: 142113521
Test: m checkbuild
test this change does not change offline-sdk-docs
Change-Id: Icb0b61f80c91f96eaa22a7f1b92ffdf1825636c8
The com.android.okhttp and com.android.org.conscrypt packages are no
longer present in the input source so do not need hiding.
Bug: 142113521
Test: m checkbuild
Change-Id: I303b054ec114450b5fce3482eddf3cc3749d3814
It is okay to use callback interfaces because with Java 8 default interface
methods avoid the extensibility issue interfaces had previously.
Test: make checkapi
Change-Id: I7c931af638b83b4242f03dde9bc460b0981f66cd
There is an overlap between the source code provided by the
metalava-api-stubs-default and that provided by the
non_openjdk_java_files and openjdk_java_files filegroups. That causes
problems when switching the API generation from libcore implementation
code to libcore stubs code.
Removing the libcore implementation sources will remove any mappings
from class/member signatures to source location for any files from
libcore but that should not be a problem as that was only used for
batch addition of UnsupportedAppUsage annotations and that has alreadu
been done.
Bug: 143864733
Test: m hiddenapi-mappings && m checkbuild
Change-Id: Id47dcb8fc497c9bafa6f501cb2debb835a5f6942
And move mms util code to the new folder.
Test: basic sanity
Bug: 140763963
Merged-in: I0d92ed3fca1fc186484ea8d3c5d17b6e332e7d22
Change-Id: I0d92ed3fca1fc186484ea8d3c5d17b6e332e7d22
(cherry picked from commit d355153dcbc125b80113c31dafc80afe1a5fddd6)
android.test.mock is built with its own sources plus a small number of
framework sources that provides private APIs that the library's APIs
have references to. Previously, it was built with the entire framework
sources which is too many and should have slowed the build performance.
Bug: 141149570
Test: m
Change-Id: I165ffdfc053a71b323ef7058651d5908df06870f
The metalava fix 09094fc5e566a380b7aa1a4c3948ac66cebc0aba allows us to
not include source files having class definitions that are referenced by
private constructors of the API classes.
Removing the now uncessary source files from the input list so that
metalava can run faster.
Bug: 141149570
Test: m
Change-Id: Ib203221600baa0e57393b0d448125676d01bcb8e
This prevents metalava from generating stubs that reference classes
which are provided on the classpath. That ensures that removing hidden
classes from the sources does not result in references to those removed
classes from being added to the generated stubs, e.g. in the imports.
Specifically needed to prevent the StrictMode stubs class from
referencing dalvik.system.CloseGuard when that is removed from the
sourcepath as a result of switching the stub generation from using
libcore implementation classes (which contain CloseGuard) to
generated stubs (which does not contain CloseGuard).
Bug: 142113521
Test: m checkbuild
Change-Id: Ib4b87fec6549b69cc69820bc8d8b33f8c4e8535c
framework.jar is now a build-time only library which has private symbols
from framework-minus-apex.jar and public symbols from APEXes. Instead of
framework.jar, framework-minus-apex.jar is installed to the device.
framework-minus-apex is installed as framework.jar because the name is
pretty widespread throughout Android. Keeping the original file name for
the backwards compatibility.
Bug: 139391334
Test: m, inspect the build system.img and check that
system/framework/framework.jar exists
Merged-In: Ia12d5984b011a54bd8ef708d0f552298a6ddec8a
(cherry picked from commit 617a16478b0f5875084e339553b7b96f3a292e03)
Change-Id: I30d5c789c1d67cac7dfe6339f244e66af5114767
TetheringConfiguration is a utility class to encapsulate the various
configuration elements.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
Change-Id: I9434ab213bc5e0fca59f14a6c8cea554abefc3a4
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.
Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
Merged-In: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
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
No component other than voip-common uses it.
Test: basic sanity
Bug: 140872785
Merged-in: Ie8c9a7266d1ed9ea67b43c9267610e236b6e547a
Change-Id: Ie8c9a7266d1ed9ea67b43c9267610e236b6e547a
(cherry picked from commit 18f58774364b304415a407e6212152971315ff20)
Replaces use of the unsupportedappusage_annotation_files filegroup
(which is very poorly named) with the better named library
art.module.api.annotations.
Bug: 142113521
Test: m java
Change-Id: I8db63bd3d7e3c40953551544792d8863493ef956
Adds a reference to the core-current-stubs-source module (which creates
a srcjar which will contain the public SDK stubs source from all the
modules that make up the core libraries, i.e. the source for
core_current.
This will allow incremental changes to be made in the core library
repositories to gradually switch from using the implementation source
to stubs source to generate the Android SDK public API and JavaDoc
without requiring further changes to frameworks/base.
Once all the required changes have been made then the
core_public_api_files filegroup and all its usages will be removed.
The reason why this will be done incrementally because bug 142113901
requires some workarounds for some of the modules and it will be easier
to manage if they are done separately.
Bug: 142113521
Test: m -j60 android_stubs_current offline-sdk-docs
Change-Id: I828fda4d64fda789e06296c1d2d5c62e63ee7967
This is the second attempt to submit this CL. The first attempt
regressed on app startup because RuntimeInit installed the
custom MimeMap from commonInit() which runs post-fork of the zygote,
but that was fixed by installing it pre-fork.
This CL topic moves the default MimeMap implementation to frameworks.
Libcore starts with a minimal implementation sufficient to pass
CtsLibcoreTestCases, but frameworks can inject the real implementation.
Before this CL topic, the data files and logic (MimeMapImpl) were part of
core-*.jar on device; after this CL, they instead live in framework.jar.
Tests from MimeMapTest that check behavior of that default
implementation also move to a non-libcore CTS test.
Planned work for follow-up CL:
1. Make CTS more opinionated, with a plan to assert that all of
the default mappings are present. How exactly the expectated
mapping will be bundled in CTS is still TBD.
2. Add a vendor.mime.types file (defaults to empty) where vendors
can add additional mappings; I plan to make it such that mappings
in that file are parsed last but never override any earlier
mappings, as if each mime type / file extension was prefixed
with '?'.
3. Perhaps enforce that public APIs android.webkit.MimeTypeMap
and java.net.URLConnection.getFileNameMap() behave consistently
with MimeMap.getDefault().
Test: atest CtsLibcoreTestCases
Test: atest CtsMimeMapTestCases
Test: Checked that CtsLibcoreTestCases still passes on a build that
is missing the MimeMap.setDefault() call from RuntimeInit.java.
Test: Checked that app startup time does not regress as part of this
CL topic - see http://b/136256059#comment17
Bug: 136256059
Change-Id: I716914bf1a7e6205e539f0551f010615dacb17a8
This change fixes a regression that java_sdk_libraries under
frameworks/base were built with all framework sources.
Bug: 141149570
Test: m
Change-Id: Iea1d2ae20ca1c5b514a52d8b2a22e8a1d7543efd
This change fixes a problem that entire framework source files are given
to metalava even when many of the source files are not for public. Using
the new property filter_packages, only source files that belongs to the
public packages are given to metalava.
This CL also changes the name of the filegroup 'framework-srcs' to
'framework-non-updatable-sources' to better describe its contents. In
addition, a build-time only library 'framework-all' is introduced. This
library produces a header jar for all framework sources for both
non-updatable and updatable parts. It is put to the classpath when
invoking metalava to give information on the hidden classes that were
filtered-out.
Bug: 140764681
Test: m
Change-Id: I6e16679109ac07820e35037754d4327442c014f2
droiddoc modules for the SDK API documentation and stubs library
generations have depended on the 'framework' (which was recently changed
to framework-minus-apex' module to get the list of Java source files to
be processed.
This however caused a circular dependency when we tried to modularize
some classes in the framework library as a separate library. The
separate java library depended on the stubs library (because it should
only use SDK APIs) and the stubs library depended on the framework
library. The framework library itself depended on the separated library
(or its stub) to use APIs from the separated library, thus forming a
circular dependency.
This change fixes the problem by directly giving the framework source
files via a filegroup `framework-sources-to-document` where all Java
and AIDL files that are to be documented are included in.
This change also put the generated R.java and Manifest.java files from
framework-res into the filegroup for framework sources.
Bug: 70046217
Bug: 135922046
Test: m
Exempt-From-Owner-Approval: Approved internally
Merged-In: I09ad88da47540d31ad089aad5e1151a4b6877ec2
(cherry picked from commit 20426538f85098552f52dffb40d0f7ffff7946d4)
Change-Id: I09ad88da47540d31ad089aad5e1151a4b6877ec2
When there is no *.aidl file in a filegroup, include path for the aidl
compiler is not set to the path property of the filegroup. This blocks
the plan to cut the dependency from API stubs libs to the framework,
because then we have to rely on the include paths deducted from the
input filegroups, rather than AIDL include paths exported from the
framework.
To make that happen, this change first removes the *-without-aidls
filegroups and replace the reference to them with the corresponding file
groups having AIDLs. Adding the AIDL files for media apex to the API
stubs is fine because the AIDL files are @hidden ones.
Bug: 70046217
Bug: 135922046
Test: m
Exempt-From-Owner-Approval: Approved internally
Merged-In: I794f6d0a7bcbef311d345d6e18ca311800af8ef4
(cherry picked from commit d2411f730f6d143d00b605312e632d0e41d9f632)
Change-Id: I794f6d0a7bcbef311d345d6e18ca311800af8ef4
It's no longer needed as the configs moved to their own directory. Also CompatConfig now reads from the new location.
Bug: 140074769
Bug: 140092095
Test: m, atest FrameworksServicesTests
Change-Id: Ia800a63096693717b027c7291dc8005ca1c93fe5
Due to ownership change, this CL is a combination of the two CLs:
1) 1102398: Added droiddoc module to combined dokka, doclava and add
switcher.
Added ds-docs-switched that merges outputs of dokka, doclava, and
applies switcher4 to them.
Bug: 128540915
Test: m -j ds-docs-switched
===
2) 1098541: Combined target for dokka and doclava
Created a droiddoc module that creates reference docs using Kotlin.
Renamed droiddoc modules that only create one language ref-docs, and
created a genrule that merges them together.
Bug: 72394196
Bug: 138396395
Test: m -j ds-docs-kt
Test: m -j ds-docs-java
Test: m -j ds-docs
===
Change-Id: If9bed782feae84e986395a9ea6401025a51bc316
The AIDL files under frameworks/native/aidl have been referenced via
their absolute paths. This required any module that has an AIDL file
depending on the AIDL types in the frameworks directory to explicitly
set the include path.
Fixing the problem by abstracting the AIDL files using filegroup where
the path property is set to the base directory for the files. The base
directory is used as include paths when the filegroup is added to srcs.
Bug: 135922046
Test: m
Test: m on sdk_phone_arm7
Merged-In: I8acb39522541f1e06d1a4b69b7a53b328c202eff
(cherry picked from commit 82f94056ced121acfb2d45067e3477cffae52621)
Change-Id: I8acb39522541f1e06d1a4b69b7a53b328c202eff
framework-srcs are already coming from metalava-api-stubs-default (via
framework-minus-apex). We don't need to give framework-srcs again.
Test: choosecombo into sdk_phone_arm7
Test: m
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/api-versions.xml
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/dex-mapping.txt
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/hiddenapi-mappings-stubs.srcjar
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/hiddenapi-mappings_annotations.zip
is successful
Exempt-From-Owner-Approval: Approved internally
Merged-In: I9ea6e06e8bd388f3a495acb6ff5555c0ce2f75b2
(cherry picked from commit 68020f8f638ff11f8292d710c8f244a7ef7ca824)
Change-Id: I9ea6e06e8bd388f3a495acb6ff5555c0ce2f75b2
Java and AIDL source files under frameworks/base are now modularized
using filegroup. Each filegroup has 'path' property set to the base
directory of the ssource files. This allows us to not rely on
aidl.[local_]include_dirs and srcs_lib_whitelist_dirs to get the base
directories.
Bug: 70046217
Test: m
Exempt-From-Owner-Approval: Approved internally
Merged-In: I0705ddf76b3c628127f65d75e0a8b06c6c250fe2
(cherry picked from commit b360931bf0f2d011dada18762829c0d0e47c54b6)
Change-Id: I0705ddf76b3c628127f65d75e0a8b06c6c250fe2
framework-srcs are already coming from metalava-api-stubs-default (via
framework-minus-apex). We don't need to give framework-srcs again.
Test: choosecombo into sdk_phone_arm7
Test: m
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/api-versions.xml
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/dex-mapping.txt
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/hiddenapi-mappings-stubs.srcjar
out/soong/.intermediates/frameworks/base/hiddenapi-mappings/android_common/hiddenapi-mappings_annotations.zip
is successful
Exempt-From-Owner-Approval: Approved internally
Merged-In: I9ea6e06e8bd388f3a495acb6ff5555c0ce2f75b2
(cherry picked from commit 68020f8f638ff11f8292d710c8f244a7ef7ca824)
Change-Id: I9ea6e06e8bd388f3a495acb6ff5555c0ce2f75b2