From f865551ff00631b89378bd2a83727d58ec6761a0 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Mon, 13 Jul 2020 20:56:38 -0700 Subject: [PATCH] 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 --- src/com/android/launcher3/folder/Folder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index 1c18402932..de2b5da6ad 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -741,7 +741,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo @Override protected View getAccessibilityInitialFocusView() { - return mContent.getFirstItem(); + View firstItem = mContent.getFirstItem(); + return firstItem != null ? firstItem : super.getAccessibilityInitialFocusView(); } private void closeComplete(boolean wasAnimated) {