1042 Commits

Author SHA1 Message Date
TreeHugger Robot
7bd4314e4e Merge "Add a native aidl API." 2019-10-21 18:29:47 +00:00
Jerome Gaillard
b77d972ac2 Merge "Use Metalava to get SDK metadata for devtools" am: a56124379c am: 7f5ca69a4e am: 30e06ffb98
am: 5f4b4f5072

Change-Id: I04bbfb387557eb646e871034ef2cc67d2175c0f5
2019-10-21 05:14:34 -07: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
Roshan Pius
09de13ed90 Create a filegroup for utilities used by wifi
These non-formal API utilities will be compiled into the wifi stack
APK & jar-jar'ed to avoid conflicting with the utilities present
on the system image.

Bug: 142809066
Test: Compiles & wifi stack can connect to networks.
Change-Id: Ie02f9c34fdf953ab9a0c1525b22ce267af9bcbd5
2019-10-17 22:19:07 -07: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
atrost
874883536a 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
2019-10-17 11:53:47 +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
atrost
ce84de003c DevicePolicyManagerService - migrate to platform compat framework gating.
Replace targetSDK check with platform compat framework gating for admin password changes in R.
Define a new change id and use it for gating the change.

Test: com.android.cts.devicepolicy.MixedDeviceOwnerTest#testResetPasswordWithToken
Test: com.android.cts.devicepolicy.DeviceAdminHostSideTestApi23#testRunDeviceOwnerPasswordTest
Test: com.android.cts.devicepolicy.MixedDeviceOwnerTestApi25#testPasswordRequirementsApi
Bug: 123562444
Change-Id: Icf2515a0ade1fb7bf60d22b7c705346a2d75acba
2019-10-14 18:42:20 +01: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
Adrian Roos
51c34e8e6c Revert "Revert "API: enable API lint on public and system APIs""
This reverts commit fbaa860e03f3b3581f86271ec1441a7a31ebd9f1 and
relands b4f91321d1fc2074df9656787338e9f466c56aea, with updated
baselines.

Bug: 142459906
Test: make droid
Change-Id: I7736b2caa1c06db7ac837e53fffa8d3b38c4b579
2019-10-12 17:58:39 +02:00
Aurimas Liutikas
fbaa860e03 Revert "API: enable API lint on public and system APIs"
This reverts commit b4f91321d1fc2074df9656787338e9f466c56aea.

Reason for revert: broke the build. New errors got added in the meantime 
https://android-build.googleplex.com/builds/submitted/5935261/aosp_blueline-userdebug/latest/view/logs/build_error.log

Change-Id: I540f0464588f7558ec9a6c898d81753c3bb1dea9
2019-10-11 20:40:40 +00:00
Adrian Roos
b4f91321d1 API: enable API lint on public and system APIs
Bug: 142459906
Test: make checkapi
Change-Id: I1457917dbdff1c1738c17b4d9683a79add971b34
2019-10-11 19:48:04 +02:00
Anna Trostanetski
2118ac1b90 Merge "Add media-provider-platform-compat-config to system image" 2019-10-11 14:01:47 +00:00
Paul Duffin
1c984f375a Merge "Stop depending on source for libcore UnsupportedAppUsage annotation" am: 685d950fdf am: 77e9723b71 am: 1a14e840b9
am: b29eb6ab33

Change-Id: If3b3d33722c92dc81f37701473273418052347d4
2019-10-10 16:27:56 -07:00
atrost
8bea647c25 Add media-provider-platform-compat-config to system image
Test: define a ChangeId, m,
less out/target/product/crosshatch/system/etc/compatconfig/media-provider-platform-compat-config.xml

Bug: 141984154
Change-Id: I3bc964915feaad9e7c289d41c780d9a49163976f
2019-10-10 19:33:22 +01: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
d580f29ec2 Merge "Allow incremental replacement of filegroups with stubs source" am: 25843c7670 am: f7e1966d08 am: 4c31b70917
am: f48fba4da8

Change-Id: Ieab55d57601d6671ee8c950971a8a5606788c876
2019-10-09 12:43:08 -07:00
TreeHugger Robot
64effcba3a Merge "Cellbroadcast util lib" 2019-10-09 16:13:13 +00: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
Chen Xu
4fea79cc58 Cellbroadcast util lib
Bug: 135956699
Test: Build
Change-Id: I247bfb3d877334fe822332275e37f015e10a566e
2019-10-08 21:31:55 -07:00
atrost
e4d912f1d0 Replace targetSDK check with platform compat framework gating.
Define a new change id and use it for gating the change.

Test: atest -p cts/tests/signature, atest AndroidTestBaseUpdaterTest
Bug: 30188076
Change-Id: Ic8c85eae0c490a7eca117b74c4326dd50df2b352
2019-10-08 18:42:09 +01:00
Amit Mahajan
6237a6b35c Move MmsManager and IMms to frameworks/base/mms
Test: basic sanity
Bug: 140763963
Change-Id: Ib2cffce98f62913c3e50c59b63012c39d595d9ce
2019-10-07 17:41:26 -07:00
Amit Mahajan
d355153dcb 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
Change-Id: I0d92ed3fca1fc186484ea8d3c5d17b6e332e7d22
2019-10-01 11:29:23 -07:00
Winson Chiu
8e18a0ab89 Revert "Deprecate PackageParser#Package"
This reverts commit 243e7ea14b32747b3d12b1e83625eddb917c5990.

Reason for revert: b/141854898

Exempt-From-Owner-Approval: Revert for failure to boot

Change-Id: Id6812e5ecf7d88504706b2c4110d83f1034ab85c
2019-10-01 00:23:30 +00:00
Tobias Thierer
1afa40c3c4 Move default MimeMap implementation to frameworks. am: 878c77b704 am: 2b754d1fb3 am: effe42d0b5
am: 752d297aab

Change-Id: I938962e186475a2cb403a1ded40379adcaeb5266
2019-09-30 03:14:56 -07: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
Winson
243e7ea14b Deprecate PackageParser#Package
Replaces PackageParser#Package and it's related structures with
ParsingPackage, ParsedPackage, and AndroidPackage.

This is a large scoped CL, the first step in an eventual goal
to refactor how data is handled in the package parsing and install
process. It introduces as few logic changes as necessary. Mostly
migrating to interfaces and renaming, moving parsing data calls into
3 separate interfaces that outline the intended flow for parsing.

ParsingPackage is built and used during what was PackageParser, now
replaced by ApkParseUtils and it's related classes. This is almost
exactly what was parsed from the XML/files on disk.

ParsedPackage is used when the object exits PackageParser and is
adjusted by PackageManagerService to what is considered the final
"parsed" state, adjusted from literal values, but consistent given
the same APK on disk. This should eventually be moved out of PMS
and possibly collapsed into the previous interface entirely.

AndroidPackage is the final state of the package after parsing and
adjustment has completed and no more mutations should be expected.
There are a few exceptions to this, included in AndroidPackageWrite,
which will eventually be refactored into PackageSetting or another
state class.

This marks PackageParser#Package and all the old infrastructure with
@Deprecated, as none of them are used internally. All usages were
converted, and the legacy Package is only built for un-converted tests
and @UnsupportedAppUsage methods.

There are numerous TODOs still outstanding, but addressing them
in this initial CL would introduce several logic changes. They've been
marked with the bug number and will be handled in follow ups.

This is being merged with caution thrown to the wind because
testing this on devices and in development will be the best way
to debug differences introduced by the migration. Getting it merged
as early as possible gives the most amount of time to fix regressions.

Waiting for tests of all the functionality could take literal years
before covering enough to merge this with all regressions verified.

Given a sample size of 4 heap dumps and the caveat it was taken very
early in the migration, there is a memory overhead of about 200 KB
versus the legacy implementation. This should be verified more
accurately and addressed in follow ups.

This CL also kills child/parent package support, since that's
broken already, and difficult to support with the new interface
structure.

Bug: 135203078

Test: booted an emulator, works generally as expected

Specific tests which failed / failed to build were fixed, but because
not all tests are currently passing before this change, not all were
verified.

Change-Id: I4ba050c228e6c60b8f63a9e3347b1f9a57ef794a
2019-09-26 13:27:17 -07:00
Adam Pardyl
e75b4a7d08 Merge "WindowManager ProtoLog feature" 2019-09-24 09:23:39 +00:00
Jiyong Park
acac2c9174 Merge changes Iea1d2ae2,I1d3c8e48 am: d708ea7b4a am: ebde74e7b1 am: fd4c08b689
am: 4de7f5eaac

Change-Id: Icf780d431f0dd596eee4d07ed26f33f5e0819ed9
2019-09-23 15:45:09 -07:00
TreeHugger Robot
c62ba18c94 Merge "Replacing @Nullable with @RecentlyNullable for apis annotated since API 28" 2019-09-23 19:29:51 +00:00
Adam Pardyl
0f1b3d4602 WindowManager ProtoLog feature
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
2019-09-23 15:47:29 +00:00
Chen Xu
aeb356ca84 Merge "telephony-stack util API lib" 2019-09-23 03:05:52 +00:00
Chen Xu
192bf1f1e3 telephony-stack util API lib
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
2019-09-20 16:50:04 -07:00
Jeff Gaston
1b51142eb6 Replacing @Nullable with @RecentlyNullable for apis annotated since API 28
(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
2019-09-20 16:36:02 -04:00
Jiyong Park
0d94fae8ac Merge "Use filter_packages to unbunden metalava" am: 385291c36d am: 14698c6e71 am: 382aaf00de
am: a02ab098db

Change-Id: I2d43dcd8190966610e874775024a5b83e262f751
2019-09-19 07:10:14 -07: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
Amit Mahajan
22e2260dd1 Merge "Move nist-sip from ext.jar to voip-common.jar" 2019-09-11 23:38:17 +00:00
Amit Mahajan
18f5877436 Move nist-sip from ext.jar to voip-common.jar
No component other than voip-common uses it.

Test: basic sanity
Bug: 140872785
Change-Id: Ie8c9a7266d1ed9ea67b43c9267610e236b6e547a
2019-09-11 14:00:54 -07:00
Adam Pardyl
5020703beb Fix a workaround for "required" property bug.
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
2019-09-09 14:41:30 +02: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
bfd56df443 Merge "Remove prefix property from platform_compat_config module" am: cc55cca985 am: eb6576d67d am: 68c7df5124 am: d8327e2b74
am: d8ad090cf0

Change-Id: If371525951302629018504590bbb168f10d89107
2019-08-29 10:45:22 -07: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
92d2e65f0f Merge changes from topic "bug136256059_revert" am: aff95e5e7c am: 2d7cc3acf3 am: 2cf0f7a6c3 am: 0e77247fee
am: 901f252e89

Change-Id: I89ff2c864f64f8f6498adcacba7eaed8026afcee
2019-08-29 04:14:19 -07: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