Added log upload server url setting
This commit is contained in:
parent
1b4dd6240b
commit
bfbd5c5eba
4 changed files with 34 additions and 1 deletions
|
@ -47,7 +47,7 @@ public class AdvancedSettingsFragment extends SettingsFragment {
|
|||
mBackgroundMode,
|
||||
mStartAtBoot,
|
||||
mDarkMode;
|
||||
private TextSetting mRemoteProvisioningUrl, mDisplayName, mUsername, mDeviceName;
|
||||
private TextSetting mRemoteProvisioningUrl, mDisplayName, mUsername, mDeviceName, mLogUploadUrl;
|
||||
private BasicSetting mAndroidAppSettings;
|
||||
|
||||
@Nullable
|
||||
|
@ -78,6 +78,9 @@ public class AdvancedSettingsFragment extends SettingsFragment {
|
|||
mJavaLogger.setVisibility(
|
||||
Build.MANUFACTURER.equals("BlackBerry") ? View.VISIBLE : View.GONE);
|
||||
|
||||
mLogUploadUrl = mRootView.findViewById(R.id.pref_log_collection_upload_server_url);
|
||||
mLogUploadUrl.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
|
||||
|
||||
mFriendListSubscribe = mRootView.findViewById(R.id.pref_friendlist_subscribe);
|
||||
|
||||
mBackgroundMode = mRootView.findViewById(R.id.pref_background_mode);
|
||||
|
@ -116,6 +119,14 @@ public class AdvancedSettingsFragment extends SettingsFragment {
|
|||
}
|
||||
});
|
||||
|
||||
mLogUploadUrl.setListener(
|
||||
new SettingListenerBase() {
|
||||
@Override
|
||||
public void onTextValueChanged(String newValue) {
|
||||
mPrefs.setLogCollectionUploadServerUrl(newValue);
|
||||
}
|
||||
});
|
||||
|
||||
mFriendListSubscribe.setListener(
|
||||
new SettingListenerBase() {
|
||||
@Override
|
||||
|
@ -206,6 +217,8 @@ public class AdvancedSettingsFragment extends SettingsFragment {
|
|||
|
||||
mJavaLogger.setChecked(mPrefs.useJavaLogger());
|
||||
|
||||
mLogUploadUrl.setValue(mPrefs.getLogCollectionUploadServerUrl());
|
||||
|
||||
mFriendListSubscribe.setChecked(mPrefs.isFriendlistsubscriptionEnabled());
|
||||
|
||||
mBackgroundMode.setChecked(mPrefs.getServiceNotificationVisibility());
|
||||
|
|
|
@ -708,6 +708,16 @@ public class LinphonePreferences {
|
|||
getLc().setFileTransferServer(url);
|
||||
}
|
||||
|
||||
public String getLogCollectionUploadServerUrl() {
|
||||
if (getLc() == null) return null;
|
||||
return getLc().getLogCollectionUploadServerUrl();
|
||||
}
|
||||
|
||||
public void setLogCollectionUploadServerUrl(String url) {
|
||||
if (getLc() == null) return;
|
||||
getLc().setLogCollectionUploadServerUrl(url);
|
||||
}
|
||||
|
||||
public String getRemoteProvisioningUrl() {
|
||||
if (getLc() == null) return null;
|
||||
return getLc().getProvisioningUri();
|
||||
|
|
|
@ -63,6 +63,14 @@
|
|||
linphone:hint="@string/pref_remote_provisioning_title"
|
||||
linphone:title="@string/pref_remote_provisioning_title" />
|
||||
|
||||
<org.linphone.settings.widget.TextSetting
|
||||
android:id="@+id/pref_log_collection_upload_server_url"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
linphone:hint="@string/pref_log_collection_sharing_server_title"
|
||||
linphone:subtitle="@string/pref_log_collection_sharing_server_desc"
|
||||
linphone:title="@string/pref_log_collection_sharing_server_title" />
|
||||
|
||||
<org.linphone.settings.widget.BasicSetting
|
||||
android:id="@+id/pref_android_app_settings"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -502,6 +502,8 @@
|
|||
<string name="pref_primary_account_title">Primary account</string>
|
||||
<string name="pref_display_name_title">Display name</string>
|
||||
<string name="pref_user_name_title">Username</string>
|
||||
<string name="pref_log_collection_sharing_server_title">Logs upload server</string>
|
||||
<string name="pref_log_collection_sharing_server_desc">Do not edit unless you know what you are doing!</string>
|
||||
|
||||
<!-- Audio hack settings -->
|
||||
<string name="pref_audio_hacks_title">Audio hacks</string>
|
||||
|
|
Loading…
Reference in a new issue