commit | 3a4caed1f3df5b4b56b1e0d0271f8dd341620842 | [log] [tgz] |
---|---|---|
author | Hyunyoung Song <hyunyoungs@google.com> | Mon Nov 09 22:19:37 2020 -0800 |
committer | Hyunyoung Song <hyunyoungs@google.com> | Mon Nov 09 22:19:37 2020 -0800 |
tree | eb7025ec12d494bb1ace663b607337bc9702ff0d | |
parent | 06849da424157d92b2fbace53528518eae6c0b34 [diff] |
Fix NPE inside getFocusdChild Bug: 172883035 Change-Id: Iea3e07165cdaa45031ee5bbc11add5c115cab366
diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 2450787..354f97c 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
@@ -132,6 +132,9 @@ * Returns the child adapter item with IME launch focus. */ public AdapterItem getFocusedChild() { + if (mAdapterItems.size() == 0) { + return null; + } return mAdapterItems.get(getFocusedChildIndex()); }