mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Changed!: Move ReportInfo parameters from constructor to functions
This commit is contained in:
@@ -16,39 +16,61 @@ public class ReportInfo implements Serializable {
|
||||
public final String sender;
|
||||
/** The report title. */
|
||||
public final String reportTitle;
|
||||
/** The timestamp for the report. */
|
||||
public final String reportTimestamp;
|
||||
|
||||
/** The markdown report text prefix. Will not be part of copy and share operations, etc. */
|
||||
public String reportStringPrefix;
|
||||
/** The markdown report text. */
|
||||
public String reportString;
|
||||
/** The markdown report text suffix. Will not be part of copy and share operations, etc. */
|
||||
public String reportStringSuffix;
|
||||
/** If set to {@code true}, then report, app and device info will be added to the report when
|
||||
* markdown is generated.
|
||||
*/
|
||||
public final boolean addReportInfoHeaderToMarkdown;
|
||||
/** The timestamp for the report. */
|
||||
public final String reportTimestamp;
|
||||
|
||||
/** If set to {@code true}, then report header info will be added to the report when markdown is
|
||||
* generated. */
|
||||
public boolean addReportInfoHeaderToMarkdown = false;
|
||||
|
||||
/** The label for the report file to save if user selects menu_item_save_report_to_file. */
|
||||
public final String reportSaveFileLabel;
|
||||
public String reportSaveFileLabel;
|
||||
/** The path for the report file to save if user selects menu_item_save_report_to_file. */
|
||||
public final String reportSaveFilePath;
|
||||
public String reportSaveFilePath;
|
||||
|
||||
public ReportInfo(String userAction, String sender, String reportTitle, String reportStringPrefix,
|
||||
String reportString, String reportStringSuffix, boolean addReportInfoHeaderToMarkdown,
|
||||
String reportSaveFileLabel, String reportSaveFilePath) {
|
||||
public ReportInfo(String userAction, String sender, String reportTitle) {
|
||||
this.userAction = userAction;
|
||||
this.sender = sender;
|
||||
this.reportTitle = reportTitle;
|
||||
this.reportStringPrefix = reportStringPrefix;
|
||||
this.reportString = reportString;
|
||||
this.reportStringSuffix = reportStringSuffix;
|
||||
this.addReportInfoHeaderToMarkdown = addReportInfoHeaderToMarkdown;
|
||||
this.reportSaveFileLabel = reportSaveFileLabel;
|
||||
this.reportSaveFilePath = reportSaveFilePath;
|
||||
this.reportTimestamp = AndroidUtils.getCurrentMilliSecondUTCTimeStamp();
|
||||
}
|
||||
|
||||
public void setReportStringPrefix(String reportStringPrefix) {
|
||||
this.reportStringPrefix = reportStringPrefix;
|
||||
}
|
||||
|
||||
public void setReportString(String reportString) {
|
||||
this.reportString = reportString;
|
||||
}
|
||||
|
||||
public void setReportStringSuffix(String reportStringSuffix) {
|
||||
this.reportStringSuffix = reportStringSuffix;
|
||||
}
|
||||
|
||||
public void setAddReportInfoHeaderToMarkdown(boolean addReportInfoHeaderToMarkdown) {
|
||||
this.addReportInfoHeaderToMarkdown = addReportInfoHeaderToMarkdown;
|
||||
}
|
||||
|
||||
public void setReportSaveFileLabelAndPath(String reportSaveFileLabel, String reportSaveFilePath) {
|
||||
setReportSaveFileLabel(reportSaveFileLabel);
|
||||
setReportSaveFilePath(reportSaveFilePath);
|
||||
}
|
||||
|
||||
public void setReportSaveFileLabel(String reportSaveFileLabel) {
|
||||
this.reportSaveFileLabel = reportSaveFileLabel;
|
||||
}
|
||||
|
||||
public void setReportSaveFilePath(String reportSaveFilePath) {
|
||||
this.reportSaveFilePath = reportSaveFilePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a markdown {@link String} for {@link ReportInfo}.
|
||||
*
|
||||
|
Reference in New Issue
Block a user