1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

improve Building name selection

This commit is contained in:
Christophe Beyls 2020-01-21 18:06:51 +01:00
parent 31ea8f9c5d
commit 6b7ce11dee

View file

@ -8,14 +8,16 @@ public enum Building {
public static Building fromRoomName(String roomName) {
if (!TextUtils.isEmpty(roomName)) {
switch (Character.toUpperCase(roomName.charAt(0))) {
case 'K':
return K;
case 'H':
return H;
case 'U':
return U;
case 'J':
return J;
case 'K':
return K;
case 'H':
return H;
case 'U':
return U;
}
if (roomName.regionMatches(true, 0, "AW", 0, 1)) {
if (roomName.regionMatches(true, 0, "AW", 0, 2)) {
return AW;
}
if ("Janson".equalsIgnoreCase(roomName)) {