Commit 7d9380d3 authored by Torsten Grote's avatar Torsten Grote

[android] go to homescreen after pressing back in crash reporter

Fixes #1390
parent 3c8c0e57
package org.briarproject.briar.android.reporting;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.annotation.Nullable;
......@@ -13,10 +14,14 @@ import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
import org.briarproject.briar.R;
import org.briarproject.briar.android.Localizer;
import org.briarproject.briar.android.logout.HideUiActivity;
import org.briarproject.briar.android.util.UserFeedback;
import java.io.File;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static java.util.Objects.requireNonNull;
......@@ -146,6 +151,11 @@ public class DevReportActivity extends BaseCrashReportDialog {
void closeReport() {
cancelReports();
Intent i = new Intent(this, HideUiActivity.class);
i.addFlags(FLAG_ACTIVITY_NEW_TASK
| FLAG_ACTIVITY_NO_ANIMATION
| FLAG_ACTIVITY_CLEAR_TASK);
startActivity(i);
finish();
}
......
......@@ -277,7 +277,7 @@ public class ReportFormFragment extends Fragment
}
getDevReportActivity().sendCrashReport(comment, email);
}
if (getActivity() != null) getActivity().finish();
if (getActivity() != null) getDevReportActivity().closeReport();
}
}.execute();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment