Merge "[webview] Rename force dark WebView settings."
diff --git a/api/current.txt b/api/current.txt
index 31bc4ab..f329a38 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -54516,7 +54516,7 @@
method public abstract boolean getDomStorageEnabled();
method public abstract String getFantasyFontFamily();
method public abstract String getFixedFontFamily();
- method public int getForceDarkMode();
+ method public int getForceDark();
method public abstract boolean getJavaScriptCanOpenWindowsAutomatically();
method public abstract boolean getJavaScriptEnabled();
method public abstract android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm();
@@ -54563,7 +54563,7 @@
method @Deprecated public abstract void setEnableSmoothTransition(boolean);
method public abstract void setFantasyFontFamily(String);
method public abstract void setFixedFontFamily(String);
- method public void setForceDarkMode(int);
+ method public void setForceDark(int);
method @Deprecated public abstract void setGeolocationDatabasePath(String);
method public abstract void setGeolocationEnabled(boolean);
method public abstract void setJavaScriptCanOpenWindowsAutomatically(boolean);
@@ -54594,9 +54594,9 @@
method public abstract void setUserAgentString(@Nullable String);
method public abstract boolean supportMultipleWindows();
method public abstract boolean supportZoom();
- field public static final int FORCE_DARK_AUTO = 0; // 0x0
- field public static final int FORCE_DARK_OFF = -1; // 0xffffffff
- field public static final int FORCE_DARK_ON = 1; // 0x1
+ field public static final int FORCE_DARK_AUTO = 1; // 0x1
+ field public static final int FORCE_DARK_OFF = 0; // 0x0
+ field public static final int FORCE_DARK_ON = 2; // 0x2
field public static final int LOAD_CACHE_ELSE_NETWORK = 1; // 0x1
field public static final int LOAD_CACHE_ONLY = 3; // 0x3
field public static final int LOAD_DEFAULT = -1; // 0xffffffff
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 8b98469..494eb03 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -231,34 +231,34 @@
FORCE_DARK_ON
})
@Retention(RetentionPolicy.SOURCE)
- public @interface ForceDarkMode {}
+ public @interface ForceDark {}
/**
- * Used with {@link #setForceDarkMode}
+ * Used with {@link #setForceDark}
*
* Disable force dark, irrespective of the force dark mode of the WebView parent. In this mode,
* WebView content will always be rendered as-is, regardless of whether native views are being
* automatically darkened.
*/
- public static final int FORCE_DARK_OFF = -1;
+ public static final int FORCE_DARK_OFF = 0;
/**
- * Used with {@link #setForceDarkMode}
+ * Used with {@link #setForceDark}
*
* Enable force dark, dependent on the state of the WebView parent. If the WebView parent view
* is being automatically rendered in dark mode, then WebView content will be rendered so as to
* emulate a dark theme. WebViews that are not attached to the view hierarchy will not be
* inverted.
*/
- public static final int FORCE_DARK_AUTO = 0;
+ public static final int FORCE_DARK_AUTO = 1;
/**
- * Used with {@link #setForceDarkMode}
+ * Used with {@link #setForceDark}
*
* Unconditionally enable force dark. In this mode WebView content will always be rendered so
* as to emulate a dark theme.
*/
- public static final int FORCE_DARK_ON = +1;
+ public static final int FORCE_DARK_ON = 2;
/**
* Enables dumping the pages navigation cache to a text file. The default
@@ -1467,7 +1467,7 @@
/**
* Set the force dark mode for this WebView.
*/
- public void setForceDarkMode(@ForceDarkMode int forceDarkMode) {
+ public void setForceDark(@ForceDark int forceDark) {
// Stub implementation to satisfy Roboelectrc shadows that don't override this yet.
}
@@ -1476,7 +1476,7 @@
*
* @return the currently set force dark mode.
*/
- public @ForceDarkMode int getForceDarkMode() {
+ public @ForceDark int getForceDark() {
// Stub implementation to satisfy Roboelectrc shadows that don't override this yet.
return FORCE_DARK_AUTO;
}