Removing the Hotseat from the dragNdrop accessibility targets if the dragObject is a widget

Fix: 319036474
Test: manual
Flag: NA
Change-Id: I7404c02f8ef3c0eee41694729b4d174bcea7c7d4
This commit is contained in:
Sebastian Franco committed 2024-02-09 10:40:15 -08:00
1 parent 1bb90a78f6
commit 01a134349f
3 files changed
+16 -7

No files matched your search

+8 -2
View File
@@ -1636,9 +1636,15 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
mDragController.addDragListener(
new AccessibleDragListenerAdapter(this, WorkspaceAccessibilityHelper::new) {
@Override
protected void enableAccessibleDrag(boolean enable) {
super.enableAccessibleDrag(enable);
protected void enableAccessibleDrag(boolean enable,
@Nullable DragObject dragObject) {
super.enableAccessibleDrag(enable, dragObject);
setEnableForLayout(mLauncher.getHotseat(), enable);
if (enable && dragObject != null
&& dragObject.dragInfo instanceof LauncherAppWidgetInfo) {
mLauncher.getHotseat().setImportantForAccessibility(
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
}
});
}