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

Commit 512f8bf3 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Change exception to log

This can occur in usage, so avoid crashing SystemUI when it happens.
Relevant tests are already marked `@Ignore` and will be addressed in a
follow-up change.

Bug: 257573640
Test: atest SystemUITests, does not crash on MediaCarouselController
Change-Id: I629157708f31c438613de40796ee891730e36c01
parent 28ba402d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -610,7 +610,8 @@ constructor(
            // are
            // elements in mediaPlayers.
            if (MediaPlayerData.players().size != mediaContent.childCount) {
                throw IllegalStateException(
                Log.e(
                    TAG,
                    "Size of players list and number of views in carousel are out of sync. " +
                        "Players size is ${MediaPlayerData.players().size}. " +
                        "View count is ${mediaContent.childCount}."
@@ -671,7 +672,8 @@ constructor(
            // are
            // elements in mediaPlayers.
            if (MediaPlayerData.players().size != mediaContent.childCount) {
                throw IllegalStateException(
                Log.e(
                    TAG,
                    "Size of players list and number of views in carousel are out of sync. " +
                        "Players size is ${MediaPlayerData.players().size}. " +
                        "View count is ${mediaContent.childCount}."