Loading packages/CrashRecovery/services/java/com/android/server/RescueParty.java +12 −4 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import android.provider.Settings; import android.sysprop.CrashRecoveryProperties; import android.text.TextUtils; import android.util.ArraySet; import android.util.ExceptionUtils; import android.util.Log; import android.util.Slog; Loading Loading @@ -136,7 +135,7 @@ public class RescueParty { } // We're disabled on all engineering devices if (Build.IS_ENG) { if (Build.TYPE.equals("eng")) { Slog.v(TAG, "Disabled because of eng build"); return true; } Loading @@ -144,7 +143,7 @@ public class RescueParty { // We're disabled on userdebug devices connected over USB, since that's // a decent signal that someone is actively trying to debug the device, // or that it's in a lab environment. if (Build.IS_USERDEBUG && isUsbActive()) { if (Build.TYPE.equals("userdebug") && isUsbActive()) { Slog.v(TAG, "Disabled because of active USB connection"); return true; } Loading Loading @@ -478,9 +477,18 @@ public class RescueParty { } } private static String getCompleteMessage(Throwable t) { final StringBuilder builder = new StringBuilder(); builder.append(t.getMessage()); while ((t = t.getCause()) != null) { builder.append(": ").append(t.getMessage()); } return builder.toString(); } private static void logRescueException(int level, @Nullable String failedPackageName, Throwable t) { final String msg = ExceptionUtils.getCompleteMessage(t); final String msg = getCompleteMessage(t); EventLogTags.writeRescueFailure(level, msg); String failureMsg = "Failed rescue level " + levelToString(level); if (!TextUtils.isEmpty(failedPackageName)) { Loading Loading
packages/CrashRecovery/services/java/com/android/server/RescueParty.java +12 −4 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import android.provider.Settings; import android.sysprop.CrashRecoveryProperties; import android.text.TextUtils; import android.util.ArraySet; import android.util.ExceptionUtils; import android.util.Log; import android.util.Slog; Loading Loading @@ -136,7 +135,7 @@ public class RescueParty { } // We're disabled on all engineering devices if (Build.IS_ENG) { if (Build.TYPE.equals("eng")) { Slog.v(TAG, "Disabled because of eng build"); return true; } Loading @@ -144,7 +143,7 @@ public class RescueParty { // We're disabled on userdebug devices connected over USB, since that's // a decent signal that someone is actively trying to debug the device, // or that it's in a lab environment. if (Build.IS_USERDEBUG && isUsbActive()) { if (Build.TYPE.equals("userdebug") && isUsbActive()) { Slog.v(TAG, "Disabled because of active USB connection"); return true; } Loading Loading @@ -478,9 +477,18 @@ public class RescueParty { } } private static String getCompleteMessage(Throwable t) { final StringBuilder builder = new StringBuilder(); builder.append(t.getMessage()); while ((t = t.getCause()) != null) { builder.append(": ").append(t.getMessage()); } return builder.toString(); } private static void logRescueException(int level, @Nullable String failedPackageName, Throwable t) { final String msg = ExceptionUtils.getCompleteMessage(t); final String msg = getCompleteMessage(t); EventLogTags.writeRescueFailure(level, msg); String failureMsg = "Failed rescue level " + levelToString(level); if (!TextUtils.isEmpty(failedPackageName)) { Loading