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

Commit aa0a4ab8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove FORMAT_AUTOMATIC as option from MetricStyle TimeDifference" into main

parents a18d902e 868c2b4c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -7054,8 +7054,7 @@ package android.app {
    method public boolean isStopwatch();
    method public boolean isTimer();
    field public static final int FORMAT_ADAPTIVE = 1; // 0x1
    field public static final int FORMAT_AUTOMATIC = 0; // 0x0
    field public static final int FORMAT_CHRONOMETER = 3; // 0x3
    field public static final int FORMAT_CHRONOMETER = 2; // 0x2
  }
  @FlaggedApi("android.app.api_metric_style") public static final class Notification.MetricStyle extends android.app.Notification.Style {
+3 −7
Original line number Diff line number Diff line
@@ -12096,18 +12096,14 @@ public class Notification implements Parcelable
         */
        public static final class TimeDifference extends MetricValue {
            /** Formatting option: automatically chosen by the system. */
            public static final int FORMAT_AUTOMATIC = 0;
            /** Formatting option: adaptive (e.g. 1h 5m; 15m; 1m; now). */
            public static final int FORMAT_ADAPTIVE = 1;
            /** Formatting option: chronometer-style, (e.g. two hours = "2:00:00"). */
            public static final int FORMAT_CHRONOMETER = 3;
            public static final int FORMAT_CHRONOMETER = 2;
            /** @hide */
            @IntDef(prefix = { "FORMAT_" }, value = {
                    FORMAT_AUTOMATIC,
                    FORMAT_ADAPTIVE,
                    FORMAT_CHRONOMETER
            })
@@ -12208,7 +12204,7 @@ public class Notification implements Parcelable
                        "Exactly one of zeroTime, zeroElapsedRealtime, or pausedDuration must be "
                                + "present; received %s,%s,%s",
                        zeroTime, zeroElapsedRealtime, pausedDuration);
                checkArgument(format >= FORMAT_AUTOMATIC && format <= FORMAT_CHRONOMETER,
                checkArgument(format >= FORMAT_ADAPTIVE && format <= FORMAT_CHRONOMETER,
                        "Invalid format: %s", format);
                mZeroTime = zeroTime;
                mZeroElapsedRealtime = zeroElapsedRealtime;
@@ -12228,7 +12224,7 @@ public class Notification implements Parcelable
                if (zeroTime != null || zeroElapsedRealtime != null || pausedDuration != null) {
                    return new TimeDifference(zeroTime, zeroElapsedRealtime, pausedDuration,
                            bundle.getBoolean(KEY_COUNT_DOWN),
                            bundle.getInt(KEY_FORMAT, FORMAT_AUTOMATIC));
                            bundle.getInt(KEY_FORMAT));
                } else {
                    return null;
                }