[HTMLViewer] Explicitly set WebSettings#setAllowFileAccess to true WebSettings#setAllowFileAccess default value is changing to be off by default for Apps targetting API >= 30. This explicitly turns on this setting for the HTMLViewer app so it can load local files. Bug: 148840827 Test: N/A Change-Id: I632cec2af75e90d097e86081a6379afdbdf66162 (cherry picked from commit 57ab31bd6df1dda5c502cef163cb5a7ae3abe71f)
diff --git a/src/com/android/htmlviewer/HTMLViewerActivity.java b/src/com/android/htmlviewer/HTMLViewerActivity.java index 85a16aa..1aa1f68 100644 --- a/src/com/android/htmlviewer/HTMLViewerActivity.java +++ b/src/com/android/htmlviewer/HTMLViewerActivity.java
@@ -71,6 +71,7 @@ s.setSavePassword(false); s.setSaveFormData(false); s.setBlockNetworkLoads(true); + s.setAllowFileAccess(true); // Javascript is purposely disabled, so that nothing can be // automatically run.