Added option to disable every log in Linphone

This commit is contained in:
Sylvain Berfini 2013-01-15 12:12:55 +01:00
parent ebba743747
commit 7f47c53e05
5 changed files with 10 additions and 3 deletions

View file

@ -52,6 +52,7 @@
<bool name="hash_images_as_name_before_upload">true</bool>
<bool name="disable_every_log">false</bool>
<bool name="disable_all_security_features_for_markets">false</bool> <!-- Disable TLS/SRTP/ZRTP -->
<bool name="disable_all_patented_codecs_for_markets">false</bool> <!-- Disable MPEG4/H264 -->

View file

@ -46,7 +46,7 @@ public class LinphoneLauncherActivity extends Activity {
super.onCreate(savedInstanceState);
// Used to change for the lifetime of the app the name used to tag the logs
new Log(getResources().getString(R.string.app_name));
new Log(getResources().getString(R.string.app_name), !getResources().getBoolean(R.bool.disable_every_log));
// Hack to avoid to draw twice LinphoneActivity on tablets
if (getResources().getBoolean(R.bool.isTablet)) {

View file

@ -417,7 +417,9 @@ public final class LinphoneManager implements LinphoneCoreListener {
copyAssetsFromPackage();
//traces alway start with traces enable to not missed first initialization
;
LinphoneCoreFactory.instance().setDebugMode(getPrefBoolean(R.string.pref_debug_key, false), getString(R.string.app_name));
boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && getPrefBoolean(R.string.pref_debug_key, false);
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
mLc = LinphoneCoreFactory.instance().createLinphoneCore(
this, mLinphoneConfigFile, mLinphoneInitialConfigFile, null);

View file

@ -246,6 +246,10 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
return true;
}
});
if (getResources().getBoolean(R.bool.disable_every_log)) {
uncheckDisableAndHideCheckbox(R.string.pref_debug_key);
}
}
private void createAddAccountButton() {

@ -1 +1 @@
Subproject commit 77ff807ee7f2c2a88cf12b8bfc49b3e51edc3cec
Subproject commit 8315c4cf1fc8e5e2a73a68ee3dee3a85c89e5967