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

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

Issue 2296833002: Add tab persistence support for CustomTabs. (Closed)
Patch Set: Address yusufo@s comments Created 4 years, 4 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
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 e552fe002b5c23ef1b20f8a5ecfe6912d0b86dac..9680600d30206625b3593563109f5ade54a3c0f4 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -44,6 +44,17 @@ public class ApiCompatibilityUtils {
}
/**
+ * @see Long#compare(long, long)
+ */
+ public static int compareLong(long lhs, long rhs) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ return Long.compare(lhs, rhs);
+ } else {
+ return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1);
+ }
+ }
+
+ /**
* Returns true if view's layout direction is right-to-left.
*
* @param view the View whose layout is being considered

Powered by Google App Engine
This is Rietveld 408576698