This reverts commit c0e8ffea41.
Reason for revert: The detected build breakage was unrelated to the aconfig change. Details in b/297881670#comment11.
Change-Id: Ia32bc2e796ed3de7fa049c2c2db340f4325a2853
This reverts commit 379e09d157.
Reason for revert: Seems to have broken the build. Reverting while investigating.
Change-Id: I37c9a065853ef07b1f1c18355205a2f49dd816c4
Flagged APIs are annotated using `@FlaggedApi(Flags.FLAG_NAME)`, where
Flags.FLAG_NAME was auto-generated by aconfig.
When metalava generates an API signature file, it can either
a) insert the value of the constant ("com.foo.bar.flag_name"), or
b) insert the name of the constant (FLAG.NAME)
In the case of @FlaggedApi, we want a). This requires that
x) metlava has access to the definition of the constant while generating the API signature file, and
y) the constant is not part of the API surface of the API signature file
x) is handled by the build system, y) is handled by the aconfig code
generation.
This CL @hide:s all generated Java code, to make sure it is accessible
within the platform, but never part of any API surface.
Bug: 297881670
Test: atest aconfig.test aconfig.test.java
Change-Id: I328ed1a652a4e5e293f2f4b11f916d29fc2fbcbd
To avoid merge conflicts. These are buildifier errors that will be
fixed in a followup cl.
Test: presubmits
Change-Id: I22c91c796aee16ef16f05471c2ff5221fa41d7b3
Previously, when building the proguard dict zip, we got a lot of
warnings like these, and the files were always rebuilt:
```
[ 39% 9/23] Copy symbols with mapping: out/target/common/obj/APPS/HTMLViewer_intermediates/proguard_dictionary
ninja: Missing `restat`? An output file is older than the most recent input:
output: out/target/common/obj/APPS/HTMLViewer_intermediates/proguard_dictionary.textproto
input: out/soong/.intermediates/packages/apps/HTMLViewer/HTMLViewer/android_common/e10894d3da5db41239526c9048962355/proguard_dictionary
```
For some reason kati wasn't adding `restat=true` on these ninja rules.
Adding $(4) to KATI_RESTAT fixes it for some reason.
Test: m dist repeatedly doesn't give the restat warnings
Change-Id: Ie02526b3ab127f42bdc2db350d2dc468e7888fe2
Before this change, entry times before 1980 had the year changed to 1980
but the month/day/hour/minutes/seconds were all kept as-is.
Bug: 277978832
Test: atest zipalign_tests
Change-Id: I9f87e98a6b985002578490b87c654fee86c65d62
build_image.py now accepts a --input-directory-filter-file argument
that contains a list of files to consider from the input directory.
A new, temporary input directory will be created, and only the
considered files will be copied to it.
This removes most of the need for `m installclean`, as old files or
files built manually will no longer end up on the partition.
Bug: 205632228
Test: Presubmits
Change-Id: I4c82ac7f1ed49a37271755749c8f72afeeb7f295
This change adds annotation in the generated code. If the flag is read
only, annotations @com.android.aconfig.annotations.AssumeTrueForR8 or
@com.android.aconfig.annotations.AssumeFalseForR8 will be added in to
the corresponding methods in the interface FeatureFlags, and class
Flags.
Test: atest aconfig aconfig.test.java
Bug: 295328116
Change-Id: Ic1b62a86f0945a5e72ae2c4987cce77fe3f172e9
LOCAL_SOONG_INSTALL_SYMLINKS can now be set by the install_symlink
module type. The install_symlink module type doesn't set
LOCAL_SOONG_INSTALLED_MODULE because make tries to copy that file
around, which doesn't work with a symlink.
Bug: 205632228
Test: built and ran the emulator observed the /system/bin/hwservicemanager symlink is still there
Change-Id: I1ec355b5ae057d0b7fe167674d70da6a4d03f6b5
Update parsed_flag::verify_fields to verify that the invariant "if a
parsed flag is_fixed_read_only, its permission must be READ_ONLY".
Note: commands.rs will ensure that no value files are used to create an
invalid parsed flag when flag declarations and values are parsed, but
the invariant check should still be added for completeness sake, and to
make sure no invalid hand-crafted test data exists.
Also fix invalid test data found by adding this invariant.
Bug: 298935897
Test: atest aconfig.test
Change-Id: I8cea5c4d28c458525b7034d78ecb34dd09272771
The integration tests introduced in 906405f5c9 depend on libraries
auto-generated by running aconfig. This works fine for the Android build
system, but breaks `cargo t`.
Disable the tests when using `cargo t` for local development. Cargo can
be used for rapid local development, including running unit tests;
integration tests should be run using atest.
Bug: 298904077
Test: cargo t
Test: atest aconfig.test_mode.test.rust aconfig.prod_mode.test.rust
Change-Id: Ifcd374fa6efdc121cbfd4c4ac4fb43cf9cacc192
These optimization annotations are special in that we don't want them
to have RUNTIME retention, but we do want them to be visible to ART.
R8 already has special rules to handle them, but with R8 full mode
it still requires a minimal keep rule for the given reference.
This allows usage of annotations like @NeverCompile from fully optimized
platform targets like SystemUI.
Bug: 215417388
Test: m + compare SystemUIGoogle.odex w/ @NeverCompile annotations
Change-Id: Id14bcc7b6d0d6dd385c60cfbe4d31f295cbaa5dc
This allows switching kernels without downloading anything from
internet.
Test: th
Bug: 293313353
This reverts commit 2610f34671.
Change-Id: Iec6c9f9404ac1bb3286613c33d79b00b20c4c8bb
16K dev option should be visible on particular devices which set
PRODUCT_16K_DEVELOPER_OPTION. Adding a system property which will be
enabled based on this option.
Test: m, booted device with PRODUCT_16K_DEVELOPER_OPTION ON/OFF and
verified option visibility.
Bug: 297922563
Change-Id: I6d1cd2ce0c6f38fb43222d8e1ac2b797ef675c62
test_ZipWrite_large_file need to write a 4GB file to zipfile for
testing. Instead of writing sequence of 0s to the test file, use seek().
Test: th
Bug: 298138109
Change-Id: I886bfa0c3f21664e529ba7de9688909518148f61
Boot partition only OTA must be marked as "partial". This is required
for update_engine to correctly copy non-updated partitions to the target
slot.
Test: th
Bug: 293313353
Change-Id: Ic89d03f214e12fa43f686d37854d6fed1d78a6a3
Bootloaders often assume boot partition to be 64MB in size. Correctly
size boot_16k.img so that bootloader can verify the AVB footers.
Test: th
Bug: 293313353
Change-Id: I322277b10e99a41c9a262ff76e2f29c3ed16fec0