This CL implements the on-device part of ProtoLog
- the new logging system for WindowManager.
Design doc: go/windowmanager-log2proto
Change-Id: I2c88c97dabb3465ffc0615b8017b335a494bca59
Bug:
Test: atest FrameworksServicesTests:com.android.server.protolog protologtool-tests
attach copyable hidden util API classes to create a jar
file containing these, and statically link it from
telephony mainline modules. Need to jarjar those classes
otherwise classloader will load classes with the same
name in boot class path(framework.jar)
TODO: some Util APIs like AsyncResult which returned from
telephony-common library and used by other apps like Settings.
We should decouple Settings from telephony-common first before
we make a copy and rename AsyncResult.
Bug: 137202333
Test: Manual & Build
Change-Id: I81a6948246f1453481962699855560c2f64bb413
(temporarily). This causes Metalava to downgrade @Nullable/@NonNull to
@RecentlyNullable/@RecentlyNonNull for now.
This should provide more time to migrate calling code.
Note that we're still checking compatibility against API 29.
Test: m api-stubs-docs # and unzip out/target/common/docs/api-stubs-docs-stubs.srcjar \
and notice that @Nullable/@NonNull are replaced by @RecentlyNullable/@RecentlyNonNull
Test: m checkapi
Test: echo "package samplePackage { public class sampleClass { } }" >> prebuilts/sdk/29/public/api/android.txt \
&& m checkapi # and notice that it correctly reports an error
Bug: 140127380
Change-Id: I616438183ef80d1da7cbbe1c0eb01d1f71eaad8c
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
The build system does not propagate "required" properties correctly,
they need to be applied to the final installed java_library to work.
Bug:
Test: make
Change-Id: I7268a5bd56ee5be791782a0e584a9ada01538b98
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 20426538f8)
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 d2411f730f)
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
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
Change-Id: I09ad88da47540d31ad089aad5e1151a4b6877ec2
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
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
Change-Id: I794f6d0a7bcbef311d345d6e18ca311800af8ef4
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 82f94056ce)
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 68020f8f63)
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 b360931bf0)
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 68020f8f63)
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 b360931bf0)
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
Change-Id: I9ea6e06e8bd388f3a495acb6ff5555c0ce2f75b2
sysprop_library now checks the API stability itself, cutting dependency
on java_sdk_library. Under the directory {module_dir}/api,
{module_name}-current.txt and {module_name}-latest.txt hold API
signatures.
When sysprop_library is built, or a user run "m {module_name}-check-api"
command, API check is performed. First, current.txt must have exactly
same signature with built sysprop_library module. Second, current.txt
must be compatible with latest.txt.
Build system emits a handy error message to generate/update those API
files, in case of missing or mismatching. Also, a script file for
freezing API files is introduced.
Bug: 131637873
Test: 1) m && boot blueline
Test: 2) m {sysprop_library} performs API check
Test: 3) manual test for check-api, freezing api
Change-Id: I6d69fb418bac675bbb9e4ac25c3269dfa3029219
Merged-In: I6d69fb418bac675bbb9e4ac25c3269dfa3029219
Merged-In: I8217f0ad136df63f9861bdb3e18b9d0ae8812214
(cherry picked from commit 4fe9f0f8fd)
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
Change-Id: I8acb39522541f1e06d1a4b69b7a53b328c202eff
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
Change-Id: I0705ddf76b3c628127f65d75e0a8b06c6c250fe2
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.
Specifically, the logic and android.mime.types now live in
frameworks/base/mime. The default implementation is injected
into libcore from RuntimeInit. I chose to use a separate directory
(frameworks/base/mime/) and build java_library target ("mimemap")
in order to keep this as separate as possible from the rest of
frameworks code, to make it as easy as possible to factor this
out into a separate APEX module if we ever choose to do so.
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
Bug: 136256059
Change-Id: Ib955699694d24a25c33ef2445443afb7c35ed9e7
sysprop_library now checks the API stability itself, cutting dependency
on java_sdk_library. Under the directory {module_dir}/api,
{module_name}-current.txt and {module_name}-latest.txt hold API
signatures.
When sysprop_library is built, or a user run "m {module_name}-check-api"
command, API check is performed. First, current.txt must have exactly
same signature with built sysprop_library module. Second, current.txt
must be compatible with latest.txt.
Build system emits a handy error message to generate/update those API
files, in case of missing or mismatching. Also, a script file for
freezing API files is introduced.
Bug: 131637873
Test: 1) m && boot blueline
Test: 2) m {sysprop_library} performs API check
Test: 3) manual test for check-api, freezing api
Change-Id: I6d69fb418bac675bbb9e4ac25c3269dfa3029219
Merged-In: I6d69fb418bac675bbb9e4ac25c3269dfa3029219
(cherry picked from commit 4fe9f0f8fd)