Commit 314eba9 1 parent 021cbcc commit 314eba9 Copy full SHA for 314eba9
File tree 1 file changed +6
-2
lines changed
ReactAndroid/src/main/java/com/facebook/react/modules/network
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,12 @@ protected void doInBackgroundGuarded(Void... params) {
184
184
// We cannot catch MissingWebViewPackageException as it is in a private / system API
185
185
// class. This validates the exception's message to ensure we are only handling this
186
186
// specific exception.
187
- // https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/webkit/WebViewFactory.java#98
188
- if (message != null && message .contains ("No WebView installed" )) {
187
+ // https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/webkit/WebViewFactory.java#348
188
+ if (message != null
189
+ && exception
190
+ .getClass ()
191
+ .getCanonicalName ()
192
+ .equals ("android.webkit.WebViewFactory.MissingWebViewPackageException" )) {
189
193
return null ;
190
194
} else {
191
195
throw exception ;
You can’t perform that action at this time.
0 commit comments