зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1079876 - Handle unexpected exceptions when reading external extras. r=mfinkle
This commit is contained in:
Родитель
d424f25551
Коммит
2b5571380c
|
@ -11,6 +11,7 @@ import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
public class StringUtils {
|
public class StringUtils {
|
||||||
|
private static final String LOGTAG = "GeckoStringUtils";
|
||||||
|
|
||||||
private static final String FILTER_URL_PREFIX = "filter://";
|
private static final String FILTER_URL_PREFIX = "filter://";
|
||||||
private static final String USER_ENTERED_URL_PREFIX = "user-entered:";
|
private static final String USER_ENTERED_URL_PREFIX = "user-entered:";
|
||||||
|
@ -193,7 +194,10 @@ public class StringUtils {
|
||||||
try {
|
try {
|
||||||
return intent.getStringExtra(name);
|
return intent.getStringExtra(name);
|
||||||
} catch (android.os.BadParcelableException ex) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче