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

Commit b9672a66 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Ensure taskbar hotseat array index is in bounds" into sc-dev

parents 73cc9a50 bc08503e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -78,7 +78,10 @@ public class TaskbarHotseatController {
                CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams();
                // Since the hotseat might be laid out vertically or horizontally, use whichever
                // index is higher.
                hotseatItemInfos[Math.max(lp.cellX, lp.cellY)] = itemInfo;
                int index = Math.max(lp.cellX, lp.cellY);
                if (0 <= index && index < hotseatItemInfos.length) {
                    hotseatItemInfos[index] = itemInfo;
                }
            }
        }