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

Commit 6d9a341a authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

[RONs] Fix ProgressStyle totalLength calculation

Fixes: 376487216
Test: Post ProgressStyle Notifs and see the notification.
Segments: Orange 15, Green 30, Yellow 10
Points: Red 3, Blue 70
Progress: 27%
Flag: android.app.api_rich_ongoing
Change-Id: If37189c6645da5c47af5d9a59a44ecfff5a65729
parent b81e388d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -11831,7 +11831,7 @@ public class Notification implements Parcelable
                    if (length <= 0) continue;
                    try {
                        totalLength += Math.addExact(totalLength, length);
                        totalLength = Math.addExact(totalLength, length);
                        segments.add(sanitizeSegment(segment, backgroundColor,
                                defaultProgressColor));
                    } catch (ArithmeticException e) {
@@ -11853,7 +11853,6 @@ public class Notification implements Parcelable
                for (Point point : mProgressPoints) {
                    final int position = point.getPosition();
                    if (position < 0 || position > totalLength) continue;
                    points.add(sanitizePoint(point, backgroundColor, defaultProgressColor));
                }