Merge "Remove redundant constants for content change rate limiting."
This commit is contained in:
@@ -52626,13 +52626,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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -822,7 +822,6 @@ public class ViewConfiguration {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public static long getSendRecurringAccessibilityEventsInterval() {
|
||||
return SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
@@ -891,8 +881,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();
|
||||
@@ -1801,12 +1790,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
|
||||
@@ -1818,15 +1801,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;
|
||||
|
||||
Reference in New Issue
Block a user