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. I've also changed VersionCheckerImpl to log a wtf and disable the plugin in the event that versions don't match. This is so that SystemUI can continue as normal in the event that plugin interface has changed. Bug: 359432141 Test: Manually checked mismatched clock apk Flag: NONE Not user-facing, adding catch blocks Change-Id: Iee7e1dd0faba5c0c4b9fe71f3678d077a2a8b939
Loading
Please register or sign in to comment