Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a07c844e authored by Ryan Lin's avatar Ryan Lin Committed by Android (Google) Code Review
Browse files

Merge "Expose window type MAGNIFCATION_OVERLAY to AccessibilityService"

parents 050dd18d 53844535
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52181,6 +52181,7 @@ package android.view.accessibility {
    field public static final int TYPE_ACCESSIBILITY_OVERLAY = 4; // 0x4
    field public static final int TYPE_APPLICATION = 1; // 0x1
    field public static final int TYPE_INPUT_METHOD = 2; // 0x2
    field public static final int TYPE_MAGNIFICATION_OVERLAY = 6; // 0x6
    field public static final int TYPE_SPLIT_SCREEN_DIVIDER = 5; // 0x5
    field public static final int TYPE_SYSTEM = 3; // 0x3
  }
+9 −0
Original line number Diff line number Diff line
@@ -84,6 +84,12 @@ public final class AccessibilityWindowInfo implements Parcelable {
     */
    public static final int TYPE_SPLIT_SCREEN_DIVIDER = 5;

    /**
     * Window type: A system window used to show the UI for the interaction with
     * window-based magnification, which includes the magnified content and the option menu.
     */
    public static final int TYPE_MAGNIFICATION_OVERLAY = 6;

    /* Special values for window IDs */
    /** @hide */
    public static final int ACTIVE_WINDOW_ID = Integer.MAX_VALUE;
@@ -801,6 +807,9 @@ public final class AccessibilityWindowInfo implements Parcelable {
            case TYPE_SPLIT_SCREEN_DIVIDER: {
                return "TYPE_SPLIT_SCREEN_DIVIDER";
            }
            case TYPE_MAGNIFICATION_OVERLAY: {
                return "TYPE_MAGNIFICATION_OVERLAY";
            }
            default:
                return "<UNKNOWN:" + type + ">";
        }
+5 −2
Original line number Diff line number Diff line
@@ -754,8 +754,7 @@ public class AccessibilityWindowManager {
                case WindowManager.LayoutParams.TYPE_SYSTEM_ERROR:
                case WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY:
                case WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY:
                case WindowManager.LayoutParams.TYPE_SCREENSHOT:
                case WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY: {
                case WindowManager.LayoutParams.TYPE_SCREENSHOT: {
                    return AccessibilityWindowInfo.TYPE_SYSTEM;
                }

@@ -767,6 +766,10 @@ public class AccessibilityWindowManager {
                    return AccessibilityWindowInfo.TYPE_ACCESSIBILITY_OVERLAY;
                }

                case WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY: {
                    return AccessibilityWindowInfo.TYPE_MAGNIFICATION_OVERLAY;
                }

                default: {
                    return -1;
                }