diff options
author | Nancy Chen <nancychen@google.com> | 2015-11-11 01:14:40 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-11-11 01:14:40 +0000 |
commit | 75637b0c96ef7bd0dca6f84bccbcdd2863d1b7d0 (patch) | |
tree | 2deea054da2450357a8c76f2a359ad2d1f567453 | |
parent | 87836d12cf182d9a70aa68ae06e8aab90f2c4518 (diff) | |
parent | fa26d26069383959809fca27f1c76a1f6ea25265 (diff) |
Merge "Specify whether the voicemail tab should be removed or updated." into ub-contactsdialer-a-dev am: 52f2bd3394
am: fa26d26069
* commit 'fa26d26069383959809fca27f1c76a1f6ea25265':
Specify whether the voicemail tab should be removed or updated.
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 9b1e41e5d..cf999e70c 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -181,6 +181,7 @@ public class ListsFragment extends Fragment public void onResume() { Trace.beginSection(TAG + " onResume"); super.onResume(); + mActionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); if (getUserVisibleHint()) { sendScreenViewForCurrentPosition(); @@ -304,7 +305,12 @@ public class ListsFragment extends Fragment if (hasActiveVoicemailProvider != mHasActiveVoicemailProvider) { mHasActiveVoicemailProvider = hasActiveVoicemailProvider; mViewPagerAdapter.notifyDataSetChanged(); - mViewPagerTabs.updateTab(TAB_INDEX_VOICEMAIL); + + if (hasActiveVoicemailProvider) { + mViewPagerTabs.updateTab(TAB_INDEX_VOICEMAIL); + } else { + mViewPagerTabs.removeTab(TAB_INDEX_VOICEMAIL); + } mPrefs.edit() .putBoolean(VisualVoicemailEnabledChecker.PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, |