summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-08-07 20:56:08 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-07 20:56:08 +0000
commit779c9c9f4fc8a6c5af2d211da24257e8224fd6df (patch)
treece801dce375f35f8cc2f1c2831a9faaeb667f7bc
parent47d879ee2d8657b4278e4cad8a77fc69520087bc (diff)
parent9028f6e6420ff47c6227d9f3936b9a19b8a0b153 (diff)
am 9028f6e6: Fixing possible crash on tab switch.
* commit '9028f6e6420ff47c6227d9f3936b9a19b8a0b153': Fixing possible crash on tab switch.
-rw-r--r--src/com/android/dialer/list/ListsFragment.java6
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();