Is there any difference between String returned by:
Locale.getDefault().toString()
and
context.getResources().getConfiguration().locale.toString()
Asking because I suspect this is causing a bug in app, something which worked before using Locale.getDefault().toString() is not working anymore with context.getResources().getConfiguration().locale.toString(), on some US devices. But not sure if this is the reason.
Thanks!
Locale.getDefault().toString()andcontext.getResources().getConfiguration().locale.toString()should return the same value.The only major difference between the two is that the
Locale.getDefault()can be directly overridden byLocale.setDefault(locale). (Which will also affectcontext.getResources().getConfiguration().locale.toString())