Bug 1079876 - Handle unexpected exceptions when reading external extras. r=mfinkle

This commit is contained in:
Richard Newman 2014-10-09 08:23:55 -07:00
Родитель d424f25551
Коммит 2b5571380c
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -11,6 +11,7 @@ import android.text.TextUtils;
import android.util.Log;
public class StringUtils {
private static final String LOGTAG = "GeckoStringUtils";
private static final String FILTER_URL_PREFIX = "filter://";
private static final String USER_ENTERED_URL_PREFIX = "user-entered:";
@ -193,7 +194,10 @@ public class StringUtils {
try {
return intent.getStringExtra(name);
} catch (android.os.BadParcelableException ex) {
Log.w("GeckoUtils", "Couldn't get string extra: malformed intent.");
Log.w(LOGTAG, "Couldn't get string extra: malformed intent.");
return null;
} catch (RuntimeException re) {
Log.w(LOGTAG, "Couldn't get string extra.", re);
return null;
}
}