mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 18:11:03 +01:00
Made Bugsbag sessions opt-in
This commit is contained in:
@@ -108,6 +108,7 @@ public class ApplicationEx extends Application {
|
||||
else
|
||||
config.setReleaseStage(BuildConfig.PLAY_STORE_RELEASE ? "stable/play" : "stable");
|
||||
|
||||
config.setAutoCaptureSessions(false);
|
||||
config.setIgnoreClasses(new String[]{"javax.mail.MessageRemovedException"});
|
||||
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
@@ -115,11 +116,13 @@ public class ApplicationEx extends Application {
|
||||
config.beforeSend(new BeforeSend() {
|
||||
@Override
|
||||
public boolean run(@NonNull Report report) {
|
||||
return prefs.getBoolean("crash_reports", false); // opt-out
|
||||
return prefs.getBoolean("crash_reports", false); // opt-in
|
||||
}
|
||||
});
|
||||
|
||||
Bugsnag.init(this, config);
|
||||
if (prefs.getBoolean("crash_reports", false))
|
||||
Bugsnag.startSession();
|
||||
|
||||
upgrade(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user