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