diff options
| author | 2023-11-01 16:51:35 -0600 | |
|---|---|---|
| committer | 2023-11-03 12:11:28 -0600 | |
| commit | 97014999f33de101d0306d06232f9cbb24c481ea (patch) | |
| tree | 5f0d0fb7718c9c1dbaf39a17c551b5f2702ad2d5 /libs/androidfw/ApkParsing.cpp | |
| parent | c69a84e484f09260eecbd3cfd33cbc4d66ddd525 (diff) | |
Ignore static initializers, throw assumptions.
For classes that haven't built out Ravenwood support, they still may
be referenced in a way that causes their <clinit> to be invoked. This
can cause a cascade of trouble as we try constructing other classes
that aren't yet supported.
Instead, we take the path of "ignoring" these initializers for the
time being, treating them as no-op. This does leave `static final`
values as their defaults values (such as null), which feels
reasonable, as the remainder of the class would throw when used.
Additionally, pivot to throwing `AssumptionViolatedException` when
we encounter unsupported behavior. This has a nice side-effect of
allowing large numbers of existing tests to be executed under
Ravenwood as-is, where we can get an "unknown" signal today that
automatically turns "green" once all underlying infrastructure is
supported in the future.
Bug: 292141694
Test: atest-dev CtsUtilTestCasesRavenwood
Change-Id: Ia0a93f5e0af0b4c8c680daca1732c10c5fe404af
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions