summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/dialpad/DialpadFragment.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-11-20 15:02:49 -0800
committerYorke Lee <yorkelee@google.com>2013-11-22 10:43:41 -0800
commit3671725b58a9768016e141c77424dedb5fd2c55a (patch)
tree8e2ba3a38e3cb942a1845e37fbdbbc6d1777387b /src/com/android/dialer/dialpad/DialpadFragment.java
parent3ff9c116afdda86f9af4e21a3dcc744a3231e1d0 (diff)
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
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java10
1 files changed, 5 insertions, 5 deletions
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)