am 524c878e: Revert "Merge "Reload page when A11y is on and the JavaScript state changes." into jb-mr1-dev"
* commit '524c878e7ee8aba1a4e1be0d2cc76ef42e8fcda1':
Revert "Merge "Reload page when A11y is on and the JavaScript state changes." into jb-mr1-dev"
diff --git a/core/java/android/webkit/AccessibilityInjector.java b/core/java/android/webkit/AccessibilityInjector.java
index fd73fda..7dfb5bb 100644
--- a/core/java/android/webkit/AccessibilityInjector.java
+++ b/core/java/android/webkit/AccessibilityInjector.java
@@ -279,7 +279,6 @@
}
if (!shouldInjectJavaScript(url)) {
- mAccessibilityScriptInjected = false;
toggleFallbackAccessibilityInjector(true);
return;
}
@@ -293,23 +292,6 @@
}
/**
- * Adjusts the accessibility injection state to reflect changes in the
- * JavaScript enabled state.
- *
- * @param enabled Whether JavaScript is enabled.
- */
- public void updateJavaScriptEnabled(boolean enabled) {
- if (enabled) {
- addAccessibilityApisIfNecessary();
- } else {
- removeAccessibilityApisIfNecessary();
- }
-
- // We have to reload the page after adding or removing APIs.
- mWebView.reload();
- }
-
- /**
* Toggles the non-JavaScript method for handling accessibility.
*
* @param enabled {@code true} to enable the non-JavaScript method, or
diff --git a/core/java/android/webkit/WebSettingsClassic.java b/core/java/android/webkit/WebSettingsClassic.java
index 1be917e..66651f7 100644
--- a/core/java/android/webkit/WebSettingsClassic.java
+++ b/core/java/android/webkit/WebSettingsClassic.java
@@ -1135,7 +1135,6 @@
if (mJavaScriptEnabled != flag) {
mJavaScriptEnabled = flag;
postSync();
- mWebView.updateJavaScriptEnabled(flag);
}
}
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index a9efd7b..8d79492 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -1626,12 +1626,6 @@
mZoomManager.updateMultiTouchSupport(context);
}
- void updateJavaScriptEnabled(boolean enabled) {
- if (isAccessibilityEnabled()) {
- getAccessibilityInjector().updateJavaScriptEnabled(enabled);
- }
- }
-
private void init() {
OnTrimMemoryListener.init(mContext);
mWebView.setWillNotDraw(false);