commit | 12fb9fc3c3133c3a748deef7a0265e6a11a24cd6 | [log] [tgz] |
---|---|---|
author | Winson <winsonc@google.com> | Thu Oct 01 15:34:08 2015 -0700 |
committer | Winson <winsonc@google.com> | Thu Oct 01 15:34:08 2015 -0700 |
tree | b6e3d8c30cd691ab64657259ee8b8c287d977bee | |
parent | a2dc7c351d1455f578bf424b13dbf033344799ea [diff] [blame] |
Replace Long.compare() with implementation. - Long.compare() was added in API level 19. Change-Id: Ic7020c941403c10daa6feacdc737c6a82676ada0
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index d054da3..2ed9a25 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java
@@ -747,4 +747,11 @@ return msg; } } + + /** + * Replacement for Long.compare() which was added in API level 19. + */ + public static int longCompare(long lhs, long rhs) { + return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1); + } }