Focuses on folder container for Accessibility when no contents to focus on.
This happens when you drag an app into a folder when the current page is
already full. The new page has no apps in it until you drop the one you
want to add.
Fixes: 161040039
Change-Id: Iaa857e7a114e859fa7e6a0653028856a3a8a94a6
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 1c18402..de2b5da 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -741,7 +741,8 @@
@Override
protected View getAccessibilityInitialFocusView() {
- return mContent.getFirstItem();
+ View firstItem = mContent.getFirstItem();
+ return firstItem != null ? firstItem : super.getAccessibilityInitialFocusView();
}
private void closeComplete(boolean wasAnimated) {