From a409b6af2a5b9a10dc9839ba68b4555f038de670 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 15 Apr 2015 16:15:08 -0700 Subject: Change hasVoicemailNumber to getVoicemailNumber Bug: 20223485 Change-Id: Iaa8f140746d1266febfcacf0f007ef2b4ebba968 --- src/com/android/dialer/dialpad/DialpadFragment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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. -- cgit v1.2.3