summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Brabham <optedoblivion@cyngn.com>2016-01-07 09:43:21 -0800
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:14:44 -0700
commite95dc56aff18520cb890122eb920d6cb9045c6fe (patch)
treea907748ec91ebcc7433bbdad35c1d46dbabbc35a
parentf9f332ac7e47587eae8b1f7a1917b3800ccfd8ce (diff)
downloadandroid_packages_apps_Trebuchet-e95dc56aff18520cb890122eb920d6cb9045c6fe.zip
android_packages_apps_Trebuchet-e95dc56aff18520cb890122eb920d6cb9045c6fe.tar.gz
android_packages_apps_Trebuchet-e95dc56aff18520cb890122eb920d6cb9045c6fe.tar.bz2
Prevent possible NPE during monkey test
Change-Id: If12f50a843540ed07cfff96af17caf9f181945f4 Ticket-Id: OPO-296
-rw-r--r--src/com/android/launcher3/FocusIndicatorView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher3/FocusIndicatorView.java b/src/com/android/launcher3/FocusIndicatorView.java
index ecf93e4..c30b561 100644
--- a/src/com/android/launcher3/FocusIndicatorView.java
+++ b/src/com/android/launcher3/FocusIndicatorView.java
@@ -165,6 +165,9 @@ public class FocusIndicatorView extends View implements View.OnFocusChangeListen
private static void computeLocationRelativeToParentHelper(View child,
View commonParent, int[] shift) {
+ if (child == null) {
+ return;
+ }
View parent = (View) child.getParent();
shift[0] += child.getLeft();
shift[1] += child.getTop();