Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1040)

Unified Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 2824593002: Add ClipboardTest.java back (Closed)
Patch Set: add info Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
index 242d424aa8780b7b9eb8ef0e947271db8a7f48ed..b369e4d8c29f8c4681474ac80a88bf9584a6ae52 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -28,6 +28,8 @@ import android.os.Process;
import android.os.StatFs;
import android.os.UserManager;
import android.provider.Settings;
+import android.text.Html;
+import android.text.Spanned;
import android.view.View;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.Window;
@@ -281,6 +283,19 @@ public class ApiCompatibilityUtils {
}
}
+ /**
+ * @see android.text.Html#toHtml(Spanned, int)
+ * @param option is ignored on below N
+ */
+ @SuppressWarnings("deprecation")
+ public static String toHtml(Spanned spanned, int option) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ return Html.toHtml(spanned, option);
+ } else {
+ return Html.toHtml(spanned);
+ }
+ }
+
// These methods have a new name, and the old name is deprecated.
/**
« no previous file with comments | « no previous file | ui/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698