commit | c25bc0335b29a0e36d5e8586cb61781e91aff36e | [log] [tgz] |
---|---|---|
author | Samuel Fufa <sfufa@google.com> | Wed Nov 11 10:24:34 2020 -0600 |
committer | Samuel Fufa <sfufa@google.com> | Wed Nov 11 11:31:54 2020 -0600 |
tree | 7d7ffab92a968687308a8665ef662874f3318e51 | |
parent | 9ee4e86cf8d5e34a2afbb30ebcbdb06a8176fba7 [diff] |
Fix OutOfBounds issue on getFocusedChild In cases where search only shows items that don't require focus highlighting,getFocusedChildIndex returns -1. Bug: 13023194 Change-Id: I6145ae26e3953c5fc4fd1ed1696eb931017cac0f
diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 354f97c..f235199 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
@@ -132,7 +132,7 @@ * Returns the child adapter item with IME launch focus. */ public AdapterItem getFocusedChild() { - if (mAdapterItems.size() == 0) { + if (mAdapterItems.size() == 0 || getFocusedChildIndex() != -1) { return null; } return mAdapterItems.get(getFocusedChildIndex());