Restrictions on usage of private APIs require encoding new information
into the dex files of the boot class path. ART now contains a new build
tool called `hiddenapi` which takes three lists of class member
signatures (blacklist, light and dark greylist), finds the class members
in their respective dex files and modifies their access flags in place.
This patch invokes the `hiddenapi` tool on all JARs in
PRODUCT_BOOT_JARS. For Java libraries built with Makefiles the tool is
invoked after the dexer directly on DEX files. For Soong-built
libraries, the build system has to unzip the JAR produced by Soong,
apply `hiddenapi` and rezip again. This is due to the fact that the
PRODUCT_BOOT_JARS variable is not available to Soong.
Bug: 64382372
Test: m
Change-Id: I6ce897d204459c8b6f46ed49e0909ff76c08a9ed
Add variables for the hidden API blacklist and dark and light greylist
files. These are text files with signatures of boot class path class
member with restricted access for non-platform code.
Bug: 64382372
Test: m
Change-Id: I5639c5269872ac626efc69bd3a374a7a7125d502
We need to prevent vendors from using old VNDK and SystemSDK versions
for newly launched device. Otherwise, deprecating old versions of the
APIs would be really difficult.
Specifically, it is enforced that
PRODUCT_SHIPPING_API_LEVEL <= BOARD_VNDK_VERSION
PRODUCT_SHIPPING_API_LEVEL <= min(BOARD_SYSTEMSDK_VERSIONS)
Bug: 72126206
Test: manually setting BOARD_VNDK_VERSION to 24 in
device/google/wahoo/BoardConfig.mk and choosecom to walleye
Test: m -j shows an error on BOARD_VNDK_VERSION
Test: BOARD_SYSTEMSDK_VERSION="25 26" m -j shows an error on
BOARD_SYSTEMSDK_VERSION
Change-Id: I17646487a9c77a6a5110749e22ba47f0f75920cf
PRODUCT_COMPATIBLE_PROPERTY will be set as true for products shipping
with Android P, and ro.actionable_compatible_property.enabled will be set
as a system default property accordingly.
But if PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE is set,
ro.actionable_compatible_property.enabled will be false.
Bug: 38146102
Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true
Merged-In: Ifc1279a360b140c4d94edd32db7de3c6c7317297
Change-Id: Ifc1279a360b140c4d94edd32db7de3c6c7317297
(cherry picked from commit 2528cd26c0)
Doclava now generates new API signature files. Add their filenames
to config.mk.
Bug: 64382372
Test: make
Change-Id: I6aed1b2e0575ddb8c89cea5fa7709023eb6f30a3
This build variable is unnecessary now that GCC is completely
unsupported for Android platform builds.
Bug: http://b/64032869
Test: Builds
Change-Id: I9d44ebd7129cb2bdfbb26d37922db19c6fb9efc9
This is cherry-picked from attempt 3, which was reverted
due to http://b/70862583.
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: art/test/testrunner/run_build_test_target.py -j40 art-interpreter
Test: dalvik/dx/tests/run-all-tests
(cherry picked from commit ab1e54d5f1)
Change-Id: I119be15bd95747722114b970400b740fa47bf9e0
Merged-in: Ic42a518c90515b497e5cecec444ded373e403a4b
Move R8_COMPAT_PROGUARD definition to Soong.
Copy the proguard_dictionary file so that the find
command that builds proguard_dict.zip can find it.
Test: m checkbuild
Change-Id: I28b2fce26ccb6225be0bd71802a43fe63df85daa
Introduces DEVICE_FRAMEWORK_MANIFEST_FILE, a list
of files which are added to system/manifest.xml.
This is required for devices to properly display
what hals they implement and also therefore for
them to pass vts_treble_vintf_test since it
now tests manifests based on hal origin.
Notice, this is named singularly to match
DEVICE_MANIFEST_FILE which is also a list of files.
They may be better both named "FILES", but for
consistency and legacy reasons, they can be thought
of as "everything that composes the X manifest
file".
Fixes: 70042049
Test: add system manifest extension which needs it
and it no longer fails vts_treble_vintf_test for
hals being served from the wrong partitions.
Change-Id: I1f59d5c3cadb7a7d4576b73196ca7b41103a49c5
Host (as opposed to hostdex) tools compile and run against OpenJDK's
core libraries. Before this CL, the core libraries of the default
toolchain were always used, even when targeting an earlier language
version.
This meant that code that uses APIs from a later version of OpenJDK
than corresponded to LOCAL_JAVA_LANGUAGE_VERSION would compile, but
would fail to run under that earlier version of OpenJDK. It also
meant that calls to existing APIs might be reinterpreted; for
example, the return type of java.nio.ByteBuffer.clear() changed from
Buffer in OpenJDK 8 to ByteBuffer in OpenJDK 9. At compile time, this
was noted via the warning:
bootstrap class path not set in conjunction with -source 1.8
After this CL, when targeting a language version <= 1.8 (which is
always the case when building with OpenJDK 8), some of OpenJDK 8's
core library/tools jars are now passed on the bootclasspath. The
decision to include the bootclasspath argument when building with
OpenJDK 8 was somewhat arbitrary, but has the advantage that we
discover any issues before we switch to OpenJDK 9.
Even when compiling with OpenJDK 9, use of OpenJDK 9 APIs will now
fail at compile time rather than at runtime; calls to existing APIs
will now be interpreted in OpenJDK 8 rather than 9 fashion. For
example, this means that dx and host-side CTS tests built with
OpenJDK 9 javac -target 1.8 will be runnable under OpenJDK 8.
Bug: 70521453
Bug: 70862583
Test: Checked that the bootclasspath argument was passed
in the javac invocation targeting 1.8 during:
make showcommands compatibility-common-util-hostsidelib
Test: make checkbuild
Change-Id: I9b6081edfdd2c3e9a450ae8a39c4e32c3d2cda92
For Android P or later launching devices, set BOARD_VNDK_VERSION to
"current" as a default value if the value is not defined yet.
"PRODUCT_USE_VNDK_OVERRIDE=false" can disable this feature.
Bug: 70480159
Bug: 62019611
Test: Unset BOARD_VNDK_VERSION
Set PRODUCT_SHIPPING_API_LEVEL "28"
- Check if BOARD_VNDK_VERSION is set to "current"
Set PRODUCT_USE_VNDK_OVERRIDE to "false"
- Check if BOARD_VNDK_VERSION is not defined
Change-Id: I8d37579e8c4ca1788705cbc8a42e8812e2b93a22
This change allows one to run atest <module name>. The TradeFed test
config file will be automatically created in testcases directory based
on the settings.
Bug: 69929803, 69932044
Test: m -j NotificationStressTests libminijail_test
add following lines in notificationtests/Android.mk,
before "include $(BUILD_PACKAGE)"
LOCAL_COMPATIBILITY_SUITE := general-test
Change-Id: Ib5e9cd152d957b5d5beb6ed23a899a021a7e06d6
Test: m -j PRODUCT-aosp_x86-userdebug
Test: Check that some .vdex files built have R8 generated code
Change-Id: I5ab4ed75493404c1b330827fe0005510f5613a68
- until PRODUCT_NOTICE_SPLIT is the default
- disallow PRODUCT_NOTICE_SPLIT_OVERRIDE because it
doesn't need to be differentiated.
Bug: 69865032
Test: manual
Change-Id: I4a29c298862fc9fab51755bf19f236f61fbd784d
It is replaced by FCM Version specified in the device manifest
directly.
Test: builds
Bug: 69636193
Change-Id: I9e2b871b4c6190107ba9fbb36495bb41c461a0a3
Merged-In: I9e2b871b4c6190107ba9fbb36495bb41c461a0a3
Test: m -j PRODUCT-aosp_x86-userdebug
Test: Check that some .vdex files built have R8 generated code
Change-Id: I06903dc30c802bbcffd6992c3c25a1b711a5875c
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.
This revert is being prepared ahead of time in case of
any problems with original change topic,
https://r.android.com/#/q/topic:bug_69449021
Bug: 69449021
Test: Treehugger
This reverts commit 3337fbfa6114379f13a35ad3d6bf9cb5a5b8689b
Change-Id: Ibc050ad9a87dceb336e7cd961015e70a639e43db
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: "make core-oj", checked that compilation now uses
OpenJDK 9 javac -target 1.8
Test: Checked that this is still compiled using OpenJDK 8.
export EXPERIMENTAL_USE_OPENJDK9=false
make core-oj
Change-Id: Iadae20d25e37d2cf0a89918a54af51fab1a4f01d
The system_$(VER) can be set in LOCAL_SDK_VERSION, and the apk will use
android_system.jar at build time.
If LOCAL_SDK_VERSION is not defined and this module is installed in
vendor.img, LOCAL_SDK_VERSION is set to system_current.
Bug: 67724799
Test: 1. build && run on taimen
2. LOCAL_SDK_VERSION:=system_27 in ims.apk && build ims.apk && check
the vsdk_v27_intermediates.
Merged-In: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
Change-Id: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
(cherry picked from commit ef212cbe8d)
Test: m -j PRODUCT-asop_x86-userdebug
Test: Check that no *.vdex files in the image are generated by R8
Change-Id: Ifd85d485fa5b6148723378a15c5faef849381ce1