From 5a1ef4132f93f57940a5cc49d32991674d014841 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 26 Oct 2011 10:37:00 -0700 Subject: [PATCH] Undeprecate LayoutAlgorithm Bug: 5533078 There is no alternative and this is still useful and used. It should not have been deprecated. Change-Id: I641026cf76ea87738909827b7c48a556d9021d11 --- api/current.txt | 8 ++++---- core/java/android/webkit/WebSettings.java | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/api/current.txt b/api/current.txt index f33c6cb107184..dd3efd1570b83 100644 --- a/api/current.txt +++ b/api/current.txt @@ -25145,7 +25145,7 @@ package android.webkit { method public synchronized java.lang.String getFixedFontFamily(); method public synchronized boolean getJavaScriptCanOpenWindowsAutomatically(); method public synchronized boolean getJavaScriptEnabled(); - method public deprecated synchronized android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm(); + method public synchronized android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm(); method public boolean getLightTouchEnabled(); method public boolean getLoadWithOverviewMode(); method public synchronized boolean getLoadsImagesAutomatically(); @@ -25192,7 +25192,7 @@ package android.webkit { method public synchronized void setGeolocationEnabled(boolean); method public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean); method public synchronized void setJavaScriptEnabled(boolean); - method public deprecated synchronized void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm); + method public synchronized void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm); method public void setLightTouchEnabled(boolean); method public void setLoadWithOverviewMode(boolean); method public synchronized void setLoadsImagesAutomatically(boolean); @@ -25227,12 +25227,12 @@ package android.webkit { field public static final int LOAD_NO_CACHE = 2; // 0x2 } - public static final deprecated class WebSettings.LayoutAlgorithm extends java.lang.Enum { + public static final class WebSettings.LayoutAlgorithm extends java.lang.Enum { method public static android.webkit.WebSettings.LayoutAlgorithm valueOf(java.lang.String); method public static final android.webkit.WebSettings.LayoutAlgorithm[] values(); enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm NARROW_COLUMNS; enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm NORMAL; - enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm SINGLE_COLUMN; + enum_constant public static final deprecated android.webkit.WebSettings.LayoutAlgorithm SINGLE_COLUMN; } public static final class WebSettings.PluginState extends java.lang.Enum { diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index f240a2e243b5a..a6c7d2fedb465 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -42,12 +42,14 @@ public class WebSettings { * SINGLE_COLUMN moves all content into one column that is the width of the * view. * NARROW_COLUMNS makes all columns no wider than the screen if possible. - * @deprecated This enum is now obsolete. */ // XXX: These must match LayoutAlgorithm in Settings.h in WebCore. - @Deprecated public enum LayoutAlgorithm { NORMAL, + /** + * @deprecated This algorithm is now obsolete. + */ + @Deprecated SINGLE_COLUMN, NARROW_COLUMNS } @@ -936,9 +938,7 @@ public class WebSettings { * WebView. * @param l A LayoutAlgorithm enum specifying the algorithm to use. * @see WebSettings.LayoutAlgorithm - * @deprecated This method is now obsolete. */ - @Deprecated public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) { // XXX: This will only be affective if libwebcore was built with // ANDROID_LAYOUT defined. @@ -953,9 +953,7 @@ public class WebSettings { * @return LayoutAlgorithm enum value describing the layout algorithm * being used. * @see WebSettings.LayoutAlgorithm - * @deprecated This method is now obsolete. */ - @Deprecated public synchronized LayoutAlgorithm getLayoutAlgorithm() { return mLayoutAlgorithm; }