summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2015-05-28 21:48:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-28 21:49:43 +0000
commita14cb230dad35fc4ad54dae9f5c5d4f71b89ff12 (patch)
treec392ddb45927842ee7e5c3ed0af82df0e6c22bd0
parentc3d4553d462521bc77b719109ea8cf5b5812d471 (diff)
parent89aeda1b78907fefe259df770a01f490d4901128 (diff)
downloadandroid_packages_apps_Trebuchet-a14cb230dad35fc4ad54dae9f5c5d4f71b89ff12.tar.gz
android_packages_apps_Trebuchet-a14cb230dad35fc4ad54dae9f5c5d4f71b89ff12.tar.bz2
android_packages_apps_Trebuchet-a14cb230dad35fc4ad54dae9f5c5d4f71b89ff12.zip
Merge "Guard against monkey actor test NPE inside FocusHelper b/19626762" into ub-launcher3-almonte
-rw-r--r--src/com/android/launcher3/FocusHelper.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java
index e60704718..0dca07843 100644
--- a/src/com/android/launcher3/FocusHelper.java
+++ b/src/com/android/launcher3/FocusHelper.java
@@ -284,6 +284,12 @@ public class FocusHelper {
if (workspace != null) {
int pageIndex = workspace.getCurrentPage();
CellLayout topLayout = (CellLayout) workspace.getChildAt(pageIndex);
+ if (topLayout == null) {
+ // This is to guard against monkey actor test where the cell layout
+ // of the new pageIndex is null monkey issuing commands while
+ // animations happen.
+ return wasHandled;
+ }
ShortcutAndWidgetContainer children = topLayout.getShortcutsAndWidgets();
final View newIcon = getIconInDirection(layout, children, -1, 1);
// Select the first bubble text view in the current page of the workspace