summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryingrenw <yingrenw@codeaurora.org>2017-01-03 12:05:15 (GMT)
committerArne Coucheron <arco68@gmail.com>2017-09-02 22:10:10 (GMT)
commitad3429033ffc02766877f85b6e758b898bb28957 (patch)
treecd5f03af95d9807ffe437e8f723e29986ce88bb9
parent266be2ec84ed734c74dc44568cf6364fd87f9b71 (diff)
downloadandroid_packages_apps_Trebuchet-ad3429033ffc02766877f85b6e758b898bb28957.zip
android_packages_apps_Trebuchet-ad3429033ffc02766877f85b6e758b898bb28957.tar.gz
android_packages_apps_Trebuchet-ad3429033ffc02766877f85b6e758b898bb28957.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 bd5c06e..06ca667 100644
--- a/src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java
+++ b/src/com/android/launcher3/keyboard/ViewGroupFocusHelper.java
@@ -55,7 +55,7 @@ public class ViewGroupFocusHelper extends FocusIndicatorHelper {
outRect.left += child.getLeft();
outRect.top += child.getTop();
- if (parent != mContainer) {
+ if (parent != null && parent != mContainer) {
if (parent instanceof PagedView) {
PagedView page = (PagedView) parent;
outRect.left -= page.getScrollForPage(page.indexOfChild(child));