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

Commit 2ff66df3 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

[ProgressStyle] Log.w for maximum segment limit

ProgressStyle is able to render up to 10 segments. This CL puts warning to inform developer with max segment limit.

Bug: 411306168
Test: Presubmit
Flag: android.app.api_rich_ongoing
Change-Id: I7847197a51e86c3dd0055bad6a2d3add1aa5a101
parent 2889a983
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -11600,6 +11600,11 @@ public class Notification implements Parcelable
            }
            if (segment.getLength() > 0) {
                mProgressSegments.add(segment);
                if (mProgressSegments.size() > MAX_PROGRESS_SEGMENT_LIMIT) {
                  Log.w(TAG, "Progress segments limit ("
                      + MAX_PROGRESS_SEGMENT_LIMIT +") is reached. "
                      + "All segments will be merged into one segment.");
                }
            } else {
                Log.w(TAG, "Dropped the segment. The length is not a positive integer.");
            }