Commit graph

97035 commits

Author SHA1 Message Date
Mårten Kongstad
04d8b46c37 check-flagged-apis: skip self-referential interfaces
The return value of ClassItem.allInterfaces will sometimes include the
interface itself (e.g.
android.accessibilityservice.BrailleDisplayController). It is unclear
when this happens; it doesn't happen for the unit test.

Update the logic to record the interfaces for a class to filter out
interfaces named the same as the class.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: I8d93c230dfedde30e8d43fefd560a47944085d3a
2024-05-07 13:16:13 +02:00
Mårten Kongstad
7c3571fe8b check-flagged-apis: record interfaces when parsing classes
Extend ClassSymbol with a list of the interfaces that class implements.
This will be used in a follow-up CL to improve the logic that checks if
a class member exists in the api-versions.xml data.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I4db7ff47c3ce40ca892cb872810dd559426dfcb8
2024-05-07 13:16:13 +02:00
Mårten Kongstad
a1fe37137e check-flagged-apis: add more details to Symbol class
Change Symbol from a wrapper around a String to a more fleshed out data
class; symbols now encode if they represent a class, or a class member
(including a reference to the containing class).

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh # with and without this CL; the output should be the same
Change-Id: I003535c721c45d559d00fb3e008325e1db0e18c0
2024-05-07 13:16:13 +02:00
Mårten Kongstad
02525a88de check-flagged-apis: api-versions.xml: correctly parse nested class ctor
The constructor of a nested class is represented as follows in
api-versions.xml:

  <class name="android/Clazz$Foo$Bar" since="1">
    <method name="&lt;init>()V"/>
  </class>

The nested dollar signs are not replaced by forward slashes before the
parsing logic uses `split("/")` to find the name of the inner-most
class, incorrectly resulting in `Class$Foo$Bar` instead of `Bar`. Fix
this by immediately replacing dollar signs with forward slashes after
extracting the package and class.

Also clean up the following call of `Symbol.create`.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I8c0619faae90ded7eb14dcc20ecb94a086a1c764
2024-05-07 13:16:13 +02:00
Wei Li
f9ce18b5c8 Merge "Add license metadata declarations which are moved from device/google/barbet/Android.mk." into main 2024-05-07 08:26:35 +00:00
Jiyong Park
0a5b852656 Merge "Move fs_config_[files|dirs]_<partition> to soong" into main 2024-05-07 02:17:23 +00:00
Jooyung Han
5548c31901 Merge "Remove unused testdata" into main 2024-05-07 01:37:05 +00:00
Jihoon Kang
14a9a7038f Merge "Revert "Remove obsolete java compilation artifacts"" into main 2024-05-07 00:03:05 +00:00
Jiyong Park
8d6481b92c Move fs_config_[files|dirs]_<partition> to soong
Note that not all partitions are moved to Soong. Soong doesn't yet
support *_dlkm partitions and the oem partition.

This change also removes dead code for support VNDK snapshot.

Finally, as a minor clean up, the leading '_' is dropped from the module
names _fs_config_*. There's no need to hide the module names.

Bug: 337993745
Test: m
Change-Id: I5beec5c6734291b9361f870fc1a8dba19def062e
2024-05-07 08:50:10 +09:00
Jihoon Kang
132fceec4c Revert "Remove obsolete java compilation artifacts"
Revert submission 3070882-sdk_lib_remove_compilation

Reason for revert: Potential culprit for build breakage of barbet-ap2a-userdebug in git_main

Reverted changes: /q/submissionid:3070882-sdk_lib_remove_compilation

Change-Id: I53b229137a8ba45e32209dbe69ab0cf698084377
2024-05-06 22:40:24 +00:00
Treehugger Robot
cfb1faa3f5 Merge "Remove obsolete java compilation artifacts" into main 2024-05-06 21:06:54 +00:00
Spandan Das
9429bf9074 Building mainline modules from source is now the default
RELEASE_APEX_CONTRIBUTIONS_* flags per module will be used to toggle
between sources and prebuilts of a mainline module in ap3a and above in
internal and partner builds.

Test: git_aosp-main-with-phones:aosp_cf_arm64_only_phone-next-userdebug
https://android-build.corp.google.com/builds/abtd/run/L61500030003577619

Test: lunch gsi_partner_arm-ap31-userdebug in v-aml-prebuilt-dev
Test: m out/soong/prebuil_info.json # identical before and after

Bug: 308188056
Change-Id: I308f071763297eb95ca5c8fb0191c8bb794789f7
2024-05-06 20:01:12 +00:00
Christopher Ferris
8e46fa38f1 Merge "Add MALLOC_LOW_MEMORY as synonym for MALLOC_SVELTE." into main 2024-05-06 19:45:06 +00:00
Jihoon Kang
cffe6c2c01 Remove obsolete java compilation artifacts
Test: TH
Bug: 332785297
Change-Id: I114bb4139c08e595c3c5b03a4dc8d39df93262c3
2024-05-06 17:46:22 +00:00
Vilas Bhat
02f0984a65 16k: Enable 16k ELF alignment on all mainline modules
Test: banchan <target>
      get_build_var TARGET_MAX_PAGE_SIZE_SUPPORTED
Bug: 321754477
Change-Id: Ia356d6edbf2f451b17f1780d11607ceb9a4adff4
2024-05-06 17:34:53 +00:00
Dennis Shen
a49f1ba5c5 aconfig: update storage file mapping api
Return a pointer of MappedStorageFile/MutableMappedStorageFile instead
of an object of MappedStorageFile/MutableMappedStorageFile. Now added
destructor for MappedStorageFile/MutableMappedStorageFile to unmap the
in memory file to free up memory.

Bug: b/321077378
Test: atest -c
Change-Id: Iaa02696feb07ff383f0c7e46b645d82e57c38254
2024-05-06 17:25:59 +00:00
Spandan Das
e23f6ffd97 Reland align boot jar exclusion with apex_contributions
This relands https://r.android.com/3063301 alongside a Soong CL that
updates the bootclasspath_fragment content validation code.

Bug: 328578801
Test: m nothing --no-skip-soong-tests
Change-Id: Ifa894d4e3270829ff69669e1a914cdea8d7fb03f
2024-05-03 22:11:57 +00:00
Treehugger Robot
5a99056218 Merge "Use complete api-versions.xml for module-lib and system-server" into main 2024-05-03 20:42:02 +00:00
Wei Li
961a642955 Merge "Add proposed trendy teams for CTS modules to be added in platinum." into main 2024-05-03 18:28:39 +00:00
Paul Duffin
771a201f3d Use complete api-versions.xml for module-lib and system-server
Previously, the check-flagged-apis.sh script used `api-versions.xml`
for `module-lib` and `system-server` which did not include the
latest up-to-date information about updatable modules or historical
information about sdk extensions which lead to false positives for
APIs from those updatable modules. This changes switches to use the
`api-versions.xml` produced by the new `api_versions_*_complete`
modules which does include that information.

Bug: 337836752
Test: Run script before and after applying this change to make sure
      that flagged APIs from updatable modules are no longer
      reported as missing.
Change-Id: If09e89a4595a19d9f00390fb5fbd24330ec11be5
2024-05-03 12:13:32 +01:00
Treehugger Robot
984f5ca822 Merge "check-flagged-apis.sh: speed up build step" into main 2024-05-03 09:03:12 +00:00
Mårten Kongstad
22063d0670 check-flagged-apis.sh: speed up build step
Instead of building the entire SDK, explicitly build the
api-versions.xml files.

Bug: 334870672
Test: croot && build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: Ib165c0acd4766ad3000aaf17220050d5e66ddf2c
2024-05-03 10:05:03 +02:00
Mårten Kongstad
a57d0ef0a1 Merge "check-flagged-apis.sh: use correct path to generated API signature files" into main 2024-05-03 06:53:52 +00:00
Inseob Kim
ab47e15dd1 Merge changes from topic "merge_cc_logtags" into main
* changes:
  Add LOCAL_SOONG_LOGTAGS_FILES
  Add python Soong modules for logtags
2024-05-03 05:10:23 +00:00
Jooyung Han
d6a9631d8b Remove unused testdata
com.android.apex.compressed.v1_original is removed.

Bug: 338157001
Test: releasetools_test
Change-Id: Icd4fe958f260640a541e9843efa64e85036542ed
2024-05-03 11:49:55 +09:00
Spandan Das
09c5581b12 Merge "Drop ART_MODULE_BUILD_FROM_SOURCE" into main 2024-05-03 02:27:51 +00:00
Spandan Das
1dcca5239a Drop ART_MODULE_BUILD_FROM_SOURCE
RELEASE_APEX_CONTRIBUTIONS_ART provides a similar functionality, and
also allows selection of a specific art prebuilt if multiple art
prebuilts exists in the tree

`art_module.source_build` was also previously used to conditionally
disable the source soong modules of art/, but this conditional disabling
has been removed with r.android.com/3045792

Bug: 308188056
Test: presubmits
Test: lunch cf_x86_64_phone-trunk_staging-userdebug; mmma art
Test: git_master-art:art-host-x86_64,art-target-arm64,mainline_modules
https://android-build.corp.google.com/builds/abtd/run/L30200030003163172
Test: git_master-art-host:art-build,art-gtest,art-test,art-preopt
https://android-build.corp.google.com/builds/abtd/run/L07600030003164399

Change-Id: Idbb129d2ec304d5320754cd61d40e10e5c7d5414
2024-05-03 02:27:39 +00:00
Wei Li
0e805a76a4 Add proposed trendy teams for CTS modules to be added in platinum.
Bug: 333956273
Test: CIs
Change-Id: Ic4c45a495ecba1cd9ef86e5938dcea2ccff935e5
2024-05-03 00:46:52 +00:00
Florian Mayer
610cd25c88 Merge "Use memtag_stack variants in make" into main 2024-05-03 00:20:37 +00:00
Wei Li
be21974f95 Add license metadata declarations which are moved from device/google/barbet/Android.mk.
Bug: 311287207
Test: CIs
Change-Id: I7a36359845865f3ddda503b5600a52fc16013cc9
2024-05-02 15:46:29 -07:00
Wei Li
f142d91a17 Merge "Add new trendy team module for Pearl team" into main 2024-05-02 22:42:40 +00:00
Wei Li
5ff777f333 Merge "Add license metadata declarations which are moved from device/google/trout/Android.mk." into main 2024-05-02 22:23:35 +00:00
Xuanang Zhao
73bc3c0e73 Add new trendy team module for Pearl team
Bug: 332479829
Ignore-AOSP-First: internal config
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e072257bdaf20c5d0a09f5908123d2d283dedfd3)
Merged-In: Ia1ebbf5c6b010b381aa70ba0edd7b00fd05c0e59
Change-Id: Ia1ebbf5c6b010b381aa70ba0edd7b00fd05c0e59
2024-05-02 21:58:16 +00:00
Zhuoyao Zhang
a7df315755 Merge "Add an integration test" into main 2024-05-02 20:54:52 +00:00
LaMont Jones
dac6b97f63 Merge "Enable build flags in protobuf" into main 2024-05-02 19:51:01 +00:00
Treehugger Robot
b9ffad8376 Merge "Enable perfetto persistent tracing" into main 2024-05-02 19:29:08 +00:00
Treehugger Robot
c039204466 Merge "check-flagged-apis: suppress unused variable warning" into main 2024-05-02 19:01:48 +00:00
Treehugger Robot
83705ef7d1 Merge "check-flagged-apis: add support for method with parameters" into main 2024-05-02 18:59:48 +00:00
Zhuoyao Zhang
db666bcb0c Add an integration test
Add a test to verify that the parameters passed from the
envsetup.sh function are compatible with the actual tool
event logger implementation.

Note that this change adds support for extra logger arguments.
This enables calling the real logger binary with a 'dry run'
flag to avoid actual logging during test execution.

Test: atest rul_tool_with_logging_test
Bug: 331638854

Change-Id: I6b280c53baae03477d4f52f0084efb1f500bd5d0
2024-05-02 18:43:19 +00:00
Daniel Zheng
76f13d280c Merge "create_brick_ota: logic fix" into main 2024-05-02 18:10:51 +00:00
Treehugger Robot
7bff3a85f9 Merge "Add * support products and modules" into main 2024-05-02 18:07:48 +00:00
Daniel Zheng
7e4cc58f2d create_brick_ota: logic fix
ota_metadata should be initialized outside of the if block.

Bug: 3072303
Test: th
Change-Id: Iabe52be3557c71921586d960d8a8a91c33d5558b
2024-05-02 09:55:45 -07:00
LaMont Jones
20dd4c2360 Enable build flags in protobuf
If RELEASE_BUILD_FLAGS_IN_PROTOBUF is False, then the results from
out/release-config are ignored and we do the old processing.

The following additional logic all goes away once the migration to protobuf
is finished.

- If we found .textproto files that don't have corresponding .mk files,
  we require protobuf.
- If we found .mk files that don't have corresponding .textproto files,
  we require legacy (make) processing.
- If PRODUCT_RELEASE_CONFIG_MAPS specifies .textproto files, we require
  protobuf.

In order to further isolate migration, the choice can be determined on a
release-config by release-config basis.  in each release config
directory, we look for:
 - `build_config/DEFAULT=proto`
 - `build_config/DEFAULT=make`
 - `build_config/${TARGET_RELEASE}=proto`
 - `build_config/${TARGET_RELEASE}=make`
The last such file found determines which code path is used.

Bug: 328495189
Test: manual, TH
Change-Id: I1d84db76b157082fc7db1b3cb7c9afe8cdf46cbf
2024-05-02 08:07:30 -07:00
Mårten Kongstad
8b81af4e11 Merge "check-flagged-apis: change internal format" into main 2024-05-02 14:51:49 +00:00
Mårten Kongstad
b9ce4c92e0 check-flagged-apis.sh: use correct path to generated API signature files
The path to the generated API signature files used with --api-signature
in the check-flagged-apis.sh script are different based on the lunch
target used: sometimes it's under $ANDROID_PRODUCT_OUT, other times
under out/target/product/mainline_x86.

Teach check-flagged-apis.sh to dynamically find the correct path by
querying ninja.

Bug: 334870672
Test: croot && build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: I1b0b41ef3ad1bc7113a3b31323d81251e7e65933
2024-05-02 14:30:56 +02:00
Mårten Kongstad
cd93aeb947 check-flagged-apis: suppress unused variable warning
Bug: 334870672
Test: m check-flagged-apis # verify no Lint warnings
Change-Id: If4fb93703f0f0bf3f27e6ec052cf488796bd717e
2024-05-02 14:01:12 +02:00
Mårten Kongstad
b4a14bfaa9 check-flagged-apis: add support for method with parameters
Teach check-flagged-apis to parse methods containing parameters.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I171660b914b73fd85e03ed9300c2c81f33d80d61
2024-05-02 09:53:54 +02:00
Mårten Kongstad
ece054c856 check-flagged-apis: change internal format
Switch the internal format to represent Symbols to (something close to)
the format described in section 4.3.2 of the JVM spec, i.e.

  com/android/SomeClass/someMethod(II[Ljava/lang/String;)Z

This will make parsing method parameters from api-versions.xml easier,
as that file already uses this format, and converting API signature
files to the same format is less painful than going in the other
direction.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I1e1fb8fe208cd51cce2cc129f5aa1cb495672c16
2024-05-02 09:50:33 +02:00
Inseob Kim
beff4ab9a2 Add LOCAL_SOONG_LOGTAGS_FILES
LOCAL_SOONG_LOGTAGS_FILES is similar to LOCAL_LOGTAGS_FILES but it uses
full paths rather than relative paths, to correctly support Soong's
`android:"path"` which may produce paths outside module directories.

Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags.txt
Change-Id: I129b96f3e06036ded76d2657e25e895f8c946cfb
2024-05-02 13:51:41 +09:00
Inseob Kim
f441f7d8fd Add python Soong modules for logtags
Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags
Change-Id: Iae336a05bb2f27564b0bf8d4ea3753a30be89e90
2024-05-02 13:51:34 +09:00