This change allows override_android_app to use the same
privapp_allowlist as the non-override module so that they will always
remain in sync.
Test: go test ./java -v -run TestPrivappAllowlist
Test: go test ./apex -v -run TestApexWithApps
Test: m com.android.permission com.google.android.permission and verify
manually that apex_payload.img contains correct privapp_allowlist
Test: m com.android.permission before and after change &&
`diffoscope apex_payload_reference.img apex_payload_with_change.img`
&& verify that there are no semantic changes
Bug: 242509786
(cherry picked from https://android-review.googlesource.com/q/commit:580636bdd23171f31bfedd773c065e0861dd5c4a)
Merged-In: Ifdcb28af40763aed7a4aac9a7f681153554bc256
Change-Id: Ifdcb28af40763aed7a4aac9a7f681153554bc256
This script will be used to change the package that is being allowed to
use privileged permissions.
Test: python scripts/modify_permissions_allowlist.py
Bug: 242509786
(cherry picked from https://android-review.googlesource.com/q/commit:580f7b0094bd98d3769b6cdeaaab6a9748621253)
Merged-In: I1d7cb3c906ad39aef42ad4394953251db40d1bf1
Change-Id: I1d7cb3c906ad39aef42ad4394953251db40d1bf1
SortedUniqueStrings and FirstUniqueStrings dedupes repeating elements
and returns the deduped list. Currently, it also modifies the input list
in-place, which causes non-determinisitc failures like b/275313114
Operate on a copy of the input so that the input remains untouched.
SortedUniqueStrings is O(NlogN) and FirstUniqueStrings is ~O(N), so
creating a copy (O(N)) should not result in major performance regressions.
Numbers for this single unit test:
```
go test . -run TestStubsForLibraryInMultipleApexes -v -count 1000
Before: 174s
After: 172s
```
Bug: 275313114
Test: go test ./android
Test: go test . -run TestStubsForLibraryInMultipleApexes -v -count 1000
(cherry picked from https://android-review.googlesource.com/q/commit:8a8714c781175f8f1a6c189d919ee8b0ee8c1e27)
Merged-In: Id859723b2c2ebdc0023876c4b6fabe75d870bad7
Change-Id: Id859723b2c2ebdc0023876c4b6fabe75d870bad7
Previously, CopyOf on an empty list was returning nil. With the updates
to SortedUniqueStrings and FirstUniqueStrings, we need to differentiate
between empty lists and nil.
Bug: 275313114
Test: m nothing
(cherry picked from https://android-review.googlesource.com/q/commit:cc4da765113299fa11dcb1e651ec4ae33e6f8f9b)
Merged-In: I91063ebbe5013cbda5d8f70efde4683c66581599
Change-Id: I91063ebbe5013cbda5d8f70efde4683c66581599
1) Use attribute name "default_package_metadata" instead of
"default_applicable_licenses" in packages to better describe its use.
2) Add a filegroup "default_metadata_file" in packages to search for
METADATA file in each package.
3) Include "default_metadata_file" in each package's
"default_package_metadata" attribute.
Bug: 275472038
Test: CIs
(cherry picked from https://android-review.googlesource.com/q/commit:2c9e8d612819840020b2d110d23fb2771b6c92f0)
Merged-In: I645c013c39e3190fd96c4a549d39a331aced16bd
Change-Id: I645c013c39e3190fd96c4a549d39a331aced16bd
clang-r487747c contains upstream fix for the excessive stack protactor
checks (fc4494dffa54) and checks are no longer inserted for C only code
or C++ code built without exeception. The Android platform does not
enable C++ exception by default, thus turning on the check should not
have significant performance impact.
This reverts commit ecc18df6ff.
Test: presubmit
Bug: 277565884
Bug: 279955553
(cherry picked from https://android-review.googlesource.com/q/commit:e9850f81531f070ac5cd193fdcd767bc91605bfe)
Merged-In: I2fc5826048ba5d00cabcc8401ac40a6f54812a44
Change-Id: I2fc5826048ba5d00cabcc8401ac40a6f54812a44
Getting the first certificate will panic if there are no certificates,
which can happen when AllowMissingDependencies is set and the
certificate property is a module reference to a missing module.
Only get the first certificate if the list is not nil.
Use mainCertificate since it handles the logic already.
Test: TestAppMissingCertificateAllowMissingDependencies
Bug: 283102635
Merged-In: : I8b27f65aa7d071041171ad45ac52bf47fa31bf2b
Change-Id: Icaaa45d48ca4edb876687c0813165d107d28ef8a
This fixes an incrementality bug that resulted in superfluous
build.ninja regeneration after a new glob definition is added.
(cherry picked from https://android-review.git.corp.google.com/c/platform/build/soong/+/2585669)
Fixes: 279674820
Test: Treehugger
Test; New integration test in this CL
Merged-In: Ifefe66a0eb1c125e9ad5373d60437a1cb1e6fdec
Change-Id: Ifefe66a0eb1c125e9ad5373d60437a1cb1e6fdec
prebuilt_etc may use sub_dir property to define a relative install
path. Use SubDir() to read either sub_dir or relative_install_path
property.
Bug: 282080219
Test: m vendor-image
Merged-In: I07a21c5aeb87b403854ed32976d26e70b046b8c1
Change-Id: I07a21c5aeb87b403854ed32976d26e70b046b8c1
(cherry picked from commit 8bd3afe68c)
Build a new target *.latest.version which will contain a text file
containing the last finalized version.
Bug: 242316893, 282140551
Test: atest prebuilt_apis_test
(cherry picked from https://android-review.googlesource.com/q/commit:daa314ac97d5ab8076113ee7f269b4e4cc3cf620)
Merged-In: I41fa91c9ec273f342b7807c66c4d65ba13260124
Change-Id: I41fa91c9ec273f342b7807c66c4d65ba13260124
After this change, there is a clear separation between tests that are
related to dexpreopt and tests that are not. The former uses
PrepareForTestWithDexpreopt, while the latter uses
PrepareForTestWithJavaDefaultModules. The benefit is that the latter
will no longer affected by any dexpreopt changes.
Bug: 280776428
Test: m nothing
(cherry picked from https://android-review.googlesource.com/q/commit:b95998be731406209f18fab764b96421a17ab4c9)
Merged-In: Ib957765b9287d51c082e0a33cee17a6bb56daeef
Change-Id: Ib957765b9287d51c082e0a33cee17a6bb56daeef
As-is, dexpreopt config and bootjar is in the dir including
DeviceName(). It causes unnecessary dexpreopt invocation when target is
changed repeatly. To avoid it, rename dir to common name.
Bug: 278833696
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:4753b39ccaaf573910e6b7a4200e9ca03ec8d96d)
Merged-In: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c
Change-Id: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c