Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c80a1d8f authored by Hemant Gupta's avatar Hemant Gupta Committed by Android Git Automerger
Browse files

am 818a6f8e: MAP: Set messageList element to proper size based on offset/count

* commit '818a6f8e':
  MAP: Set messageList element to proper size based on offset/count
parents bb5c19b6 818a6f8e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -105,7 +105,12 @@ public class BluetoothMapMessageListing {
        if (offset + count <= list.size()) {
            list = list.subList(offset, offset + count);
        } else {
            list = null;
            if(offset > list.size()) {
               list = new ArrayList<BluetoothMapMessageListingElement>();
               Log.d(TAG, "offset greater than list size. Returning empty list");
            } else {
               list = list.subList(offset, list.size());
            }
        }
    }
}