mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-04 00:13:20 +08:00
fix(android): allow file access for existing behavior (#1111)
This commit is contained in:
parent
aada3e813d
commit
c144c08112
@ -152,6 +152,15 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
|
||||
|
||||
/**
|
||||
* https://developer.android.com/reference/android/webkit/WebSettings#setAllowFileAccess(boolean)
|
||||
*
|
||||
* SDK >= 30 has recently set this value to false by default.
|
||||
* It is recommended to turn off this settings To prevent possible security issues targeting Build.VERSION_CODES.Q and earlier.
|
||||
* For existing functionality, this setting is set to true. In a future release, this should be defaulted to false.
|
||||
*/
|
||||
settings.setAllowFileAccess(true);
|
||||
|
||||
String manufacturer = android.os.Build.MANUFACTURER;
|
||||
LOG.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user