mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Removing discovery bouncer from accessibility
It was obstructing views under it. Solves both Talkback and Switch Access issues. Bug: 80192025 Test: Manual Change-Id: Ia7fad91e1fcb857afbf68f879550c670279cee68
This commit is contained in:
@@ -51,6 +51,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
TYPE_WIDGET_RESIZE_FRAME,
|
||||
TYPE_WIDGETS_FULL_SHEET,
|
||||
TYPE_ON_BOARD_POPUP,
|
||||
TYPE_DISCOVERY_BOUNCE,
|
||||
|
||||
TYPE_QUICKSTEP_PREVIEW,
|
||||
TYPE_TASK_MENU,
|
||||
@@ -64,6 +65,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
public static final int TYPE_WIDGET_RESIZE_FRAME = 1 << 3;
|
||||
public static final int TYPE_WIDGETS_FULL_SHEET = 1 << 4;
|
||||
public static final int TYPE_ON_BOARD_POPUP = 1 << 5;
|
||||
public static final int TYPE_DISCOVERY_BOUNCE = 1 << 6;
|
||||
|
||||
// Popups related to quickstep UI
|
||||
public static final int TYPE_QUICKSTEP_PREVIEW = 1 << 6;
|
||||
@@ -72,14 +74,17 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
|
||||
public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP
|
||||
| TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET
|
||||
| TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_TASK_MENU | TYPE_OPTIONS_POPUP;
|
||||
| TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU
|
||||
| TYPE_OPTIONS_POPUP;
|
||||
|
||||
// Type of popups which should be kept open during launcher rebind
|
||||
public static final int TYPE_REBIND_SAFE = TYPE_WIDGETS_FULL_SHEET
|
||||
| TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP;
|
||||
| TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE;
|
||||
|
||||
// Usually we show the back button when a floating view is open. Instead, hide for these types.
|
||||
public static final int TYPE_HIDE_BACK_BUTTON = TYPE_ON_BOARD_POPUP;
|
||||
public static final int TYPE_HIDE_BACK_BUTTON = TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE;
|
||||
|
||||
public static final int TYPE_ACCESSIBLE = TYPE_ALL & ~TYPE_DISCOVERY_BOUNCE;
|
||||
|
||||
protected boolean mIsOpen;
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public class DiscoveryBounce extends AbstractFloatingView {
|
||||
|
||||
@Override
|
||||
protected boolean isOfType(int type) {
|
||||
return (type & TYPE_ON_BOARD_POPUP) != 0;
|
||||
return (type & TYPE_DISCOVERY_BOUNCE) != 0;
|
||||
}
|
||||
|
||||
private void show(int containerType) {
|
||||
|
||||
@@ -218,7 +218,8 @@ public class DragLayer extends BaseDragLayer<Launcher> {
|
||||
|
||||
@Override
|
||||
public void addChildrenForAccessibility(ArrayList<View> childrenForAccessibility) {
|
||||
View topView = AbstractFloatingView.getTopOpenView(mActivity);
|
||||
View topView = AbstractFloatingView.getTopOpenViewWithType(mActivity,
|
||||
AbstractFloatingView.TYPE_ACCESSIBLE);
|
||||
if (topView != null) {
|
||||
addAccessibleChildToList(topView, childrenForAccessibility);
|
||||
if (isInAccessibleDrag()) {
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.launcher3.views;
|
||||
|
||||
import static com.android.launcher3.Utilities.SINGLE_FRAME_MS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
@@ -36,8 +38,6 @@ import com.android.launcher3.util.TouchController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static com.android.launcher3.Utilities.SINGLE_FRAME_MS;
|
||||
|
||||
/**
|
||||
* A viewgroup with utility methods for drag-n-drop and touch interception
|
||||
*/
|
||||
@@ -100,7 +100,8 @@ public abstract class BaseDragLayer<T extends BaseDraggingActivity> extends Inse
|
||||
@Override
|
||||
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
|
||||
// Shortcuts can appear above folder
|
||||
View topView = AbstractFloatingView.getTopOpenView(mActivity);
|
||||
View topView = AbstractFloatingView.getTopOpenViewWithType(mActivity,
|
||||
AbstractFloatingView.TYPE_ACCESSIBLE);
|
||||
if (topView != null) {
|
||||
if (child == topView) {
|
||||
return super.onRequestSendAccessibilityEvent(child, event);
|
||||
@@ -114,7 +115,8 @@ public abstract class BaseDragLayer<T extends BaseDraggingActivity> extends Inse
|
||||
|
||||
@Override
|
||||
public void addChildrenForAccessibility(ArrayList<View> childrenForAccessibility) {
|
||||
View topView = AbstractFloatingView.getTopOpenView(mActivity);
|
||||
View topView = AbstractFloatingView.getTopOpenViewWithType(mActivity,
|
||||
AbstractFloatingView.TYPE_ACCESSIBLE);
|
||||
if (topView != null) {
|
||||
// Only add the top view as a child for accessibility when it is open
|
||||
addAccessibleChildToList(topView, childrenForAccessibility);
|
||||
|
||||
Reference in New Issue
Block a user