diff --git a/app/src/main/java/org/autojs/autojs/ui/error/ErrorReportActivity.java b/app/src/main/java/org/autojs/autojs/ui/error/ErrorReportActivity.java index 3058c5be8..329e148db 100644 --- a/app/src/main/java/org/autojs/autojs/ui/error/ErrorReportActivity.java +++ b/app/src/main/java/org/autojs/autojs/ui/error/ErrorReportActivity.java @@ -2,6 +2,7 @@ import android.content.ClipData; import android.content.ClipboardManager; +import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; @@ -14,6 +15,7 @@ import androidx.appcompat.widget.Toolbar; import org.autojs.autojs.ui.BaseActivity; +import org.autojs.autojs.ui.main.MainActivity; import org.autojs.autoxjs.BuildConfig; import org.autojs.autoxjs.R; @@ -96,8 +98,10 @@ private void setUpUI() { }); restartButton.setOnClickListener(view -> { -// TODO 等待处理 - Toast.makeText(ErrorReportActivity.this, "功能未实现", Toast.LENGTH_SHORT).show(); + Intent intent = new Intent(this, MainActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(intent); + finish(); // 关闭当前 Activity }); exitButton.setOnClickListener(view -> exit());