|
8 | 8 | import android.database.sqlite.SQLiteDatabase;
|
9 | 9 | import android.os.Build;
|
10 | 10 | import android.os.Process;
|
11 |
| -import androidx.annotation.NonNull; |
12 | 11 | import android.util.Log;
|
13 | 12 |
|
14 | 13 | import com.facebook.drawee.backends.pipeline.Fresco;
|
|
18 | 17 | import com.squareup.leakcanary.RefWatcher;
|
19 | 18 |
|
20 | 19 | import org.acra.ACRA;
|
21 |
| -import org.acra.ReportingInteractionMode; |
22 |
| -import org.acra.annotation.ReportsCrashes; |
| 20 | +import org.acra.annotation.AcraCore; |
| 21 | +import org.acra.annotation.AcraDialog; |
| 22 | +import org.acra.annotation.AcraMailSender; |
| 23 | +import org.acra.data.StringFormat; |
23 | 24 |
|
24 | 25 | import java.io.File;
|
25 | 26 |
|
26 | 27 | import javax.inject.Inject;
|
27 | 28 | import javax.inject.Named;
|
28 | 29 |
|
| 30 | +import androidx.annotation.NonNull; |
29 | 31 | import fr.free.nrw.commons.auth.SessionManager;
|
30 | 32 | import fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsDao;
|
31 | 33 | import fr.free.nrw.commons.bookmarks.pictures.BookmarkPicturesDao;
|
|
36 | 38 | import fr.free.nrw.commons.data.DBOpenHelper;
|
37 | 39 | import fr.free.nrw.commons.di.ApplicationlessInjection;
|
38 | 40 | import fr.free.nrw.commons.kvstore.JsonKvStore;
|
39 |
| -import fr.free.nrw.commons.kvstore.JsonKvStore; |
40 | 41 | import fr.free.nrw.commons.logging.FileLoggingTree;
|
41 | 42 | import fr.free.nrw.commons.logging.LogUtils;
|
42 | 43 | import fr.free.nrw.commons.modifications.ModifierSequenceDao;
|
|
46 | 47 | import io.reactivex.schedulers.Schedulers;
|
47 | 48 | import timber.log.Timber;
|
48 | 49 |
|
49 |
| -@ReportsCrashes( |
| 50 | +import static org.acra.ReportField.*; |
| 51 | + |
| 52 | +@AcraCore( |
| 53 | + buildConfigClass = BuildConfig.class, |
| 54 | + resReportSendSuccessToast = R.string.crash_dialog_ok_toast, |
| 55 | + reportFormat = StringFormat.KEY_VALUE_LIST, |
| 56 | + reportContent = {USER_COMMENT, APP_VERSION_CODE, APP_VERSION_NAME, ANDROID_VERSION, PHONE_MODEL, STACK_TRACE} |
| 57 | +) |
| 58 | + |
| 59 | +@AcraMailSender( |
50 | 60 | mailTo = "commons-app-android-private@googlegroups.com",
|
51 |
| - mode = ReportingInteractionMode.DIALOG, |
52 |
| - resDialogText = R.string.crash_dialog_text, |
53 |
| - resDialogTitle = R.string.crash_dialog_title, |
54 |
| - resDialogCommentPrompt = R.string.crash_dialog_comment_prompt, |
55 |
| - resDialogOkToast = R.string.crash_dialog_ok_toast |
| 61 | + reportAsFile = false |
| 62 | +) |
| 63 | + |
| 64 | +@AcraDialog( |
| 65 | + resTheme = R.style.Theme_AppCompat_Dialog, |
| 66 | + resText = R.string.crash_dialog_text, |
| 67 | + resTitle = R.string.crash_dialog_title, |
| 68 | + resCommentPrompt = R.string.crash_dialog_comment_prompt |
56 | 69 | )
|
| 70 | + |
57 | 71 | public class CommonsApplication extends Application {
|
58 | 72 | @Inject SessionManager sessionManager;
|
59 | 73 | @Inject DBOpenHelper dbOpenHelper;
|
|
0 commit comments