Fix an issue with the enable video setting
This commit is contained in:
parent
cb3cd05299
commit
a14df7e586
2 changed files with 4 additions and 16 deletions
|
@ -466,11 +466,7 @@ public class LinphonePreferences {
|
|||
}
|
||||
|
||||
public void enableVideo(boolean enable) {
|
||||
if (enable) {
|
||||
getLc().enableVideo(shouldAutomaticallyShareMyVideo(), true);
|
||||
} else {
|
||||
getLc().enableVideo(false, false);
|
||||
}
|
||||
getLc().enableVideo(enable, enable);
|
||||
}
|
||||
|
||||
public boolean shouldInitiateVideoCall() {
|
||||
|
@ -489,16 +485,6 @@ public class LinphonePreferences {
|
|||
getLc().setVideoPolicy(shouldInitiateVideoCall(), accept);
|
||||
}
|
||||
|
||||
public boolean shouldAutomaticallyShareMyVideo() {
|
||||
return getConfig().getBool("video", "capture", true);
|
||||
}
|
||||
|
||||
public void setAutomaticallyShareMyVideo(boolean accept) {
|
||||
getConfig().setBool("video", "capture", accept);
|
||||
if (isVideoEnabled())
|
||||
enableVideo(true);
|
||||
}
|
||||
|
||||
public String getPreferredVideoSize() {
|
||||
//LinphoneCore can only return video size (width and height), not the name
|
||||
return getConfig().getString("video", "size", "qvga");
|
||||
|
|
|
@ -541,7 +541,7 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
((CheckBoxPreference) findPreference(getString(R.string.pref_video_enable_key))).setChecked(mPrefs.isVideoEnabled());
|
||||
((CheckBoxPreference) findPreference(getString(R.string.pref_video_use_front_camera_key))).setChecked(mPrefs.useFrontCam());
|
||||
((CheckBoxPreference) findPreference(getString(R.string.pref_video_initiate_call_with_video_key))).setChecked(mPrefs.shouldInitiateVideoCall());
|
||||
((CheckBoxPreference) findPreference(getString(R.string.pref_video_automatically_share_my_video_key))).setChecked(mPrefs.shouldAutomaticallyShareMyVideo());
|
||||
//((CheckBoxPreference) findPreference(getString(R.string.pref_video_automatically_share_my_video_key))).setChecked(mPrefs.shouldAutomaticallyShareMyVideo());
|
||||
((CheckBoxPreference) findPreference(getString(R.string.pref_video_automatically_accept_video_key))).setChecked(mPrefs.shouldAutomaticallyAcceptVideoRequests());
|
||||
}
|
||||
|
||||
|
@ -573,6 +573,7 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
}
|
||||
});
|
||||
|
||||
/*
|
||||
findPreference(getString(R.string.pref_video_automatically_share_my_video_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
|
@ -581,6 +582,7 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
return true;
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
findPreference(getString(R.string.pref_video_automatically_accept_video_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue