Fixed Android RendererPriorityPolicy.waivedWhenNotVisible type 'Null' is not a subtype of type 'bool' #1334

This commit is contained in:
Lorenzo Pichilli 2022-10-12 22:09:24 +02:00
parent 4955443e6c
commit 25cb58dce7
3 changed files with 5 additions and 7 deletions

View File

@ -3,6 +3,7 @@
- Fixed missing `PullToRefreshController.isRefreshing` iOS implementation
- Fixed Android `PullToRefreshController.setEnabled` at runtime
- Fixed iOS `findNext`
- Fixed Android `RendererPriorityPolicy.waivedWhenNotVisible` type 'Null' is not a subtype of type 'bool'
## 5.4.4+3

View File

@ -360,10 +360,6 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
setRendererPriorityPolicy(
(int) options.rendererPriorityPolicy.get("rendererRequestedPriority"),
(boolean) options.rendererPriorityPolicy.get("waivedWhenNotVisible"));
} else if ((options.rendererPriorityPolicy == null || (options.rendererPriorityPolicy != null && options.rendererPriorityPolicy.isEmpty())) &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
options.rendererPriorityPolicy.put("rendererRequestedPriority", getRendererRequestedPriority());
options.rendererPriorityPolicy.put("waivedWhenNotVisible", getRendererPriorityWaivedWhenNotVisible());
}
contentBlockerHandler.getRuleList().clear();
@ -939,9 +935,9 @@ final public class InAppWebView extends InputAwareWebView implements InAppWebVie
if (newOptionsMap.get("networkAvailable") != null && options.networkAvailable != newOptions.networkAvailable)
setNetworkAvailable(newOptions.networkAvailable);
if (newOptionsMap.get("rendererPriorityPolicy") != null &&
if (newOptionsMap.get("rendererPriorityPolicy") != null && (options.rendererPriorityPolicy == null ||
(options.rendererPriorityPolicy.get("rendererRequestedPriority") != newOptions.rendererPriorityPolicy.get("rendererRequestedPriority") ||
options.rendererPriorityPolicy.get("waivedWhenNotVisible") != newOptions.rendererPriorityPolicy.get("waivedWhenNotVisible")) &&
options.rendererPriorityPolicy.get("waivedWhenNotVisible") != newOptions.rendererPriorityPolicy.get("waivedWhenNotVisible"))) &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
setRendererPriorityPolicy(
(int) newOptions.rendererPriorityPolicy.get("rendererRequestedPriority"),

View File

@ -95,7 +95,8 @@ public class InAppWebViewOptions implements Options<InAppWebViewInterface> {
public Integer scrollBarDefaultDelayBeforeFade = null;
public Boolean scrollbarFadingEnabled = true;
public Integer scrollBarFadeDuration = null;
public Map<String, Object> rendererPriorityPolicy = new HashMap<>();
@Nullable
public Map<String, Object> rendererPriorityPolicy = null;
public Boolean useShouldInterceptRequest = false;
public Boolean useOnRenderProcessGone = false;
public Boolean disableDefaultErrorPage = false;