Improved collect logs function

This commit is contained in:
Sylvain Berfini 2014-07-01 12:31:30 +02:00
parent e4882b32f5
commit bf8b533687
2 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
if (LinphoneActivity.isInstanciated()) {
if (getResources().getBoolean(R.bool.enable_log_collect)) {
LinphoneUtils.collectLogs(getString(R.string.app_name), getString(R.string.about_bugreport_email));
LinphoneUtils.collectLogs(LinphoneActivity.instance(), getString(R.string.about_bugreport_email));
} else {
LinphoneActivity.instance().exit();
}

View file

@ -341,7 +341,7 @@ public final class LinphoneUtils {
}
}
public static void collectLogs(String logTag, String email) {
public static void collectLogs(Context context, String email) {
BufferedReader br = null;
Process p = null;
StringBuilder sb = new StringBuilder();
@ -362,7 +362,7 @@ public final class LinphoneUtils {
i.putExtra(Intent.EXTRA_SUBJECT, "Linphone Logs");
i.putExtra(Intent.EXTRA_TEXT, sb.toString());
try {
LinphoneActivity.instance().startActivity(Intent.createChooser(i, "Send mail..."));
context.startActivity(Intent.createChooser(i, "Send mail..."));
} catch (android.content.ActivityNotFoundException ex) {
}
} catch (IOException e) {