EspressoCategoryUnitTest needs to set metricUnits.

This commit is contained in:
Dennis Guse
2021-06-16 07:32:04 +02:00
parent 71c385a1a9
commit e655762c72
4 changed files with 60 additions and 3 deletions
@@ -30,8 +30,7 @@ public class Startup extends Application {
// Set default values of preferences on first start.
SharedPreferences sharedPreferences = PreferencesUtils.resetPreferences(this, false);
if (PreferencesUtils.getString(sharedPreferences, this, R.string.stats_units_key, "").equals("")) {
String statsUnits = getString(Locale.US.equals(Locale.getDefault()) ? R.string.stats_units_imperial : R.string.stats_units_metric);
PreferencesUtils.setString(sharedPreferences, this, R.string.stats_units_key, statsUnits);
PreferencesUtils.setMetricUnits(sharedPreferences, this, !Locale.US.equals(Locale.getDefault()));
}
ActivityUtils.applyNightMode(sharedPreferences, this);