From f2429f2f4fb0629752e8d719ad855f97263d2216 Mon Sep 17 00:00:00 2001 From: Jay Shrauner Date: Thu, 19 Dec 2013 11:40:42 -0800 Subject: Protect against class cast exception Protect against class cast exception. Bug:12228894 Change-Id: Ifae04d6354812e296890cfe0c4c5f2fff73c4c2a --- src/com/android/dialer/list/PhoneFavoriteFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/android') 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) mAdapter.getItem(position), idsInPlace); -- cgit v1.2.3