summaryrefslogtreecommitdiff
path: root/src
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 22:06:40 +0000
commitc5517b3e7212c3561f8682e6746c94279416bb82 (patch)
treef0ec59ac18b39a6f6df82af5b58e0840f10196a8 /src
parentc9063f5ca644ed4917c4ca342676d45b478cfe87 (diff)
Protect against class cast exception DO NOT MERGE
Missed instance of this problem in saveOffsets() in previous fix made to onPreDraw() Bug:12228894 Change-Id: I9bd9596f670f4fe8eb355fccd1c0641e5ee37306 (cherry picked from commit e3b3b4a864d8c417217e3cff847f63f165cb4141)
Diffstat (limited to 'src')
-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 354765f77..0d33b4c85 100644
--- a/src/com/android/dialer/list/PhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java
@@ -444,7 +444,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),