-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/acra-build-failed' into beta
- Loading branch information
Showing
9 changed files
with
30 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,10 @@ | |
package ryey.easer; | ||
|
||
import android.Manifest; | ||
import android.app.Application; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.content.pm.PackageManager; | ||
import android.content.res.Configuration; | ||
import android.os.Environment; | ||
import android.preference.PreferenceManager; | ||
|
||
import androidx.annotation.NonNull; | ||
|
@@ -39,26 +37,19 @@ | |
import com.zeugmasolutions.localehelper.LocaleHelperApplicationDelegate; | ||
|
||
import org.acra.ACRA; | ||
import org.acra.annotation.AcraCore; | ||
import org.acra.annotation.AcraToast; | ||
|
||
import java.io.File; | ||
import org.acra.config.CoreConfigurationBuilder; | ||
import org.acra.config.DialogConfigurationBuilder; | ||
import org.acra.config.MailSenderConfigurationBuilder; | ||
|
||
import ryey.easer.core.log.ActivityLogService; | ||
|
||
@AcraCore(buildConfigClass = BuildConfig.class, | ||
reportSenderFactoryClasses = ErrorSenderFactory.class) | ||
@AcraToast(resText=R.string.prompt_error_logged) | ||
public class EaserApplication extends MultiDexApplication { | ||
|
||
static final String LOG_DIR = new File(Environment.getExternalStorageDirectory(), "/logger/error").getAbsolutePath(); | ||
|
||
static final int[] THEME_NIGHT_MODE = { | ||
AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM, | ||
AppCompatDelegate.MODE_NIGHT_NO, | ||
AppCompatDelegate.MODE_NIGHT_YES, | ||
}; | ||
|
||
private final LocaleHelperApplicationDelegate localeAppDelegate = new LocaleHelperApplicationDelegate(); | ||
|
||
@Override | ||
|
@@ -96,6 +87,17 @@ public void onConfigurationChanged(@NonNull Configuration newConfig) { | |
@Override | ||
protected void attachBaseContext(Context base) { | ||
super.attachBaseContext(localeAppDelegate.attachBaseContext(base)); | ||
ACRA.init(this); | ||
|
||
ACRA.init(this, new CoreConfigurationBuilder() | ||
.withPluginConfigurations( | ||
new MailSenderConfigurationBuilder() | ||
.withMailTo("[email protected]") | ||
.withReportAsFile(true) | ||
.build(), | ||
new DialogConfigurationBuilder() | ||
.withText(getString(R.string.prompt_acra_dialog_text)) | ||
.build() | ||
) | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters