summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2013-12-19 11:40:42 -0800
committerJay Shrauner <shrauner@google.com>2013-12-19 11:40:42 -0800
commitf2429f2f4fb0629752e8d719ad855f97263d2216 (patch)
treea1f06b094a990ecf55bae68ab9c8dafd11e8426d
parent7983206661f065342767bb4141d7a924323b2933 (diff)
Protect against class cast exception
Protect against class cast exception. Bug:12228894 Change-Id: Ifae04d6354812e296890cfe0c4c5f2fff73c4c2a
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteFragment.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java
index 34666ee99..9e383949b 100644
--- a/src/com/android/dialer/list/PhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java
@@ -538,7 +538,8 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen
final View child = mListView.getChildAt(i);
int position = firstVisiblePosition + i;
final int itemViewType = mAdapter.getItemViewType(position);
- if (itemViewType == PhoneFavoritesTileAdapter.ViewTypes.TOP) {
+ if (itemViewType == PhoneFavoritesTileAdapter.ViewTypes.TOP &&
+ child instanceof ContactTileRow) {
// This is a tiled row, so perform horizontal animations instead
performHorizontalAnimations((ContactTileRow) child, (
ArrayList<ContactEntry>) mAdapter.getItem(position), idsInPlace);