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

Commit 16cc390d authored by Zeyin Wu's avatar Zeyin Wu
Browse files

Remove redundant constants for content change rate limiting.

Bug: 222759137
Test: ran cts test
Change-Id: I559f1a638aca92ee97865e31ad5c557eb3992bad
parent 0cb2a0e8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -52589,13 +52589,11 @@ package android.view.accessibility {
    field public static final int FOCUS_ACCESSIBILITY = 2; // 0x2
    field public static final int FOCUS_INPUT = 1; // 0x1
    field public static final int MAX_NUMBER_OF_PREFETCHED_NODES = 50; // 0x32
    field public static final int MINIMUM_MIN_MILLIS_BETWEEN_CONTENT_CHANGES = 100; // 0x64
    field public static final int MOVEMENT_GRANULARITY_CHARACTER = 1; // 0x1
    field public static final int MOVEMENT_GRANULARITY_LINE = 4; // 0x4
    field public static final int MOVEMENT_GRANULARITY_PAGE = 16; // 0x10
    field public static final int MOVEMENT_GRANULARITY_PARAGRAPH = 8; // 0x8
    field public static final int MOVEMENT_GRANULARITY_WORD = 2; // 0x2
    field public static final int UNDEFINED_MIN_MILLIS_BETWEEN_CONTENT_CHANGES = -1; // 0xffffffff
  }
  public static final class AccessibilityNodeInfo.AccessibilityAction implements android.os.Parcelable {
+0 −1
Original line number Diff line number Diff line
@@ -2955,7 +2955,6 @@ package android.view {
    method public static int getHoverTooltipHideTimeout();
    method public static int getHoverTooltipShowTimeout();
    method public static int getLongPressTooltipHideTimeout();
    method public static long getSendRecurringAccessibilityEventsInterval();
    method public boolean isPreferKeepClearForFocusEnabled();
  }

+0 −1
Original line number Diff line number Diff line
@@ -822,7 +822,6 @@ public class ViewConfiguration {
     *
     * @hide
     */
    @TestApi
    public static long getSendRecurringAccessibilityEventsInterval() {
        return SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS;
    }
+3 −24
Original line number Diff line number Diff line
@@ -127,16 +127,6 @@ public class AccessibilityNodeInfo implements Parcelable {
    /** @hide */
    public static final long UNDEFINED_NODE_ID = makeNodeId(UNDEFINED_ITEM_ID, UNDEFINED_ITEM_ID);

    /**
     * The default value for {@link #getMinMillisBetweenContentChanges};
     */
    public static final int UNDEFINED_MIN_MILLIS_BETWEEN_CONTENT_CHANGES = -1;

    /**
     * The minimum value for {@link #setMinMillisBetweenContentChanges};
     */
    public static final int MINIMUM_MIN_MILLIS_BETWEEN_CONTENT_CHANGES = 100;

    /** @hide */
    public static final long ROOT_NODE_ID = makeNodeId(ROOT_ITEM_ID,
            AccessibilityNodeProvider.HOST_VIEW_ID);
@@ -889,8 +879,7 @@ public class AccessibilityNodeInfo implements Parcelable {
    private long mTraversalBefore = UNDEFINED_NODE_ID;
    private long mTraversalAfter = UNDEFINED_NODE_ID;

    private int mMinMillisBetweenContentChanges =
            UNDEFINED_MIN_MILLIS_BETWEEN_CONTENT_CHANGES;
    private int mMinMillisBetweenContentChanges;

    private int mBooleanProperties;
    private final Rect mBoundsInParent = new Rect();
@@ -1799,12 +1788,6 @@ public class AccessibilityNodeInfo implements Parcelable {
     * content change events in accessibility services.
     *
     * <p>
     * <strong>Note:</strong>
     * This value should not be smaller than {@link #MINIMUM_MIN_MILLIS_BETWEEN_CONTENT_CHANGES},
     * otherwise it would be ignored by accessibility services.
     * </p>
     *
     * <p>
     * Example: An app can set MinMillisBetweenContentChanges as 1 min for a view which sends
     * content change events to accessibility services one event per second.
     * Accessibility service will throttle those content change events and only handle one event
@@ -1816,15 +1799,11 @@ public class AccessibilityNodeInfo implements Parcelable {
     */
    public void setMinMillisBetweenContentChanges(int minMillisBetweenContentChanges) {
        enforceNotSealed();
        mMinMillisBetweenContentChanges = minMillisBetweenContentChanges
                >= MINIMUM_MIN_MILLIS_BETWEEN_CONTENT_CHANGES
                ? minMillisBetweenContentChanges
                : UNDEFINED_MIN_MILLIS_BETWEEN_CONTENT_CHANGES;
        mMinMillisBetweenContentChanges = minMillisBetweenContentChanges;
    }

    /**
     * Gets the minimum time duration between two content change events. This method may return
     * {@link #UNDEFINED_MIN_MILLIS_BETWEEN_CONTENT_CHANGES}
     * Gets the minimum time duration between two content change events.
     */
    public int getMinMillisBetweenContentChanges() {
        return mMinMillisBetweenContentChanges;