2ce86e26e35d90fc8a12484710c2cacedfaf9f9d |
|
25-Apr-2018 |
Gustav Sennton <gsennton@google.com> |
[WebView Support Lib] properly support per-method feature detection. Feature detection in the WebView Support Library is implemented such that differently through 1. OS version checks for framework calls, and 2. feature flag checks for support library glue calls. The most straight-forward way to implement a (post-L) class in the WebView Support Library is to split it into two implementations, one using the framework, and one using the support library glue. But doing so would mean the features supported by a certain support library class would depend on whether the class is implemented using the framework or the support library glue. In this CL we convert existing post-L WebView Support Library classes to delegate its calls to a single implementation making the choice of using the framework or the support library glue on a per-method basis instead of a per-class basis. This makes our implementation consistent with our feature detection mechanism. Bug: 77808798 Test: manual test to ensure none of the newly added code paths crash. More specifically, ensured that first creating a framework implementation (mFrameworksImpl) and then switching over to a support library one (mBoundaryInterface) works, and vice versa. Change-Id: I54f7c058e433b0870aabd3806c65b5c0250501a1
/frameworks/support/webkit/src/main/java/androidx/webkit/internal/ServiceWorkerWebSettingsImpl.java
|