mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 15:19:53 +01:00
Kill crash reporter process only with some delay
This commit is contained in:
@@ -2,6 +2,8 @@ package org.briarproject.briar.android.reporting;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@@ -104,8 +106,10 @@ public class CrashReportActivity extends BaseActivity
|
|||||||
startActivity(i);
|
startActivity(i);
|
||||||
// crash reports run in their own process that we should kill now
|
// crash reports run in their own process that we should kill now
|
||||||
// otherwise it keeps running and e.g. doesn't pick up theme changes
|
// otherwise it keeps running and e.g. doesn't pick up theme changes
|
||||||
Process.killProcess(Process.myPid());
|
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
System.exit(10);
|
Process.killProcess(Process.myPid());
|
||||||
|
// kill the process with some delay to keep the Toast visible
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user