summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryingrenw <yingrenw@codeaurora.org>2017-01-03 12:05:15 (GMT)
committerArne Coucheron <arco68@gmail.com>2017-07-15 04:51:07 (GMT)
commitbb0aa6cbcf6ef267096a4adeb9012d36e9bac01f (patch)
treeabcea41220f04ffa9a65f60ef0972c2ae9967db0
parent64b2fdb876bc93253b74da6563c5bc6edc6f0b4f (diff)
downloadandroid_packages_apps_Trebuchet-bb0aa6cbcf6ef267096a4adeb9012d36e9bac01f.zip
android_packages_apps_Trebuchet-bb0aa6cbcf6ef267096a4adeb9012d36e9bac01f.tar.gz
android_packages_apps_Trebuchet-bb0aa6cbcf6ef267096a4adeb9012d36e9bac01f.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));