Changed: Minor refactor and comment updates of ReportActivity and ReportInfo

This commit is contained in:
agnostic-apollo
2021-09-11 13:48:30 +05:00
parent 783a840e3a
commit 0b47b20a9c
2 changed files with 11 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ import io.noties.markwon.recycler.MarkwonAdapter;
import io.noties.markwon.recycler.SimpleEntry; import io.noties.markwon.recycler.SimpleEntry;
/** /**
* An activity to show reports in markdown format as per CommonMark spec. * An activity to show reports in markdown format as per CommonMark spec based on config passed as {@link ReportInfo}.
* Add Following to `AndroidManifest.xml` to use in an app: * Add Following to `AndroidManifest.xml` to use in an app:
* {@code `<activity android:name="com.termux.shared.activities.ReportActivity" android:theme="@style/Theme.AppCompat.TermuxReportActivity" android:documentLaunchMode="intoExisting" />` } * {@code `<activity android:name="com.termux.shared.activities.ReportActivity" android:theme="@style/Theme.AppCompat.TermuxReportActivity" android:documentLaunchMode="intoExisting" />` }
* and * and
@@ -60,10 +60,10 @@ public class ReportActivity extends AppCompatActivity {
public static final int ACTIVITY_TEXT_SIZE_LIMIT_IN_BYTES = 1000 * 1024; // 1MB public static final int ACTIVITY_TEXT_SIZE_LIMIT_IN_BYTES = 1000 * 1024; // 1MB
ReportInfo mReportInfo; private ReportInfo mReportInfo;
String mReportInfoFilePath; private String mReportInfoFilePath;
String mReportActivityMarkdownString; private String mReportActivityMarkdownString;
Bundle mBundle; private Bundle mBundle;
private static final String LOG_TAG = "ReportActivity"; private static final String LOG_TAG = "ReportActivity";
@@ -300,7 +300,7 @@ public class ReportActivity extends AppCompatActivity {
* Start the {@link ReportActivity}. * Start the {@link ReportActivity}.
* *
* @param context The {@link Context} for operations. * @param context The {@link Context} for operations.
* @param reportInfo The {@link ReportInfo} contain info that needs to be displayed. * @param reportInfo The {@link ReportInfo} containing info that needs to be displayed.
*/ */
public static void startReportActivity(@NonNull final Context context, @NonNull ReportInfo reportInfo) { public static void startReportActivity(@NonNull final Context context, @NonNull ReportInfo reportInfo) {
NewInstanceResult result = newInstance(context, reportInfo); NewInstanceResult result = newInstance(context, reportInfo);
@@ -321,7 +321,7 @@ public class ReportActivity extends AppCompatActivity {
* incrementally or at app startup. * incrementally or at app startup.
* *
* @param context The {@link Context} for operations. * @param context The {@link Context} for operations.
* @param reportInfo The {@link ReportInfo} contain info that needs to be displayed. * @param reportInfo The {@link ReportInfo} containing info that needs to be displayed.
* @return Returns {@link NewInstanceResult}. * @return Returns {@link NewInstanceResult}.
*/ */
@NonNull @NonNull

View File

@@ -5,6 +5,9 @@ import com.termux.shared.termux.AndroidUtils;
import java.io.Serializable; import java.io.Serializable;
/**
* An object that stored info for {@link com.termux.shared.activities.ReportActivity}.
*/
public class ReportInfo implements Serializable { public class ReportInfo implements Serializable {
/** The user action that was being processed for which the report was generated. */ /** The user action that was being processed for which the report was generated. */