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

Commit 143e612b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add detailed exception for snappedIndex == -1 when dismissing tasks"...

Merge "Add detailed exception for snappedIndex == -1 when dismissing tasks" into udc-dev am: dcbe9583

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23535540



Change-Id: Id446aaa7fa907aaa4376b9d442f5bbc78a44298c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 707af994 dcbe9583
Loading
Loading
Loading
Loading
+26 −12
Original line number Diff line number Diff line
@@ -3742,6 +3742,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                                        taskViewIdArray.removeValue(
                                                finalNextFocusedTaskView.getTaskViewId());
                                    }
                                    try {
                                        if (snappedIndex < taskViewIdArray.size()) {
                                            taskViewIdToSnapTo = taskViewIdArray.get(snappedIndex);
                                        } else if (snappedIndex == taskViewIdArray.size()) {
@@ -3756,6 +3757,19 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                                                        snappedIndex);
                                            }
                                        }
                                    } catch (ArrayIndexOutOfBoundsException e) {
                                        throw new IllegalStateException(
                                                "b/269956477 invalid snappedIndex"
                                                        + "\nsnappedTaskViewId: "
                                                        + snappedTaskViewId
                                                        + "\nfocusedTaskViewId: "
                                                        + mFocusedTaskViewId
                                                        + "\ntopRowIdArray: "
                                                        + getTopRowIdArray().toConcatString()
                                                        + "\nbottomRowIdArray: "
                                                        + getBottomRowIdArray().toConcatString(),
                                                e);
                                    }
                                }
                            }