mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Write crash log only when not installed from the Play store
This commit is contained in:
@@ -47,7 +47,9 @@ public class ApplicationEx extends Application {
|
||||
public void uncaughtException(Thread thread, Throwable ex) {
|
||||
if (ownFault(ex)) {
|
||||
Log.e(Helper.TAG, ex + "\r\n" + Log.getStackTraceString(ex));
|
||||
writeCrashLog(ApplicationEx.this, ex);
|
||||
|
||||
if (!Helper.isPlayStoreInstall(ApplicationEx.this))
|
||||
writeCrashLog(ApplicationEx.this, ex);
|
||||
|
||||
if (prev != null)
|
||||
prev.uncaughtException(thread, ex);
|
||||
@@ -91,9 +93,6 @@ public class ApplicationEx extends Application {
|
||||
}
|
||||
|
||||
public boolean ownFault(Throwable ex) {
|
||||
//if (!Helper.isPlayStoreInstall(this))
|
||||
// return true;
|
||||
|
||||
if (ex instanceof OutOfMemoryError)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -189,7 +189,8 @@ public class Helper {
|
||||
}
|
||||
|
||||
static void unexpectedError(final Context context, final LifecycleOwner owner, final Throwable ex) {
|
||||
ApplicationEx.writeCrashLog(context, ex);
|
||||
if (!isPlayStoreInstall(context))
|
||||
ApplicationEx.writeCrashLog(context, ex);
|
||||
|
||||
if (owner.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
new DialogBuilderLifecycle(context, owner)
|
||||
|
||||
Reference in New Issue
Block a user