summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/FocusHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-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