Avoid crash when resuming the application
This commit is contained in:
parent
c66d9328fd
commit
25d4b0c670
1 changed files with 105 additions and 103 deletions
|
@ -218,10 +218,12 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
}
|
||||
|
||||
private void setPreferenceDefaultValueAndSummary(int pref, String value) {
|
||||
if(value != null) {
|
||||
EditTextPreference etPref = (EditTextPreference) findPreference(getString(pref));
|
||||
etPref.setText(value);
|
||||
etPref.setSummary(value);
|
||||
}
|
||||
}
|
||||
|
||||
private void initTunnelSettings() {
|
||||
setPreferenceDefaultValueAndSummary(R.string.pref_tunnel_host_key, mPrefs.getTunnelHost());
|
||||
|
|
Loading…
Reference in a new issue