summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-06-10 13:01:19 -0700
committerTyler Gunn <tgunn@google.com>2014-06-10 13:01:19 -0700
commita6a0acc4947739512b2bcc58262b19e53723704c (patch)
treeb997eef777f33d4ee147cae420abb272d9509455
parentcd869f7a17afdbca729bb02dae2d885708c5ebb3 (diff)
downloadandroid_packages_apps_ContactsCommon-a6a0acc4947739512b2bcc58262b19e53723704c.tar.gz
android_packages_apps_ContactsCommon-a6a0acc4947739512b2bcc58262b19e53723704c.tar.bz2
android_packages_apps_ContactsCommon-a6a0acc4947739512b2bcc58262b19e53723704c.zip
Removing flawed "getTodayString" and "getYesterdayString" methods.
These methods made assumptions of how getRelativeTimeSpanString works that were incorrect. Bug: 15541650 Change-Id: Ibdba688587b21d5fc547832ebee0997fc290c9fb
-rw-r--r--src/com/android/contacts/common/util/DateUtils.java28
-rw-r--r--tests/src/com/android/contacts/common/util/DateUtilTests.java14
2 files changed, 0 insertions, 42 deletions
diff --git a/src/com/android/contacts/common/util/DateUtils.java b/src/com/android/contacts/common/util/DateUtils.java
index 5d8ba70f..d0152b6f 100644
--- a/src/com/android/contacts/common/util/DateUtils.java
+++ b/src/com/android/contacts/common/util/DateUtils.java
@@ -271,34 +271,6 @@ public class DateUtils {
}
/**
- * Retrieves a locale-specific string for "Today".
- *
- * @return Locale-specific string for "Today".
- */
- public static CharSequence getTodayString() {
- return android.text.format.DateUtils.getRelativeTimeSpanString(
- -android.text.format.DateUtils.HOUR_IN_MILLIS,
- 0,
- android.text.format.DateUtils.DAY_IN_MILLIS,
- android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE);
-
- }
-
- /**
- * Retrieves a locale-specific string for "Yesterday".
- *
- * @return Locale-specific string for "Yesterday".
- */
- public static CharSequence getYesterdayString() {
- return android.text.format.DateUtils.getRelativeTimeSpanString(
- -android.text.format.DateUtils.DAY_IN_MILLIS,
- 0,
- android.text.format.DateUtils.DAY_IN_MILLIS,
- android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE);
-
- }
-
- /**
* Determine the difference, in days between two dates. Uses similar logic as the
* {@link android.text.format.DateUtils.getRelativeTimeSpanString} method.
*
diff --git a/tests/src/com/android/contacts/common/util/DateUtilTests.java b/tests/src/com/android/contacts/common/util/DateUtilTests.java
index c225780e..f4602892 100644
--- a/tests/src/com/android/contacts/common/util/DateUtilTests.java
+++ b/tests/src/com/android/contacts/common/util/DateUtilTests.java
@@ -28,20 +28,6 @@ import android.text.format.Time;
public class DateUtilTests extends TestCase {
/**
- * Test ability to get the word "Yesterday".
- */
- public void testGetYesterday() {
- assertEquals("Yesterday", DateUtils.getYesterdayString());
- }
-
- /**
- * Test ability to get the word "Today".
- */
- public void testGetToday() {
- assertEquals("Yesterday", DateUtils.getYesterdayString());
- }
-
- /**
* Test date differences which are in the same day.
*/
public void testDayDiffNone() {