mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 08:49:31 +00:00
Fix implicit locale string formatting bugs
Depending on the phone language the default format may use Arabic numerals, etc. when not desired. Bug: fixes #7006 Closes #7040
This commit is contained in:
committed by
Moxie Marlinspike
parent
9a876a3672
commit
eb456ef2b0
@@ -6,6 +6,8 @@ import android.net.ConnectivityManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class TelephonyUtil {
|
||||
private static final String TAG = TelephonyUtil.class.getSimpleName();
|
||||
|
||||
@@ -25,7 +27,7 @@ public class TelephonyUtil {
|
||||
return tm.getNetworkOperator();
|
||||
} else if (configMcc != 0 && configMnc != 0) {
|
||||
Log.w(TAG, "Choosing MCC+MNC info from current context's Configuration");
|
||||
return String.format("%03d%d",
|
||||
return String.format(Locale.ROOT, "%03d%d",
|
||||
configMcc,
|
||||
configMnc == Configuration.MNC_ZERO ? 0 : configMnc);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user