Check for dead system

pull/190/head
M66B 4 years ago
parent c3933afd94
commit 47c070d543

@ -41,6 +41,7 @@ import android.os.BadParcelableException;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.DeadObjectException; import android.os.DeadObjectException;
import android.os.DeadSystemException;
import android.os.Debug; import android.os.Debug;
import android.os.PowerManager; import android.os.PowerManager;
import android.os.RemoteException; import android.os.RemoteException;
@ -689,7 +690,7 @@ public class Log {
// Some Android versions (Samsung) send images as clip data // Some Android versions (Samsung) send images as clip data
return false; 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 java.lang.RuntimeException: Failure from system
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1327) at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1327)
@ -706,7 +707,16 @@ public class Log {
*/ */
Throwable cause = ex; Throwable cause = ex;
while (cause != null) { 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; return false;
cause = cause.getCause(); cause = cause.getCause();
} }

Loading…
Cancel
Save