diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-15 16:15:08 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-04-16 09:33:55 -0700 |
commit | a409b6af2a5b9a10dc9839ba68b4555f038de670 (patch) | |
tree | 1f3546abbd1b98edd8702f258f223f086e8d931b /src | |
parent | 1582ac15d1f30a651000aa5d5098d73be3aa4810 (diff) |
Change hasVoicemailNumber to getVoicemailNumber
Bug: 20223485
Change-Id: Iaa8f140746d1266febfcacf0f007ef2b4ebba968
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 9b71b98db..f18903b93 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1522,7 +1522,7 @@ public class DialpadFragment extends Fragment * * @return true if voicemail is enabled and accessible. Note that this can be false * "temporarily" after the app boot. - * @see TelecomManager#hasVoiceMailNumber(PhoneAccountHandle) + * @see TelecomManager#getVoiceMailNumber(PhoneAccountHandle) */ private boolean isVoicemailAvailable() { try { @@ -1532,9 +1532,10 @@ public class DialpadFragment extends Fragment if (defaultUserSelectedAccount == null) { // In a single-SIM phone, there is no default outgoing phone account selected by // the user, so just call TelephonyManager#getVoicemailNumber directly. - return getTelephonyManager().getVoiceMailNumber() != null; + return !TextUtils.isEmpty(getTelephonyManager().getVoiceMailNumber()); } else { - return getTelecomManager().hasVoiceMailNumber(defaultUserSelectedAccount); + return !TextUtils.isEmpty( + getTelecomManager().getVoiceMailNumber(defaultUserSelectedAccount)); } } catch (SecurityException se) { // Possibly no READ_PHONE_STATE privilege. |