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

Commit 4e9079c9 authored by Xiaowen Lei's avatar Xiaowen Lei
Browse files

Make WeatherStateIcon.fromInt @JvmStatic to use it in java.

See ag/33314663, where it's used in java.

Also switched from `values()` to `entries` for improved performance.

Flag: com.android.systemui.shared.smartspace_ui_update
Bug: 389957594
Test: manual - observe weather icon in weather tomorrow.
Change-Id: Ie6011fa48af81efd7d1cc1a262c206ab972cdeb5
parent b5c8cda6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ data class WeatherData(
        WINTRY_MIX_RAIN_SNOW(31, "h");

        companion object {
            fun fromInt(value: Int) = values().firstOrNull { it.id == value }
            @JvmStatic fun fromInt(value: Int) = entries.firstOrNull { it.id == value }
        }
    }