Commit Graph

1065 Commits

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

Fixes: 139833475
Test: make droid
Change-Id: I61316a8f314dccb7718bf8ab159e167d554d2525
2019-11-01 08:46:15 +01:00
Adrian Roos
a6507293a5 Merge "Revert "API Lint: Enable for TestApi"" 2019-10-31 14:37:48 +00:00
Adrian Roos
718428355f Revert "API Lint: Enable for TestApi"
This reverts commit 375e276553.

Reason for revert: Breaks the build
Bug: 139833475

Change-Id: I21c2c25152a91b71007f766502c19043ec17a836
2019-10-31 14:36:29 +00:00
Adrian Roos
6d9a140f15 Merge "API Lint: Enable for TestApi" 2019-10-31 13:55:41 +00:00
Jiyong Park
7956435faf Merge "Build API stub with less number of source files" am: f0cc2aa46f am: c86f52bc60
am: 1adc232268

Change-Id: I025b80f7bf04750c490a1035c2a47a55af732ce9
2019-10-30 22:10:14 -07:00
Jiyong Park
f0cc2aa46f Merge "Build API stub with less number of source files" 2019-10-31 04:44:27 +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
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
TreeHugger Robot
b0ee7f5ab5 Merge "Add frontend constants and callback" 2019-10-30 02:06:59 +00:00
Paul Duffin
5a6072c879 Merge "Ignore classes on the classpath when generating stubs" am: c817b66016 am: 275d3b5585
am: 2b0d8181b0

Change-Id: Ib4ea2b2bf97c4328006922dd850d07abecadeebf
2019-10-29 15:49:34 -07: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
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
shubang
7e849b0509 Add frontend constants and callback
Test: make; acloud;
Change-Id: I255aa05c9e0dddc261bb92982fec82355a6021b7
2019-10-24 10:49:34 -07: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 4fea79cc58)
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 18f5877436)
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 fbaa860e03 and
relands b4f91321d1, 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 b4f91321d1.

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 243e7ea14b.

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