mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 10:45:23 +08:00
Changed: Minor refactor and comment updates of ReportActivity and ReportInfo
This commit is contained in:
@@ -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
|
||||||
|
@@ -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. */
|
||||||
|
Reference in New Issue
Block a user