Skip to content

Commit

Permalink
Launcher3: Stability NullPointer issue
Browse files Browse the repository at this point in the history
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
Signed-off-by: Pranav Vashi <[email protected]>
Signed-off-by: Mohammad Hasan Keramat J <[email protected]>
  • Loading branch information
yingrenw authored and MrSluffy committed Jan 28, 2024
1 parent 97c45a0 commit b585d3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void computeLocationRelativeToContainer(View child, Rect outRect) {
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));
Expand Down

0 comments on commit b585d3f

Please sign in to comment.