From 3f89169db9591f8c19f4e2df46668e061b230ecc Mon Sep 17 00:00:00 2001 From: Android Dialer Date: Wed, 25 Oct 2017 11:43:41 -0700 Subject: Fix contacts promo not showing consistently due to scroll settling tab index Follow repro steps to see contacts promo always consistently shown Bug: 68158965 Test: manual PiperOrigin-RevId: 173427472 Change-Id: I3717ee674aa81d1f1c563920796ef0f21dcdd963 --- java/com/android/dialer/app/DialtactsActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'java/com/android/dialer') diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index 5f4b62c22..b9ca67f62 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -709,9 +709,8 @@ public class DialtactsActivity extends TransactionSafeActivity startActivity(intent); } - public boolean inAllContactsTab() { - return mListsFragment.getUserVisibleHint() - && mListsFragment.getCurrentTabIndex() == DialtactsPagerAdapter.TAB_INDEX_ALL_CONTACTS; + public boolean isListsFragmentVisible() { + return mListsFragment.getUserVisibleHint(); } @Override -- cgit v1.2.3