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

Commit 90853251 authored by Winson Chung's avatar Winson Chung
Browse files

Only sublist array by size or limit, whichever is smaller.

Bug: 37756537
Test: Set < 3 actions, ensure no crash...
Change-Id: I93a5ac78292fcdd870ebd897441c2cef0774d134
parent 04225787
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ public class PictureInPictureParams implements Parcelable {
     */
    public void truncateActions(int size) {
        if (hasSetActions()) {
            mUserActions = mUserActions.subList(0, size);
            mUserActions = mUserActions.subList(0, Math.min(mUserActions.size(), size));
        }
    }