summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryingrenw <yingrenw@codeaurora.org>2017-01-03 12:05:15 (GMT)
committerBruno Martins <bgcngm@gmail.com>2019-10-20 13:00:37 (GMT)
commitd43e011e5e29007ef32d15321d7791f585541e15 (patch)
tree12ee7227ab036bdb577d4b2c54c89cb002fe9a97
parent83baf7da35f120afedc274718bf0204308b7c4b7 (diff)
downloadandroid_packages_apps_Trebuchet-d43e011e5e29007ef32d15321d7791f585541e15.zip
android_packages_apps_Trebuchet-d43e011e5e29007ef32d15321d7791f585541e15.tar.gz
android_packages_apps_Trebuchet-d43e011e5e29007ef32d15321d7791f585541e15.tar.bz2
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.java2
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 fde220c..b6fcdf4 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));