Merge "WebView: defend against null array" into main

This commit is contained in:
Treehugger Robot
2025-03-20 09:50:29 -07:00
committed by Android (Google) Code Review

View File

@@ -61,7 +61,7 @@ public class WebViewUpdateServiceWrapper {
* validity of a package is not dependent on whether the package is installed/enabled.
*/
public List<ApplicationInfo> getValidWebViewApplicationInfos(Context context) {
WebViewProviderInfo[] providers = null;
WebViewProviderInfo[] providers = new WebViewProviderInfo[0];
try {
if (android.webkit.Flags.updateServiceIpcWrapper()) {
providers = context.getSystemService(WebViewUpdateManager.class)