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

Commit 1e964865 authored by Shailen Tuli's avatar Shailen Tuli
Browse files

Created indeterminate RangeInfo type

Test: CTS test added

Bug: 376108874

Flag: android.view.accessibility.indeterminate_range_info

Change-Id: I21f74f99d8ba14b521fbd5f9bb785bbac075d668
parent 4a3ff7a9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -55679,6 +55679,7 @@ package android.view.accessibility {
    method public int getType();
    method @Deprecated public static android.view.accessibility.AccessibilityNodeInfo.RangeInfo obtain(int, float, float, float);
    field public static final int RANGE_TYPE_FLOAT = 1; // 0x1
    field @FlaggedApi("android.view.accessibility.indeterminate_range_info") public static final int RANGE_TYPE_INDETERMINATE = 3; // 0x3
    field public static final int RANGE_TYPE_INT = 0; // 0x0
    field public static final int RANGE_TYPE_PERCENT = 2; // 0x2
  }
+13 −0
Original line number Diff line number Diff line
@@ -6482,6 +6482,19 @@ public class AccessibilityNodeInfo implements Parcelable {
        /** Range type: percent with values from zero to one hundred. */
        public static final int RANGE_TYPE_PERCENT = 2;

        /**
         * Range type: indeterminate.
         *
         * A {@link RangeInfo} type used to represent a node which may typically expose range
         * information but is presently in an indeterminate state, such as a {@link
         * android.widget.ProgressBar} representing a loading operation of unknown duration.
         * When using this type, the {@code min}, {@code max}, and {@code current} values used to
         * construct an instance may be ignored. It is recommended to use {@code Float.NaN} for
         * these values.
         */
        @FlaggedApi(Flags.FLAG_INDETERMINATE_RANGE_INFO)
        public static final int RANGE_TYPE_INDETERMINATE = 3;

        private int mType;
        private float mMin;
        private float mMax;
+7 −0
Original line number Diff line number Diff line
@@ -258,3 +258,10 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
 }

 flag {
    name: "indeterminate_range_info"
    namespace: "accessibility"
    description: "Creates a way to create an INDETERMINATE RangeInfo"
    bug: "376108874"
 }