977 Commits

Author SHA1 Message Date
Jiyong Park
ced28d531d remove framework_base_subdirs
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
2019-11-16 20:48:06 +09:00
Anna Trostanetski
b4852382fa Merge "Move android.compat.annotation package out of libcore" 2019-11-13 12:12:24 +00:00
Paul Duffin
338163b279 Move rewriting of references in OpenJDK source files to libcore
Test: m offline-sdk-docs
      diffed against previous version to ensure this did not change it
Bug: 129765390

Change-Id: I28b5b76744b096c56959ef3b0a6f31fe163b5e4d
2019-11-11 20:19:46 +00:00
atrost
1a9455046c Move android.compat.annotation package out of libcore
Test: m + flash
Bug: 142650523
Change-Id: I1321195c8724485a90b162b32c3c8549dbd11c42
2019-11-11 15:10:57 +00:00
Paul Duffin
64b7d40250 Stop merging in annotations from ojluni-annotated-sdk-stubs
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
2019-11-08 08:22:35 +00:00
Treehugger Robot
d4c8842a8a Merge "Remove unnecessary --hide-package options" 2019-11-07 12:07:04 +00:00
Paul Duffin
7fb76966a4 Remove unnecessary --hide-package options
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
2019-11-06 14:18:38 +00:00
Adrian Roos
c58832221c Merge "API Lint: Ignore CallbackInterface in platform" 2019-11-05 16:17:43 +00:00
Adrian Roos
a90de2e13d API Lint: Ignore CallbackInterface in platform
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
2019-11-04 19:44:57 +00:00
Amit Mahajan
153d31bc37 Move MmsManager and IMms to frameworks/base/mms
Test: basic sanity
Bug: 140763963
Merged-in: Ib2cffce98f62913c3e50c59b63012c39d595d9ce
Change-Id: Ib2cffce98f62913c3e50c59b63012c39d595d9ce
(cherry picked from commit 6237a6b35cd127cc39973b640e25d198466229a7)
2019-11-04 11:27:49 -08:00
Adrian Roos
8fa64738e9 Merge "Revert "Revert "API Lint: Enable for TestApi""" 2019-11-04 16:22:21 +00:00
Adrian Roos
d1715e8cee Revert "Revert "API Lint: Enable for TestApi""
This reverts commit 718428355f5ab75d1a3ef890f86abc52fe018ce8.

Fixes: 139833475
Test: make droid
Change-Id: I61316a8f314dccb7718bf8ab159e167d554d2525
Merged-In: I61316a8f314dccb7718bf8ab159e167d554d2525
2019-11-04 16:33:39 +01:00
Paul Duffin
1e0342fd2c Remove libcore implementation source from hiddenapi-mappings
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
2019-11-04 14:11:04 +00:00
Amit Mahajan
b14b8bf449 Merge "Create frameworks/base/telephony/common for common non-mainline telephony code." 2019-11-03 17:19:42 +00:00
Amit Mahajan
ac0fd65067 Create frameworks/base/telephony/common for common non-mainline telephony code.
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)
2019-11-01 16:21:14 -07:00
Jiyong Park
00ea0b1f91 android.test.mock is built with much less number of sources
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
2019-10-31 20:38:47 +09:00
Jiyong Park
f0cc2aa46f Merge "Build API stub with less number of source files" 2019-10-31 04:44:27 +00:00
Jiyong Park
3c8f37f421 Build API stub with less number of source files
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
2019-10-30 13:25:35 +09:00
Paul Duffin
179d97038b Ignore classes on the classpath when generating stubs
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
2019-10-29 12:23:44 +00:00
Jiyong Park
c893b46034 Replace framework.jar with framework-minus-apex.jar
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
2019-10-28 15:33:37 +09:00
Mark Chien
72d5460dda Merge "[Tether02] Migrate TetheringConfiguration into module" 2019-10-24 13:10:24 +00:00
markchien
a6ba54d59d [Tether02] Migrate TetheringConfiguration into module
TetheringConfiguration is a utility class to encapsulate the various
configuration elements.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I9434ab213bc5e0fca59f14a6c8cea554abefc3a4
2019-10-24 14:00:05 +08:00
atrost
ff948d8a2f Add a native aidl API.
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
2019-10-22 18:54:13 +00:00
Jerome Gaillard
a56124379c Merge "Use Metalava to get SDK metadata for devtools" 2019-10-21 09:32:12 +00:00
Chen Xu
0e9d6756bc Cellbroadcast util lib
Bug: 135956699
Test: Build
Change-Id: I247bfb3d877334fe822332275e37f015e10a566e
(cherry picked from commit 4fea79cc583a16804f4d596daa61fe7025d4f5e5)
Merged-in: I247bfb3d877334fe822332275e37f015e10a566e
2019-10-20 03:59:57 +00:00
Jerome Gaillard
b59a1cd637 Use Metalava to get SDK metadata for devtools
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
2019-10-17 13:33:10 +01:00
Amit Mahajan
ecbc5f5ee9 Move nist-sip from ext.jar to voip-common.jar
No component other than voip-common uses it.

Test: basic sanity
Bug: 140872785

Merged-in: Ie8c9a7266d1ed9ea67b43c9267610e236b6e547a
Change-Id: Ie8c9a7266d1ed9ea67b43c9267610e236b6e547a
(cherry picked from commit 18f58774364b304415a407e6212152971315ff20)
2019-10-14 17:30:11 -07:00
Adrian Roos
487c646dc0 API: enable API lint on public and system APIs
Bug: 142459906
Test: make checkapi
Change-Id: I1457917dbdff1c1738c17b4d9683a79add971b34
Merged-In: I1457917dbdff1c1738c17b4d9683a79add971b34
2019-10-12 20:45:39 +02:00
Paul Duffin
c130801a67 Stop depending on source for libcore UnsupportedAppUsage annotation
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
2019-10-10 16:33:42 +01:00
Paul Duffin
e86cc6f022 Allow incremental replacement of filegroups with stubs source
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
2019-10-09 11:51:53 +01:00
Tobias Thierer
878c77b704 Move default MimeMap implementation to frameworks.
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
2019-09-27 16:53:15 +01:00
Jiyong Park
b1d2701f76 Build java_sdk_libraries with much less sources
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
2019-09-17 23:17:47 +09:00
Jiyong Park
ae9972bda4 Use filter_packages to unbunden metalava
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
2019-09-16 13:12:59 +09:00
Jiyong Park
70fb81076e Merge changes from topic "drop_circular_dep" into stage-aosp-master
* changes:
  Cut the dependency to framework from droiddoc modules
  Remove -without-aidls filegroups for the media apex.
2019-08-30 05:14:21 +00:00
Jiyong Park
5366ea2089 Cut the dependency to framework from droiddoc modules
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
2019-08-30 05:14:08 +00:00
Jiyong Park
df6c25d518 Remove -without-aidls filegroups for the media apex.
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
2019-08-30 05:12:14 +00:00
Anna Trostanetski
eb6576d67d Merge "Remove prefix property from platform_compat_config module"
am: cc55cca985

Change-Id: Id0739fe8a6460a361243a029d259c608e3d9e736
2019-08-29 10:08:38 -07:00
atrost
7aa64a78ae Remove prefix property from platform_compat_config module
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
2019-08-29 14:22:13 +01:00
Tobias Thierer
2d7cc3acf3 Merge changes from topic "bug136256059_revert"
am: aff95e5e7c

Change-Id: I7b1caa27badbe5f77a0c12704d0050a6c15eb178
2019-08-29 03:25:10 -07:00
Tobias Thierer
aff95e5e7c Merge changes from topic "bug136256059_revert"
* changes:
  Revert "Move default MimeMap implementation to frameworks."
  Revert "Tweak RuntimeInit docs around MimeMap registration."
2019-08-29 10:05:20 +00:00
Tobias Thierer
f83bd777f3 Revert "Move default MimeMap implementation to frameworks."
This reverts commit 53f15f39f82ef4c4bd99c6d22f3563bae0c35269.

Reason for revert: Caused slower app startup (I don't know why).

Change-Id: Id9e3811078bc435073f42996767589a711172400
2019-08-28 22:43:33 +00:00
Jiyong Park
f4b1cdfe5d Merge "Use framework_native_aidl for AIDL files in frameworks/native/aidl"
am: 46993bb4f5

Change-Id: Ib87a5f2563707ffbd2eb2420487f618ee9eb39c7
2019-08-27 17:35:39 -07:00
Treehugger Robot
46993bb4f5 Merge "Use framework_native_aidl for AIDL files in frameworks/native/aidl" 2019-08-28 00:07:25 +00:00
Tiem Song
fccf7d8949 Merge "Update droiddoc with combined generation of Java and Kotlin docs"
am: ca31913b92

Change-Id: I1b701c9165800a22179b6a0d3cb161c27c908687
2019-08-27 15:20:47 -07:00
Tiem Song
730c19b99d Update droiddoc with combined generation of Java and Kotlin docs
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
2019-08-26 22:44:49 -07:00
Jiyong Park
5ca8fe3cfd Use framework_native_aidl for AIDL files in frameworks/native/aidl
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
2019-08-27 02:20:39 +00:00
Jiyong Park
7563aabeb3 Remove duplicated sources that go into hiddenapi-mappins
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
2019-08-27 10:46:42 +09:00
Treehugger Robot
8b4c9376c9 Merge "Implement sysprop_library API stability check" 2019-08-27 00:44:34 +00:00
Jiyong Park
d6be579720 Use filegroup to simplify Android.bp for frameworks and its friends
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
2019-08-26 08:09:49 +00:00
Jiyong Park
0323b4d8a3 Remove duplicated sources that go into hiddenapi-mappins
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
2019-08-24 06:28:36 +00:00