Fix possible index out of bounds exception in ConversationAdapter.

If we're deferring to super.getItem(), then we should be guarding with
super.getItemCount().
fork-5.53.8
Greyson Parrelli 2022-04-22 14:50:23 -04:00 zatwierdzone przez Alex Hart
rodzic d0c14895d0
commit fadd4ac61e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -377,7 +377,7 @@ public class ConversationAdapter
pagingController.onDataNeededAroundIndex(position);
}
if (position < getItemCount()) {
if (position < super.getItemCount()) {
return super.getItem(position);
} else {
Log.d(TAG, "Could not access corrected position " + position + " as it is out of bounds.");