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

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

Merge "Fix fromBundle() for TimeDifference with zeroElapsedRealtime" into main

parents 64df32e5 a1e06a20
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12211,7 +12211,7 @@ public class Notification implements Parcelable
                        ? bundle.getLong(KEY_ZERO_ELAPSED_REALTIME) : null;
                Duration pausedDuration = bundle.containsKey(KEY_PAUSED_DURATION)
                        ? Duration.ofMillis(bundle.getLong(KEY_PAUSED_DURATION)) : null;
                if (zeroTime != null || pausedDuration != null) {
                if (zeroTime != null || zeroElapsedRealtime != null || pausedDuration != null) {
                    return new TimeDifference(zeroTime, zeroElapsedRealtime, pausedDuration,
                            bundle.getBoolean(KEY_COUNT_DOWN),
                            bundle.getInt(KEY_FORMAT, FORMAT_AUTOMATIC));
+4 −0
Original line number Diff line number Diff line
@@ -153,6 +153,10 @@ public class NotificationMetricStyleTest {
                        TimeDifference.forTimer(Instant.ofEpochMilli(1),
                                TimeDifference.FORMAT_ADAPTIVE),
                        "Time:"))
                .addMetric(new Metric(
                        TimeDifference.forTimer(123456L,
                                TimeDifference.FORMAT_ADAPTIVE),
                        "Time:"))
                .addMetric(new Metric(
                        TimeDifference.forPausedStopwatch(Duration.ofHours(4),
                                TimeDifference.FORMAT_CHRONOMETER),