summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-06-10 20:28:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-10 20:28:17 +0000
commit0cdfe553dd4d20d89a049999c7ed697a44db9327 (patch)
tree18bc82caf6f7eb04df8e91d3d5deebd038bc6130
parent6f009da749e307ebbd49658831e7f6bb8ee3e708 (diff)
parent1e273313ff938ba0c7294dade433736d3fc5876b (diff)
Merge "Adding "today" and "yesterday" string resources."
-rw-r--r--res/values/strings.xml10
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java10
2 files changed, 11 insertions, 9 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8f083c885..bd23506a5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -687,11 +687,19 @@
[CHAR LIMIT=NONE] -->
<string name="toast_entry_removed">Call log entry deleted.</string>
+ <!-- String used as a header in the call log above calls which occurred today.
+ [CHAR LIMIT=65] -->
+ <string name="call_log_header_today">Today</string>
+
+ <!-- String used as a header in the call log above calls which occurred yesterday.
+ [CHAR LIMIT=65] -->
+ <string name="call_log_header_yesterday">Yesterday</string>
+
<!-- String used as a header in the call log above calls which occurred last week.
[CHAR LIMIT=65] -->
<string name="call_log_header_last_week">Last week</string>
- <!-- String used as a header in the call log above calls which ocurred more than a week ago.
+ <!-- String used as a header in the call log above calls which occurred more than a week ago.
[CHAR LIMIT=65] -->
<string name="call_log_header_other">Other</string>
</resources>
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 {