1054 Commits

Author SHA1 Message Date
Adrian Roos
718428355f Revert "API Lint: Enable for TestApi"
This reverts commit 375e276553dcccf4c133ba54144cd97e9fb57d1d.

Reason for revert: Breaks the build
Bug: 139833475

Change-Id: I21c2c25152a91b71007f766502c19043ec17a836
2019-10-31 14:36:29 +00:00
Adrian Roos
375e276553 API Lint: Enable for TestApi
Fixes: 139833475
Test: mp checkapi
Change-Id: I5d6918a924b30b4bb49b12b84cc2a3707cf54465
2019-10-30 16:58:35 +01:00
Jiyong Park
911cd4faf8 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
Change-Id: Ia12d5984b011a54bd8ef708d0f552298a6ddec8a
2019-10-25 12:27:17 +09:00
TreeHugger Robot
bb128fb4af Merge "Replacing @Nullable/@NonNull with @RecentlyNullable/@RecentlyNonNull in non-android APIs" 2019-10-24 21:56:14 +00:00
Jayachandran Chinnakkannu
72e62254de Merge "Telephony-stack util API lib for ims-common" 2019-10-24 15:58:47 +00:00
Mark Chien
f78f8d7eff Merge "[Tether02] Migrate TetheringConfiguration into module" am: 72d5460dda am: c7ed6b4fe5 am: c95ca17d04
am: a2bfbe79cf

Change-Id: Ia361893223c5d08e7ca0193c38f9b1b88a330320
2019-10-24 07:14:21 -07: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
Jayachandran C
eeffa01a19 Telephony-stack util API lib for ims-common
attach copyable hidden util API classes to create a jar
file containing these, and statically link it from
telephony mainline modules

Bug: 143223966
Test: make & basic sanity
Change-Id: I93905735c72f1a1bacfb26bbef964e0911f66fc8
2019-10-23 22:20:54 -07:00
Jeff Gaston
8676673ca1 Replacing @Nullable/@NonNull with @RecentlyNullable/@RecentlyNonNull in non-android APIs
because this causes callers of those APIs to only receive warnings from kotlinc rather than errors.

Bug: 141748642

Test: m api-stubs-docs && \
      cd out/target/common && mv docs docs-new && unzip docs-new/api-stubs-docs-stubs.srcjar -d docs-new/api-stubs-docs-stubs.srcjar_unzipped && cd - && \
      cd frameworks/base && git checkout HEAD^ && cd - && m api-stubs-docs && \
      cd out/target/common && mv docs docs-old && unzip docs-old/api-stubs-docs-stubs.srcjar -d docs-old/api-stubs-docs-stubs.srcjar_unzipped && \
      diff -x "*.html" -r docs-old/ docs-new | grep -v "^diff" | sed 's/^</>/' | grep '^>' | sed 's|androidx.annotation.Recently|android.annotation.|g' | sort | uniq -c | grep "^ *1 " # And notice that there aren't any copies of "androidx.annotation.Recently" without a matching instance of "android.annotation." or vice versa

Test: m api-stubs-docs && out/target/common/docs && unzip api-stubs-docs-stubs.srcjar -d unzipped && cd unzipped && \
      grep -r "@.*NonNull" java | grep -v Recently && \
      grep -r "@.*Nullable" java | grep -v Recently

Change-Id: I156f1788880958cf3d1f030da829e76cefd6072e
2019-10-22 17:00:22 -04: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
Jiyong Park
48cc3729e6 Remove jobscheduler-framework
The jobscheduler won't be a module in R. Thus removing the java library
and appending its sources to framework-non-updatable-sources.

Bug: 139391334
Test: build
Change-Id: I1222ebe9e05963114eb5e969beb85926567c3033
2019-10-22 10:18:01 +09:00
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