Bug 1202154 - Switchboard does not catch Locale related exceptions r=nalexander

This commit is contained in:
Mark Finkle 2015-09-08 23:49:07 -04:00
parent 460650f247
commit 94c46fd78e

View File

@ -23,6 +23,7 @@ import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.UUID;
import java.util.zip.CRC32;
@ -189,8 +190,18 @@ public class SwitchBoard {
String device = Build.DEVICE;
String manufacturer = Build.MANUFACTURER;
String lang = Locale.getDefault().getISO3Language();
String country = Locale.getDefault().getISO3Country();
String lang = "unknown";
try {
lang = Locale.getDefault().getISO3Language();
} catch (MissingResourceException e) {
e.printStackTrace();
}
String country = "unknown";
try {
country = Locale.getDefault().getISO3Country();
} catch (MissingResourceException e) {
e.printStackTrace();
}
String packageName = c.getPackageName();
String versionName = "none";
try {