Merge "Possible NumberFormatException of parseInt is outside try-catch"
This commit is contained in:
@@ -318,8 +318,8 @@ public class SoundSettings extends PreferenceActivity implements
|
|||||||
public boolean onPreferenceChange(Preference preference, Object objValue) {
|
public boolean onPreferenceChange(Preference preference, Object objValue) {
|
||||||
final String key = preference.getKey();
|
final String key = preference.getKey();
|
||||||
if (KEY_EMERGENCY_TONE.equals(key)) {
|
if (KEY_EMERGENCY_TONE.equals(key)) {
|
||||||
int value = Integer.parseInt((String) objValue);
|
|
||||||
try {
|
try {
|
||||||
|
int value = Integer.parseInt((String) objValue);
|
||||||
Settings.System.putInt(getContentResolver(),
|
Settings.System.putInt(getContentResolver(),
|
||||||
Settings.System.EMERGENCY_TONE, value);
|
Settings.System.EMERGENCY_TONE, value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
Reference in New Issue
Block a user