diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-28 02:25:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-28 02:25:26 +0000 |
commit | 37434b495f1e53612d4279288f6fa3ac5e795615 (patch) | |
tree | f9427ee9449664e50d8974d1fba2bae06a62f08c /java/com/android/dialer/main/impl/OldMainActivityPeer.java | |
parent | 9a2265a70b2d2e46391aa37e118f8ae6e5b5dbdf (diff) | |
parent | f80d8afdb0f5ef6d24b8bb76442cab8cef38da8f (diff) |
Merge changes I9ab50a7a,I8a57b632
* changes:
Do not show the voicemail tab if the VM toggle is turned off.
Internal cleanup for the new UI's bottom sheet.
Diffstat (limited to 'java/com/android/dialer/main/impl/OldMainActivityPeer.java')
-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; } |