summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-06-10 12:59:53 -0700
committerTyler Gunn <tgunn@google.com>2014-06-10 12:59:53 -0700
commit1e273313ff938ba0c7294dade433736d3fc5876b (patch)
treee15ec0ea30b4b3c0e1869c1cbae299e949e7503a /src
parentaa3350fe6fc21945e52f4a1096e68e73757ad2bf (diff)
Adding "today" and "yesterday" string resources.
These replace a previous method which relied on buggy methods to try and get the today and yesterday literals from the locale layer using a date format method. Bug: 15541650 Change-Id: I6ff6dd133904f21c8b41b51e68db465c34186719
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 924a17fc2..12edaa0f2 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -122,12 +122,6 @@ public class CallLogAdapter extends GroupingListAdapter
/** The size of the cache of contact info. */
private static final int CONTACT_INFO_CACHE_SIZE = 100;
- /** Localized string representing the word "Today". */
- private final CharSequence mTodayLabel = DateUtils.getTodayString();
-
- /** Localized string representing the word "Yesterday". */
- private final CharSequence mYesterdayLabel = DateUtils.getYesterdayString();
-
/** Constant used to indicate no row is expanded. */
private static final long NONE_EXPANDED = -1;
@@ -1318,9 +1312,9 @@ public class CallLogAdapter extends GroupingListAdapter
*/
private CharSequence getGroupDescription(int group) {
if (group == CallLogGroupBuilder.DAY_GROUP_TODAY) {
- return mTodayLabel;
+ return mContext.getResources().getString(R.string.call_log_header_today);
} else if (group == CallLogGroupBuilder.DAY_GROUP_YESTERDAY) {
- return mYesterdayLabel;
+ return mContext.getResources().getString(R.string.call_log_header_yesterday);
} else if (group == CallLogGroupBuilder.DAY_GROUP_LAST_WEEK) {
return mContext.getResources().getString(R.string.call_log_header_last_week);
} else {