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

Commit 25ca0e1b authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Workaround for missing cities translations.

Change-Id: Ic259e5894f08848b26a409e12272e1932757da83
parent 579433a0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -450,11 +450,14 @@ public class Utils {
        String[] cities = r.getStringArray(R.array.cities_names);
        String[] timezones = r.getStringArray(R.array.cities_tz);
        String[] ids = r.getStringArray(R.array.cities_id);
        int minLength = cities.length;
        if (cities.length != timezones.length || ids.length != cities.length) {
            Log.wtf("City lists sizes are not the same, cannot use the data");
            return null;
            // StopShip: Make sure to remove this after we get transations for K
            minLength = Math.min(cities.length, Math.min(timezones.length, ids.length));
            Log.e("City lists sizes are not the same, trancating");
            // return null;
        }
        CityObj[] tempList = new CityObj[cities.length];
        CityObj[] tempList = new CityObj[minLength];
        for (int i = 0; i < cities.length; i++) {
            tempList[i] = new CityObj(cities[i], timezones[i], ids[i]);
        }