diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java index 34666ee99..04611b4ec 100644 --- a/src/com/android/dialer/list/PhoneFavoriteFragment.java +++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java @@ -453,8 +453,11 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen } private void saveHorizontalOffsets(ContactTileRow row, ArrayList<ContactEntry> list) { - for (int i = 0; i < list.size(); i++) { + for (int i = 0; i < list.size() && i < row.getChildCount(); i++) { final View child = row.getChildAt(i); + if (child == null) { + continue; + } final ContactEntry entry = list.get(i); final long itemId = mContactTileAdapter.getAdjustedItemId(entry.id); if (DEBUG) { |