diff options
Diffstat (limited to 'java/com/android/dialer/main/impl')
-rw-r--r-- | java/com/android/dialer/main/impl/OldMainActivityPeer.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java index 70ecb8360..a05ef6d16 100644 --- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java +++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java @@ -252,7 +252,7 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen * Check and return whether the voicemail tab should be shown or not. This includes the following * criteria under which we show the voicemail tab: * <li>The voicemail number exists (e.g we are able to dial into listen to voicemail or press and - * hold 1) + * hold 1) (TODO (uabdullah): Handle this case properly) * <li>Visual voicemail is enabled from the settings tab * <li>Visual voicemail carrier is supported by dialer * <li>There is no voicemail carrier app installed. @@ -265,14 +265,18 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen PhoneAccountHandle defaultUserSelectedAccount = TelecomUtil.getDefaultOutgoingPhoneAccount(context, PhoneAccount.SCHEME_VOICEMAIL); - if (isVoicemailAvailable(context, defaultUserSelectedAccount)) { - return true; + if (!isVoicemailAvailable(context, defaultUserSelectedAccount)) { + LogUtil.i("OldMainActivityPeer.canVoicemailTabBeShown", "Voicemail is not available"); + return false; } + if (VoicemailComponent.get(context) .getVoicemailClient() .isVoicemailEnabled(context, defaultUserSelectedAccount)) { + LogUtil.i("OldMainActivityPeer.canVoicemailTabBeShown", "Voicemail is not enabled"); return true; } + LogUtil.i("OldMainActivityPeer.canVoicemailTabBeShown", "returning false"); return false; } |