summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2014-03-21 14:54:45 -0700
committerJay Shrauner <shrauner@google.com>2014-03-21 14:55:40 -0700
commite3b3b4a864d8c417217e3cff847f63f165cb4141 (patch)
treebc0e31f4c592dd5571de08f3c9ed3e6f2710f822
parent628eef4356972b1964bbc3bb930322f301b4ae7c (diff)
Protect against class cast exception
Missed instance of this problem in saveOffsets() in previous fix made to onPreDraw() Bug:12228894 Change-Id: I9bd9596f670f4fe8eb355fccd1c0641e5ee37306
-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 0b191416d..5f5e55cd1 100644
--- a/src/com/android/dialer/list/PhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java
@@ -441,7 +441,8 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen
final int position = firstVisiblePosition + i;
final long itemId = mAdapter.getItemId(position);
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 save horizontal offsets instead
saveHorizontalOffsets((ContactTileRow) child, (ArrayList<ContactEntry>)
mAdapter.getItem(position),