diff options
author | 2022-01-06 14:09:00 +0000 | |
---|---|---|
committer | 2022-01-07 13:47:55 +0000 | |
commit | a2e3936e53ff326d201623b539ebcd12cecc4bee (patch) | |
tree | c519f71b235b8d9385d428506d46a6b369a2fe36 /libartbase/base/file_utils.h | |
parent | 0628e784532303b27e062ed957494bfd7e858bd9 (diff) |
Ignore changes to irrelevant APEXes
When reading the list of APEXes, ignore any APEXes that do not contain
any compilable JARs. Changes to such APEXes now do not and should not
trigger recompilation.
This is helpful for the CompOS use case, since it doesn't even see
these APEXes.
As part of this, extract existing code to determine APEX name from
location and make it resuable.
Bug: 210473615
Test: atest art_standalone_libartbase_tests
Test: Presubmits
Change-Id: I3f64e6228f091cabce33a292058f960787780f62
Diffstat (limited to 'libartbase/base/file_utils.h')
-rw-r--r-- | libartbase/base/file_utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libartbase/base/file_utils.h b/libartbase/base/file_utils.h index d0d986b3ff..709ac12d14 100644 --- a/libartbase/base/file_utils.h +++ b/libartbase/base/file_utils.h @@ -168,6 +168,10 @@ bool LocationIsOnSystemExtFramework(std::string_view location); // Return whether the location is on /apex/. bool LocationIsOnApex(std::string_view location); +// If the given location is /apex/<apexname>/..., return <apexname>, otherwise return an empty +// string. Note that the result is a view into full_path and is valid only as long as it is. +std::string_view ApexNameFromLocation(std::string_view full_path); + // Returns whether the location is trusted for loading oat files. Trusted locations are protected // by dm-verity or fs-verity. The recognized locations are on /system or // /data/misc/apexdata/com.android.art. |