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

Commit caea9989 authored by Edgar Wang's avatar Edgar Wang
Browse files

Avoid crash in getRoundCornerType if there are no mapping

Bug: 406895226
Test: manual + prebuilt
Flag: EXEMPT bug fix
Change-Id: I1ad1e391c16bdcfabe2b7d64904bb8c71b4a1957
parent bf61f165
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -223,6 +223,10 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) :
        isSelected: Boolean,
        isHighlighted: Boolean,
    ): Int {
        if (position !in mRoundCornerMappingList.indices)  {
            return 0
        }

        val cornerType = mRoundCornerMappingList[position]

        if ((cornerType and ROUND_CORNER_CENTER) == 0) {