diff options
author | Sai Cheemalapati <saicheems@google.com> | 2014-08-07 13:35:41 -0700 |
---|---|---|
committer | Sai Cheemalapati <saicheems@google.com> | 2014-08-07 20:40:37 +0000 |
commit | 9028f6e6420ff47c6227d9f3936b9a19b8a0b153 (patch) | |
tree | 0d3ec2e7e58557f2b9e8c6564dd18d7e58b4aba1 /src | |
parent | ba1fca910e44151a4e2f7f221d737c239dd610c1 (diff) |
Fixing possible crash on tab switch.
Bug: 16873267
Change-Id: I66309fad4b2e49dd5ca8ba0d17a88a6a0ede07a9
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 966d265dd..22cb35c0f 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -331,11 +331,11 @@ public class ListsFragment extends AnalyticsFragment implements CallLogQueryHand @Override public void onPageSelected(int position) { - if (position == TAB_INDEX_SPEED_DIAL) { + if (position == TAB_INDEX_SPEED_DIAL && mSpeedDialFragment != null) { mSpeedDialFragment.sendScreenView(); - } else if (position == TAB_INDEX_RECENTS) { + } else if (position == TAB_INDEX_RECENTS && mRecentsFragment != null) { mRecentsFragment.sendScreenView(); - } else if (position == TAB_INDEX_ALL_CONTACTS) { + } else if (position == TAB_INDEX_ALL_CONTACTS && mAllContactsFragment != null) { mAllContactsFragment.sendScreenView(); } final int count = mOnPageChangeListeners.size(); |