Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 26d5af85 authored by Hawkwood Glazier's avatar Hawkwood Glazier
Browse files

Use codegen to catch LinkageErrors from plugins

Plugins that were built against old apis have the potential to crash
SystemUI when unsupported calls are made into them, or they make calls
to methods that no longer exist. These cases cause a LinkageError to be
thrown at the callsite. Incrememting the plugin interface version can
mitigate some of these issues, but is an incomplete solution and
requires manually maintence.

This cl attempts to solve this problem by using codegen to write a proxy
implementation of the interface. This proxy catches those errors, logs
them, and provides a recovery path where the plugin can be disabled but
the application can continue. Recovery will not be possible at every
callsite, but this will at least provide standardized wtf logging for
all locations and a straightforward mechanism for correcting issues
when they occur.

Bug: 359432141
Test: Manually checked mismatched clock apk
Flag: NONE Not user-facing, adding catch blocks
Change-Id: If38db3cdc18f0a3379abfb0b2435e0e539a4a221
parent 3c0b650a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment