diff options
author | yingrenw <yingrenw@codeaurora.org> | 2017-01-03 20:05:15 +0800 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-12-12 15:18:16 +0200 |
commit | c7d52fda6cac87fdf8f7b8e41e106046f5bf63bd (patch) | |
tree | 57a0cf089557a93a4c88f0c1a034e5b8a3124faf | |
parent | 066b68b4ba540ade2891ad4a34306be3718c0fba (diff) | |
download | android_packages_apps_Trebuchet-c7d52fda6cac87fdf8f7b8e41e106046f5bf63bd.tar.gz android_packages_apps_Trebuchet-c7d52fda6cac87fdf8f7b8e41e106046f5bf63bd.tar.bz2 android_packages_apps_Trebuchet-c7d52fda6cac87fdf8f7b8e41e106046f5bf63bd.zip |
Launcher3: Stability NullPointer issue
Description:
Compute a child location by recursion, it
may not have parent view.
When the child doesn't have parent, should
break the recursive.
Change-Id: I8707712b85c10bf1c1d3860c5b8323aefd455cf2
CRs-Fixed: 1104931
-rw-r--r-- | src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java b/src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java index fde220cbf..b6fcdf414 100644 --- a/src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java +++ b/src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java @@ -54,7 +54,7 @@ public class ViewGroupFocusHelper extends FocusIndicatorHelper { outRect.left += child.getX(); outRect.top += child.getY(); - if (parent != mContainer) { + if (parent != null && parent != mContainer) { if (parent instanceof PagedView) { PagedView page = (PagedView) parent; outRect.left -= page.getScrollForPage(page.indexOfChild(child)); |