diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-16 17:05:16 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-16 17:05:22 +0000 |
commit | b5f47c523d1636218b5b2b555cee257eb27eeeb8 (patch) | |
tree | 7cb597e96f0320ac5f0513a5f15216108b1a66ef /src | |
parent | c1b7d0ae8cdfc0f0dddb5c2bb45c8239ffc6a264 (diff) | |
parent | a409b6af2a5b9a10dc9839ba68b4555f038de670 (diff) |
Merge "Change hasVoicemailNumber to getVoicemailNumber"
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. |