Do not use network country when there is not SIM

Stephen Paul Weber created

If network is not preferred, then probably we should not use it at all.
Otherwise simless devices will change locale when they roam.

Change summary

src/main/java/eu/siacs/conversations/utils/LocationProvider.java | 3 -
1 file changed, 1 insertion(+), 2 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/utils/LocationProvider.java 🔗

@@ -39,9 +39,8 @@ public class LocationProvider {
 
             if (simCountry != null && simCountry.length() == 2) { // SIM country code is available
                 return simCountry.toUpperCase(Locale.US);
-            } else if (networkCountry != null && networkCountry.length() == 2) { // network country code is available
-                return networkCountry.toUpperCase(Locale.US);
             }
+
             return getUserCountryFallback();
         } catch (final Exception e) {
             return getUserCountryFallback();