From 3671725b58a9768016e141c77424dedb5fd2c55a Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 20 Nov 2013 15:02:49 -0800 Subject: Fix Dialer tests * Empty geocode is now " " instead of "-" per UX request * DialpadFragment now throws IllegalArgumentException instead of Log.wtf so that it can be tested * Added contact id column to contactsprovider query * Modified PhoneNumberDisplayHelper to take an instance of PhoneNumberUtilsWrapper so that it can be mocked out Fix label-related tests that were failing due to a change in how we treat empty labels Bug: 9111164 Change-Id: If2244586b9d09fa2839fa0ddfc9f369f9dc66e51 --- src/com/android/dialer/dialpad/DialpadFragment.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java') diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 00b8281a7..093cde246 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1560,9 +1560,9 @@ public class DialpadFragment extends Fragment * or Wait character (;). */ private void updateDialString(char newDigit) { - if(newDigit != WAIT && newDigit != PAUSE) { - Log.wtf(TAG, "Not expected for anything other than PAUSE & WAIT"); - return; + if (newDigit != WAIT && newDigit != PAUSE) { + throw new IllegalArgumentException( + "Not expected for anything other than PAUSE & WAIT"); } int selectionStart; @@ -1642,8 +1642,8 @@ public class DialpadFragment extends Fragment /* package */ static boolean canAddDigit(CharSequence digits, int start, int end, char newDigit) { if(newDigit != WAIT && newDigit != PAUSE) { - Log.wtf(TAG, "Should not be called for anything other than PAUSE & WAIT"); - return false; + throw new IllegalArgumentException( + "Should not be called for anything other than PAUSE & WAIT"); } // False if no selection, or selection is reversed (end < start) -- cgit v1.2.3