webview: refactor compatibility check.
Refactor the logic used to determine if a WebView implementation APK is compatible with the current OS version: - Move the constants defining the minimum target SDK version and class name to use to the WebViewFactoryProvider interface, as that's the "root" of what the implementation actually implements. This keeps the requirements separate from the code responsible for actually loading the implementation in order to simplify things for future Mainline work. - Change some of the naming to be more generically about compatibility where it makes sense, instead of referring specifically to targetSdkVersion, as we don't intend to use targetSdkVersion as the gating criteria for future incompatible changes. - Instead of using the "real" compatibility check in WebViewUpdateServiceTest, just have the test system interface accept any package as valid by default, and mock the check in the specific test where it matters. Bug: 373617389 Flag: EXEMPT refactor Test: atest WebViewUpdateServiceTest; atest CtsWebkitTestCases Change-Id: I4b6dca9ef4fbd29a8f59802ceed489fb296e235e
Loading
Please register or sign in to comment