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
Loading
Please register or sign in to comment