Hide PN settings if disabled in xml
This commit is contained in:
parent
3ca83c62ab
commit
4164f05740
2 changed files with 11 additions and 5 deletions
|
@ -611,12 +611,14 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
proxycon.setExpires(Integer.parseInt(getPrefString(R.string.pref_expire_key, getString(R.string.pref_expire_default))));
|
proxycon.setExpires(Integer.parseInt(getPrefString(R.string.pref_expire_key, getString(R.string.pref_expire_default))));
|
||||||
|
|
||||||
// Add parameters for push notifications
|
// Add parameters for push notifications
|
||||||
|
if (mR.getBoolean(R.bool.enable_push_id)) {
|
||||||
String regId = getPrefString(R.string.push_reg_id_key, null);
|
String regId = getPrefString(R.string.push_reg_id_key, null);
|
||||||
String appId = getString(R.string.push_sender_id);
|
String appId = getString(R.string.push_sender_id);
|
||||||
if (regId != null && getPrefBoolean(R.string.pref_push_notification_key, mR.getBoolean(R.bool.pref_push_notification_default))) {
|
if (regId != null && getPrefBoolean(R.string.pref_push_notification_key, mR.getBoolean(R.bool.pref_push_notification_default))) {
|
||||||
String contactInfos = "app-id=" + appId + ";pn-type=google;pn-tok=" + regId + ";pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf;";
|
String contactInfos = "app-id=" + appId + ";pn-type=google;pn-tok=" + regId + ";pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf;";
|
||||||
proxycon.setContactParameters(contactInfos);
|
proxycon.setContactParameters(contactInfos);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
mLc.addProxyConfig(proxycon);
|
mLc.addProxyConfig(proxycon);
|
||||||
|
|
||||||
//outbound proxy
|
//outbound proxy
|
||||||
|
|
|
@ -112,6 +112,10 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
|
||||||
imageSharingServer.setLayoutResource(R.layout.hidden);
|
imageSharingServer.setLayoutResource(R.layout.hidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!getResources().getBoolean(R.bool.enable_push_id)) {
|
||||||
|
findPreference(getString(R.string.pref_push_notification_key)).setLayoutResource(R.layout.hidden);
|
||||||
|
}
|
||||||
|
|
||||||
initializeTransportPreferences();
|
initializeTransportPreferences();
|
||||||
|
|
||||||
ecCalibratePref = findPreference(pref_echo_canceller_calibration_key);
|
ecCalibratePref = findPreference(pref_echo_canceller_calibration_key);
|
||||||
|
|
Loading…
Reference in a new issue