mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 07:46:55 +00:00
Merge "Guard against monkey actor test NPE inside FocusHelper b/19626762" into ub-launcher3-almonte
This commit is contained in:
committed by
Android (Google) Code Review
commit
a14cb230da
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user