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

Commit 65874ee5 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

[ProgressStyle] Use IntRange annotation for Segment and Point

Bug: 393028282
Flag: android.app.api_rich_ongoing
Test: Presubmit
Change-Id: I058084ad743c0f22b69b313480e3c7f58cab6956
parent 088ae231
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7002,7 +7002,7 @@ package android.app {
  }
  public static final class Notification.ProgressStyle.Point {
    ctor public Notification.ProgressStyle.Point(int);
    ctor public Notification.ProgressStyle.Point(@IntRange(from=1) int);
    method @ColorInt public int getColor();
    method public int getId();
    method public int getPosition();
@@ -7011,7 +7011,7 @@ package android.app {
  }
  public static final class Notification.ProgressStyle.Segment {
    ctor public Notification.ProgressStyle.Segment(int);
    ctor public Notification.ProgressStyle.Segment(@IntRange(from=1) int);
    method @ColorInt public int getColor();
    method public int getId();
    method public int getLength();
+3 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.annotation.DrawableRes;
import android.annotation.FlaggedApi;
import android.annotation.IdRes;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
@@ -12265,7 +12266,7 @@ public class Notification implements Parcelable
             * @param length
             * See {@link #getLength}
             */
            public Segment(int length) {
            public Segment(@IntRange(from = 1) int length) {
                mLength = length;
            }
@@ -12351,7 +12352,7 @@ public class Notification implements Parcelable
             * @param position
             * See {@link #getPosition}
             */
            public Point(int position) {
            public Point(@IntRange(from = 1) int position) {
                mPosition = position;
            }