commit | 971b75822f5dff76ac9d8b2586400691e601e70f | [log] [tgz] |
---|---|---|
author | Brian Attwell <brianattwell@google.com> | Wed Dec 17 19:40:43 2014 -0800 |
committer | Brian Attwell <brianattwell@google.com> | Thu Dec 18 03:44:27 2014 +0000 |
tree | 0e7243a139ba1b5bc870df1010aee4179a57e8c9 | |
parent | e5ac8b14a6549e18d811b7241911d1231cf5f5fc [diff] |
Don't rely on removed pattern character definitions These pattern characters were removed from the API, since using their underlying values is easier. See commit that deprecated them: https://android.googlesource.com/platform/frameworks/base.git/+/8326b9a429b63b680aa9af116c670ce674744d80 #unbundling Bug: 18777272 Change-Id: Id2c6bd415cf3624d2c981f7a05666f38a9fb9f9f
diff --git a/src/com/android/contacts/common/util/DateUtils.java b/src/com/android/contacts/common/util/DateUtils.java index d0152b6..c695ec6 100644 --- a/src/com/android/contacts/common/util/DateUtils.java +++ b/src/com/android/contacts/common/util/DateUtils.java
@@ -185,10 +185,10 @@ public static boolean isMonthBeforeDay(Context context) { char[] dateFormatOrder = DateFormat.getDateFormatOrder(context); for (int i = 0; i < dateFormatOrder.length; i++) { - if (dateFormatOrder[i] == DateFormat.DATE) { + if (dateFormatOrder[i] == 'd') { return false; } - if (dateFormatOrder[i] == DateFormat.MONTH) { + if (dateFormatOrder[i] == 'M') { return true; } }