Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,41 @@ fun Int.apiToColor(): Int =

fun Int.apiToVersion() =
when (this) {
0 -> "Error"
1, 2 -> "Base"
3 -> "Cupcake"
4 -> "Donut"
5, 6, 7 -> "Eclair"
5 -> "Eclair"
6 -> "Eclair MR1"
7 -> "Eclair MR2"
8 -> "Froyo"
9, 10 -> "Gingerbread"
11, 12, 13 -> "Honeycomb"
14, 15 -> "Ice Cream Sandwich"
16, 17, 18 -> "Jelly Bean"
19, 20 -> "KitKat"
21, 22 -> "Lollipop"
9 -> "Gingerbread"
10 -> "Gingerbread MR1"
11 -> "Honeycomb"
12 -> "Honeycomb MR1"
13 -> "Honeycomb MR2"
14 -> "Ice Cream Sandwich"
15 -> "Ice Cream Sandwich MR1"
16 -> "Jelly Bean"
17 -> "Jelly Bean MR1"
18 -> "Jelly Bean MR2"
19 -> "KitKat"
20 -> "KitKat MR1"
21 -> "Lollipop"
22 -> "Lollipop MR1"
23 -> "Marshmallow"
24, 25 -> "Nougat"
26, 27 -> "Oreo"
24 -> "Nougat"
25 -> "Nougat MR1"
26 -> "Oreo"
27 -> "Oreo MR1"
28 -> "Pie"
29, 30, 31 -> "Android ${this - 19}"
32 -> "Android 12L"
29 -> "Quince Tart"
30 -> "Red Velvet Cake"
31 -> "Snow Cone"
32 -> "Snow Cone V2"
33 -> "Tiramisu"
34 -> "Upside Down Cake"
35 -> "Vanilla Ice Cream"
36 -> "Baklava"
else -> "Android ${this - 20}"
}