mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-12 09:26:07 +00:00
Check for dead system
This commit is contained in:
parent
c3933afd94
commit
47c070d543
1 changed files with 12 additions and 2 deletions
|
@ -41,6 +41,7 @@ import android.os.BadParcelableException;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.DeadSystemException;
|
||||
import android.os.Debug;
|
||||
import android.os.PowerManager;
|
||||
import android.os.RemoteException;
|
||||
|
@ -689,7 +690,7 @@ public class Log {
|
|||
// Some Android versions (Samsung) send images as clip data
|
||||
return false;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
/*
|
||||
java.lang.RuntimeException: Failure from system
|
||||
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1327)
|
||||
|
@ -706,7 +707,16 @@ public class Log {
|
|||
*/
|
||||
Throwable cause = ex;
|
||||
while (cause != null) {
|
||||
if (cause instanceof DeadObjectException) // Includes DeadSystemException
|
||||
if (cause instanceof DeadObjectException)
|
||||
return false;
|
||||
cause = cause.getCause();
|
||||
}
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
Throwable cause = ex;
|
||||
while (cause != null) {
|
||||
if (cause instanceof DeadSystemException)
|
||||
return false;
|
||||
cause = cause.getCause();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue