mirror of https://github.com/M66B/FairEmail.git
Write crash log only when not installed from the Play store
This commit is contained in:
parent
cec0d1032c
commit
3ae2d51643
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue