A bit of cleanup
This commit is contained in:
parent
51e063b0a7
commit
2ce47e5064
4 changed files with 2 additions and 12 deletions
|
@ -124,9 +124,6 @@
|
|||
|
||||
|
||||
<!-- LP Config preferences names -->
|
||||
<string name="lpconfig_net_downloadbw_key">download_bw</string>
|
||||
<string name="lpconfig_net_uloadbw_key">upload_bw</string>
|
||||
|
||||
<string-array name="lpconfig_net_keys">
|
||||
</string-array>
|
||||
|
||||
|
|
|
@ -83,18 +83,18 @@ public class LinphonePreferences {
|
|||
}
|
||||
|
||||
public void load() {
|
||||
Log.w("Preferences loading...");
|
||||
loadSection("sip", R.array.lpconfig_sip_keys);
|
||||
}
|
||||
|
||||
private void loadSection(String section, int resourcesID) {
|
||||
Log.w("Preferences loading for section " + section);
|
||||
for (String key : LinphoneService.instance().getResources().getStringArray(resourcesID)) {
|
||||
Log.w("Looking for value for key " + key);
|
||||
String value = config.getString("sip", key, "");
|
||||
if (value != null && value.length() > 0) {
|
||||
Log.w("Value read for key " + key + " : " + value);
|
||||
dict.put(key, value);
|
||||
} else {
|
||||
Log.w("Value not found for key " + key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,10 +139,6 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
|||
// In case restart after a crash. Main in LinphoneActivity
|
||||
LinphonePreferenceManager.getInstance(this);
|
||||
|
||||
// Set default preferences
|
||||
PreferenceManager.setDefaultValues(this, R.xml.preferences, true);
|
||||
|
||||
|
||||
mNotificationTitle = getString(R.string.app_name);
|
||||
|
||||
// Dump some debugging information to the logs
|
||||
|
|
|
@ -48,7 +48,6 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
// FIXME: first display doesn't match the linphonerc values
|
||||
|
||||
if (pref.hasKey()) {
|
||||
Log.w("Preference key = " + pref.getKey());
|
||||
pref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
|
@ -59,7 +58,6 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
});
|
||||
} else {
|
||||
if (pref instanceof PreferenceCategory) {
|
||||
Log.w("Preference is a category (" + pref.getTitle() + "), let's recurse!");
|
||||
PreferenceCategory cat = (PreferenceCategory) pref;
|
||||
int count = cat.getPreferenceCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
@ -67,7 +65,6 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
setListenerForPreference(p);
|
||||
}
|
||||
} else if (pref instanceof PreferenceScreen) {
|
||||
Log.w("Preference is a screen (" + pref.getTitle() + "), let's recurse!");
|
||||
PreferenceScreen screen = (PreferenceScreen) pref;
|
||||
int count = screen.getPreferenceCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
|
Loading…
Reference in a new issue