mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Allows Accessibility to focus on specified view in AbstractFloatingView.
Here, the first item in an ArrowPopup or Folder are focused on. Note: There's another pre-existing bug where it announces "Home screen x of y" when the floating view appears; this change doesn't address that. Fixes: 147470419 Change-Id: I1dc70edc21ea7c19a5742208512738d6c4a94067
This commit is contained in:
@@ -174,7 +174,8 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
targetInfo.first, TYPE_WINDOW_STATE_CHANGED, targetInfo.second);
|
||||
|
||||
if (mIsOpen) {
|
||||
performAccessibilityAction(AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null);
|
||||
getAccessibilityInitialFocusView().performAccessibilityAction(
|
||||
AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null);
|
||||
}
|
||||
ActivityContext.lookupContext(getContext()).getDragLayer()
|
||||
.sendAccessibilityEvent(TYPE_WINDOW_CONTENT_CHANGED);
|
||||
@@ -184,6 +185,11 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Returns the View that Accessibility services should focus on first. */
|
||||
protected View getAccessibilityInitialFocusView() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view matching FloatingViewType
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user