summaryrefslogtreecommitdiff
path: root/non_openjdk_java_files.bp
AgeCommit message (Collapse)Author
2019-03-11Remove shims that should no longer be requiredNeil Fuller
The shim and its tests should no longer be required after Robolectric is updated. Bug: 120052720 Bug: 119921242 Test: build only Change-Id: I4499129d76dee5a669a3d239c3cc556e7d8b8d9b
2019-03-04Merge "Tidy up API build variables"Neil Fuller
am: 4fe6c0f805 Change-Id: Idf33540f3718c1de85182f317ec52e08a557d593
2019-02-26Tidy up API build variablesNeil Fuller
1) Delete unused Docs.mk. This removes the last reference to non_openjdk_java_files.bp and openjdk_java_files.bp filegroups from .mk files. This means that export_to_make_var can be removed in those files. 2) Introduce a filegroup, core_public_api_files, that can be used from frameworks/base/ rather than "internal" variables defined in non_openjdk_java_files.bp, openjdk_java_files.bp and conscrypt. Bug: 126332291 Test: build only Merged-In: I3c85d17dd7405e65a6be9e60831b1a07e4f08abf Change-Id: I3c85d17dd7405e65a6be9e60831b1a07e4f08abf
2019-02-26Tidy up API build variablesNeil Fuller
1) Delete unused Docs.mk. This removes the last reference to non_openjdk_java_files.bp and openjdk_java_files.bp filegroups from .mk files. This means that export_to_make_var can be removed in those files. 2) Introduce a filegroup, core_public_api_files, that can be used from frameworks/base/ rather than "internal" variables defined in non_openjdk_java_files.bp, openjdk_java_files.bp and conscrypt. Bug: 126332291 Test: build only Change-Id: I3c85d17dd7405e65a6be9e60831b1a07e4f08abf
2019-02-21DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-masterXin Li
Bug: 120848293 Change-Id: Ifd4160584fb631ba8cefadc7d104a5c4057f2abf
2019-01-28Merge "Add DeadReferenceSafe annotation" am: 35353cb07fHans Boehm
am: 80acf74e3e Change-Id: I02aadf76a280d9733acfe1bb63edf004f1bbcfda
2019-01-28Merge "Add DeadReferenceSafe annotation"Hans Boehm
2019-01-25Add DeadReferenceSafe annotationHans Boehm
Add a class annotation for selectively enabling dead reference elimination. This should eventually become the default, but for now it allows low-risk testing, and it allows us to enable this selectively for classes where we think it may be especially beneficial. The ART CL that actually looks at this is in progress. Test: Tested with companion ART CL. Bug: 111453875 Change-Id: I3ac4ce4ec253ee98841b12cea5f069e274fe069a
2019-01-21Merge changes from topic "bug123174577_drop_SizeOf" am: f2be4e478bTobias Thierer
am: d681798283 Change-Id: I1e103e8bc87c30f53afba6fc53825b5220328c4b
2019-01-21Drop unused API libcore.io.SizeOf.Tobias Thierer
Recent CLs switched users of SizeOf.X to X.BYTES. The SizeOf (internal) API is now unused. This CL drops it. Bug: 123174577 Test: CtsLibcoreTestCases Change-Id: Iaebe7d2b91b6957604440104962c4d35dfefec75
2019-01-15Merge "Remove core-simple and other unnecessary things" am: 7ef1a48c0eNeil Fuller
am: 6409413363 Change-Id: I7b6516455a680dce06d41764299ea9de205694c8
2019-01-15Remove core-simple and other unnecessary thingsNeil Fuller
core-simple has served its purpose so can be removed. Other demo classes that were demonstrating various APIs can be removed as we have real examples for them. These are being deleted at the same time. Bug: 119301609 Test: build Change-Id: I3634807690257fb7f419fa36c8c0c22305584762
2018-12-18Merge "Refactor InetAddress.parseNumericAddress/isNumeric" am: 1552e10eadPaul Duffin
am: e4249b96a9 Change-Id: I44f623bcb7b50a9cc58765074330b55737b38708
2018-12-18Merge "Refactor InetAddress.parseNumericAddress/isNumeric"Paul Duffin
2018-12-17Refactor InetAddress.parseNumericAddress/isNumericPaul Duffin
The parseNumericAddress and isNumeric methods in InetAddress are used by apps even though they are not part of the public API. The methods do more than one thing (parse numeric numbers, extract IPv6 addresses from inside URL hosts as described in RFC 2732, and provide access to loopback addresses) and so are not good candidates for exposing as is in the public API. Extracting IPv6 addresses is easy to do using standard Java, and the loopback addresses are already available through other InetAddress classes. So, this change extracts functionality for parsing numeric addresses out into a new InetAddressUtils class (with corresponding tests) that can be then be used as the basis for a public API. Tested by running: atest core-tests:libcore.java.net.InetAddressTest \ core-tests:libcore.libcore.net.InetAddressUtilsTest \ CtsNetTestCases:android.net.cts.InetAddressesTest Bug: 78686891 Test: as above Change-Id: Ie9eaf5356e1c573ea59dfbb41f9d23cfef14e82c
2018-12-17Merge "Remove DropBox and EventLogger" am: 48939fc72aPaul Duffin
am: a9620f7c57 Change-Id: I562e3a3a10d2f84d657ec67205bb7f80d0bff32b
2018-12-17Merge "Remove DropBox and EventLogger"Treehugger Robot
2018-12-14Merge "Remove unnecessary constants and improve JavaDoc" am: f47d9b9e62Paul Duffin
am: 1061c41c39 Change-Id: I4b6a99875f10a44e917034026011ac7853444775
2018-12-13Remove unnecessary constants and improve JavaDocPaul Duffin
Extracted VERSION_CODES as dalvik.system.VersionCodes for general use. Bug: 119748646 Test: make checkbuild Change-Id: I67a3ec8ebaf84096ae34ba79e18b11c242ba9811
2018-12-13Remove DropBox and EventLoggerPaul Duffin
They provide hooks for use by framework to intercept messages sent by libcore. However, neither of these mechanisms are actually used by libcore so they can be removed. There is one method that is annotated with UnsupportedAppUsage but as explained in bug 119748341 that appears to be a false positive reported by the static analysis tool. Bug: 119748341 Test: make checkbuild and flash Change-Id: Ia8f31b2f221236f562982f7b491e2e00822dd7c7
2018-12-07Merge "Add @Nullable and @NonNull to intra-core API" am: 519dc167b8Adam Vartanian
am: 85c602251a Change-Id: Id991fecec7aef09396beabd73019d5a802beb0db
2018-12-05Add @Nullable and @NonNull to intra-core APIAdam Vartanian
We want to annotate methods in the new files in external/conscrypt, which can only depend on libcore via the intra-core API, so we need access to these annotations. Bug: 120475246 Test: make checkbuild Change-Id: Ie7a7a59a84b2d86db1e9ef4499dd596c75f2bb17
2018-12-04Merge "Add initial support for RuntimeService" am: c12698952bNeil Fuller
am: 88b3992bad Change-Id: I9f193daa0c743aa24c0a967889d5659bea2fe2fa
2018-12-04Merge "Add initial support for RuntimeService"Neil Fuller
2018-11-28Merge "Move final timezone classes to libcore.timezone" am: 446d0fccfeNeil Fuller
am: 6f9baaf567 Change-Id: I365af50139087734d7178c5ea0b28d1de22b2b58
2018-11-28Add a class/test to keep unbundled code workingNeil Fuller
Add a class/test for libcore.util.TimeZone to keep unbundled code working. Robolectric and SUW in google3 have hardcoded the location of libcore.util.TimeZoneFinder. It was recently moved to libcore.timezone under bug 119026403. This keeps just enough API in the old location until the various non-platform dependencies have updated. [Chery-pick note: This is also required on pi-dev-plus-aosp to keep SUW, which is still in the Android tree in pi, compiling] Bug: 119026403 Bug: 119921242 Bug: 116544863 Test: build / ran new test with vogar Merged-In: I6a747273a6abda96ce7a9c30a3bbd250832258f7 Change-Id: I6a747273a6abda96ce7a9c30a3bbd250832258f7 (cherry picked from commit 1b7fdf1841b8ebd1e5d7af5b47fa78cc8646ad04)
2018-11-27Move final timezone classes to libcore.timezoneNeil Fuller
The remaining time zone related libcore classes that can safely be moved are moving from libcore.util to libcore.timezone. ZoneInfo cannot be moved because it is Serializable (via TimeZone) and also, according to frameworks/base/config/hiddenapi-light-greylist.txt, referenced by apps. ZoneInfoDB appears safe to move as there's only one entry in hiddenapi-light-greylist.txt and the data available suggests it's a false positive or an app shipping a copy of their RoboVM test code. Bug: 119026403 Test: build only Change-Id: Idc7d32808dc0193763f54f5f58105a02560cf3b3
2018-11-27Add initial support for RuntimeServiceNeil Fuller
Adds a CoreLibraryDebug class to provide debug info about the managed core library. It can later call into bionic via JNI as needed to add any debug information we want to expose from libc, etc. This change also modifies the Core Platform API so that the RuntimeService in framework (just) has what it needs. Bug: 119026403 Bug: 118242715 Test: build / boot / adb shell dumpsys runtimeinfo Change-Id: I9c889c26404c88f40baccfdcd2bab7f012174562
2018-11-22Move some timezone classes to libcore.timezoneNeil Fuller
Some time zone related libcore classes are moving from libcore.util to libcore.timezone. Bug: 119026403 Test: build only Merged-In: I560f0ab460f49b15e94b6bf4065a37b16d3e70af Change-Id: I560f0ab460f49b15e94b6bf4065a37b16d3e70af (cherry picked from commit a4a55a59b05a4d98bf60f2b0b4ac1c50d0afa5b0)
2018-11-16Introduce TzDataSetVersion classNeil Fuller
Introduce the TzDataSetVersion class to handle time zone data and format versioning. It is a near-exact copy of com.android.timezone.distro.DistroVersion except that constants have been exposed as methods to avoid inlining (important since the code using this new class will not be updated when libcore code is updated with new version requirements in future versions of Android). libcore.util is becoming increasingly filled with time zone related classes so the new class is being added in libcore.timezone. Another easy-to-move class, TimeZoneDataFiles is being moved there. Other time zone data-related classes will be moved in follow-up changes. Bug: 119026403 Test: CTS: run cts-dev -m CtsLibcoreTestCases Change-Id: I57feae567e28950588062e5c67a954ed4f02462e
2018-11-04Enable and demonstrate Java 9 language features in libcore.Tobias Thierer
This CL is attempt 2; attempt 1 broke robolectric tests. This CL demonstrates that Java 9 language features are supported in libcore, and serves as a regression test. Because the Java 9 language sources added are part of libart sources, targets that include full libart sources (as opposed to libart stubs or oj sources) now require java_version: "1.9" in order to build. Supported Java 9 language features are: - private interface methods - try-with-resources on effectively final variables - diamond operator on anonymous classes - @SafeVarargs annotation on private method Not supported: - JSR 376 modules. Bug: 112443425 Test: cts-tradefed run cts -m CtsLibcoreTestCases Test: USE_GOMA=true OUT_DIR=out make core.platform.api.stubs Test: USE_GOMA=true EXPERIMENTAL_USE_OPENJDK9=true OUT_DIR=out-jdk9 \ make -j25 core.platform.api.stubs Test: Patched this CL on top of the internal master branch and checked: 1.) make checkbuild docs cts droid 2.) cts-tradefed run cts -m CtsLibcoreTestCases \ -t libcore.libcore.internal.Java9LanguageFeaturesTest 3.) make RunSettingsGoogleRoboTests \ RunCarSetupWizardRoboTests RunCarSetupWizardRoboTests-jacoco \ RunCarSetupWizardLibRoboTests RunCarSetupWizardLibRoboTests-jacoco \ RunCarSettingsRoboTests RunCarSettingsRoboTests-jacoco \ RunCarMessengerRoboTests RunCarMessengerRoboTests-jacoco Change-Id: I145b4d997a27650aa61a73d6ce5b2eb297274949 Merged-In: I145b4d997a27650aa61a73d6ce5b2eb297274949
2018-10-22Add ForwardingOs to CorePlatformApi.Tobias Thierer
The class was already annotated @CorePlatformApi, but that had no effect because ForwardingOs.java was in non_openjdk_java_files. This CL moves it to non_openjdk_javadoc_files and marks it @hide, which has the effect of adding it to CorePlatformApi. Test: Manually checked that frameworks code referring to ForwardingOs does now compile. Bug: 118100586 Change-Id: I2e0d88fec15cf20e119e1d1bffed98b5937babf1
2018-10-16Merge "Add more APIs to CorePlatformApi for internal"Treehugger Robot
2018-10-16Add dalvik.annotation.compat.UnsupportedAppUsagePaul Duffin
Test: make sure it compiles Bug: 117818301 Change-Id: Iaf1fe17e10c7ac539c5d7e2c3d6b6b84e968d1ae
2018-10-16Add more APIs to CorePlatformApi for internalNeil Fuller
Internal builds have more dependencies on core libs. This adds required CorePlatformApi elements. Bug: 113148576 Test: build (internal) Change-Id: I48942689a4d0e7cb9cbd0a4254a0a7af3a23b261
2018-10-15Add classes/methods used by Settings robo testsNeil Fuller
Add classes/methods used by Settings robolectric tests under: //packages/apps/Settings/tests/robotests Note this only fixes compilation to progress switching over to CorePlatformApi stubs by default. There will almost certainly be more work here if we enforce the API at runtime and the settings code may need to be rewritten eventually. Bug: 113148576 Test: build Change-Id: I7dc4107c3fad6439a834e7324a5815445bc7ad93
2018-10-05More @CorePlatformApi annotations for libcoreNeil Fuller
These annotations are required for further targets to build. Bug: 113148576 Test: build Change-Id: I695c6b973835b5de2311e0ed99cb2fb55b69bc94
2018-10-05Add libcore API needed by framework to core.platform.api.stubsPaul Duffin
Tested by adding a dependency from framework to core.platform.api.stubs and modifying the build to disable link type checking. Test: make checkbuild Bug: 113148576 Change-Id: I618ade912f8cb4429b441a610ea16a9aa16c3398
2018-10-02Tag assorted CorePlatformApi APIs (2)Neil Fuller
These were found while investigating targets besides "framework" needed by targets that are closely tied to framework. e.g. framework/core/services, framework/opt/telephony. Bug: 113148576 Test: build Change-Id: Ic45624d1404e8ee31ddf6c975b4bd6a8d1f8710a
2018-10-01Tag assorted CorePlatformApi APIsNeil Fuller
These were found while investigating targets besides "framework" needed by targets that are closely tied to framework. e.g. framework/core/services, framework/opt/telephony. Bug: 113148576 Test: build Change-Id: Ifeb4f78e5e1807a211f674c90e8045f423b2aaed
2018-09-26Add intra-core API required by conscryptNeil Fuller
An initial set of methods that need to be visible in the intra-core API surface for conscrypt to compile. There's a fix in JavaLibrary.bp to the core-current-stubs-gen target to stop files in openjdk_mmodule_extra_files showing up in the core.current.stubs. Bug: 110404540 Bug: 113148576 Test: build Change-Id: I4bade4dac925cfcb14df9335918319be897ac50d
2018-09-26Pave the way for external mainline module API annotations.Pete Gillin
This change prepares for adding mainline mode API annotations (@CorePlatformApi etc.) supplied in external .annotated.java files so they are not carried as patches in ojluni source files. No real annotations are introduced in this change, and it has no effect on the generated stubs for any of the affected targets (except, seemingly, a few trivial whitespace changes). Specifically, this change does the following: - Adds a placeholder .annotated.java file (to be removed as soon as we have any real ones). - Adds a @libcore.api.Hide annotation we can use as an alternative to the @hide javadoc tag. - Changes the relevant mainline module API droidstubs rules to merge in the .annotated.java annotations and to respect the @Hide annotation. - Refactors the openjdk_java_files targets to create a new category of source file, those which are annotated for the mainline module APIs but are not part of the public API. (The alternative to doing this would be to move them into the public category and change all the public API droidstubs to merge in the .annotated.java annotations and to respect @Hide, which would be significantly more invasive.) - Changes the relevant mainline module API droidstubs rules use the new source categories. Bug: 115746226 Test: `make core-platform-api-stubs core-intra-stubs core-libart+oj-intra-stubs` Change-Id: I33e80603686112d3eb5a05debb58f13764b819b6
2018-09-24Move API-related annotationsNeil Fuller
Before we start scattering references to the API annotations in lots of place they should be moved to a nicer location / given nicer names. The annotations will be easier to manipulate in source if they are fully qualified so this change also removes imports / fully qualifies all usages. Bug: 113148576 Test: build Change-Id: Iee7f7a02405f9240fda4f3faacb1627c8bb3f311
2018-09-13Revert "Enable and demonstrate Java 9 language features in libcore."Fan Zhang
This reverts commit 8e1ef5143df1ce5f84c190030068008089f0af4d. Fixes: 115656946 Bug: 112443425 Reason for revert: b/115656946 Change-Id: I1d95b2125327515eb0a4f2b276d4bce9b8aa74df
2018-09-12Enable and demonstrate Java 9 language features in libcore.Tobias Thierer
This CL demonstrates that Java 9 language features are supported in libcore, and serves as a regression test. Because the Java 9 language sources added are part of libart sources, targets that include full libart sources (as opposed to libart stubs or oj sources) now require java_version: "1.9" in order to build. Supported Java 9 language features are: - private interface methods - try-with-resources on effectively final variables - diamond operator on anonymous classes - @SafeVarargs annotation on private method Not supported: - JSR 376 modules. Bug: 112443425 Test: cts-tradefed run cts -m CtsLibcoreTestCases Test: Patched this CL on top of the internal master branch and checked: 1.) make checkbuild docs cts droid 2.) cts-tradefed run cts -m CtsLibcoreTestCases \ -t libcore.libcore.internal.Java9LanguageFeaturesTest Change-Id: I94f9248befbc8a99d1b3a36da43d7c283bc0c36b
2018-09-11Rename coreapi -> core_platform_apiNeil Fuller
Rename coreapi / core.api -> core_platform_api / core.platform.api to avoid confusion with core.current.stubs. Bug: 113148576 Test: build Change-Id: I7523fccd1c532d8693bba4db512d56ce318afad9
2018-09-07Add a core API / split out mmodule/libartNeil Fuller
Contains: 1) Adds a core API surface for use by framework.jar, etc. (which is distinct from the intra-core API surface for internal "core" use). 2) Move rules related to intra-core dependencies into mmodules/Android.bp 3) Add mmodules/libart. To be joined later by mmodules/oj Various renames and tidy ups are included to reduce duplication and make things clearer now there are two APIs: core.intra and core.api. Also removes some usages of the term mmodule because at least two people don't like it. Bug: 113148576 Test: build / boot Test: CTS: run cts -m CtsLibcoreSimpleMModuleTestCases Test: CTS: run cts -m CtsLibcoreCoreApiTestCases Change-Id: Id43bf55c83ffcdcb2181a5aa203a14d7c83a764c
2018-09-04Mark out an mmodule API surface / add bi-dir depsNeil Fuller
This commit introduces the term "mmodule" in place of "module" for the thing that is being prototyped; "module" is a heavily overloaded term so the extra "m" is intended to make it easier to track / understand what "type of" module is involved. Important parts of this commit: + {simple mmodule}.TestClass has been renamed to DemoSimpleClass to distinguish it from a test and new similar class being added in libart (DemoLibartClass). + Adds the @IntraCoreMModuleApi annotation; it is used to indicate API members that form part of a "core" mmodule contract (either incoming or outgoing dependency of a libcore mmodule) that must be kept stable. + Annotates parts of the DemoSimpleClass to make them part of the "simple mmodule API" contract. + Adds a method in the simple mmodule that isn't annotated to demonstrate (Java) public methods that are not part of the mmodule contract. + Includes a new target "core-simple.mmodule.stubs" which generates the simple mmodule API stubs. + Includes a new target "core-all.mmodule.stubs" which generates the mmodule API stubs for the core-all library. + Adds bi-direction dependencies between parts of the boot classpath. This makes the code a more realistic part of "core" for prototyping / demostration purposes: - DemoSimpleClass (now) has a method that calls through to a method on DemoLibartClass to demonstrate a dependency from {simple mmodule} onto core-libart. - DemoLibartClass has a similar arrangement going in the other direction making core-libart depend on {simple mmodule} (making a bi-dir dependency but without an infinite loop at runtime). + A test has been added for DemoLibartClass in the CtsLibcoreSimpleMModuleTestCases to confirm the bi-dir behavior in an automated test. Bug: 113148576 Test: make checkbuild / make cts Test: CTS: run cts -m CtsLibcoreSimpleModuleTestCases Change-Id: I5564d6be61eba4c0116e91c601e32208da104f02
2018-08-13Merge "Rename org.kxml2 code to com.android.org.kxml2"Treehugger Robot
2018-07-24Merge "Move UriCodec to be near its one user"Treehugger Robot