Loading core/java/android/app/IActivityManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ interface IActivityManager { void killApplicationProcess(in String processName, int uid); // Special low-level communication with activity manager. boolean handleApplicationWtf(in IBinder app, in String tag, boolean system, in ApplicationErrorReport.ParcelableCrashInfo crashInfo); in ApplicationErrorReport.ParcelableCrashInfo crashInfo, int immediateCallerPid); @UnsupportedAppUsage void killBackgroundProcesses(in String packageName, int userId); boolean isUserAMonkey(); Loading core/java/com/android/internal/os/RuntimeInit.java +2 −1 Original line number Diff line number Diff line Loading @@ -468,7 +468,8 @@ public class RuntimeInit { try { if (ActivityManager.getService().handleApplicationWtf( mApplicationObject, tag, system, new ApplicationErrorReport.ParcelableCrashInfo(t))) { new ApplicationErrorReport.ParcelableCrashInfo(t), Process.myPid())) { // The Activity Manager has already written us off -- now exit. Process.killProcess(Process.myPid()); System.exit(10); Loading services/core/java/com/android/server/am/ActivityManagerService.java +11 −5 Original line number Diff line number Diff line Loading @@ -9763,15 +9763,21 @@ public class ActivityManagerService extends IActivityManager.Stub * @param crashInfo describing the context of the error * @return true if the process should exit immediately (WTF is fatal) */ @Override public boolean handleApplicationWtf(final IBinder app, final String tag, boolean system, final ApplicationErrorReport.ParcelableCrashInfo crashInfo) { final ApplicationErrorReport.ParcelableCrashInfo crashInfo, int immediateCallerPid) { final int callingUid = Binder.getCallingUid(); final int callingPid = Binder.getCallingPid(); if (system) { // If this is coming from the system, we could very well have low-level // system locks held, so we want to do this all asynchronously. And we // never want this to become fatal, so there is that too. // // Note: "callingPid == Process.myPid())" wouldn't be reliable because even if the caller // is within the system server, if it calls Log.wtf() without clearning the calling // identity, callingPid would still be of a remote caller. So we explicltly pass the // process PID from the caller. if (system || (immediateCallerPid == Process.myPid())) { mHandler.post(new Runnable() { @Override public void run() { handleApplicationWtfInner(callingUid, callingPid, app, tag, crashInfo); Loading Loading
core/java/android/app/IActivityManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ interface IActivityManager { void killApplicationProcess(in String processName, int uid); // Special low-level communication with activity manager. boolean handleApplicationWtf(in IBinder app, in String tag, boolean system, in ApplicationErrorReport.ParcelableCrashInfo crashInfo); in ApplicationErrorReport.ParcelableCrashInfo crashInfo, int immediateCallerPid); @UnsupportedAppUsage void killBackgroundProcesses(in String packageName, int userId); boolean isUserAMonkey(); Loading
core/java/com/android/internal/os/RuntimeInit.java +2 −1 Original line number Diff line number Diff line Loading @@ -468,7 +468,8 @@ public class RuntimeInit { try { if (ActivityManager.getService().handleApplicationWtf( mApplicationObject, tag, system, new ApplicationErrorReport.ParcelableCrashInfo(t))) { new ApplicationErrorReport.ParcelableCrashInfo(t), Process.myPid())) { // The Activity Manager has already written us off -- now exit. Process.killProcess(Process.myPid()); System.exit(10); Loading
services/core/java/com/android/server/am/ActivityManagerService.java +11 −5 Original line number Diff line number Diff line Loading @@ -9763,15 +9763,21 @@ public class ActivityManagerService extends IActivityManager.Stub * @param crashInfo describing the context of the error * @return true if the process should exit immediately (WTF is fatal) */ @Override public boolean handleApplicationWtf(final IBinder app, final String tag, boolean system, final ApplicationErrorReport.ParcelableCrashInfo crashInfo) { final ApplicationErrorReport.ParcelableCrashInfo crashInfo, int immediateCallerPid) { final int callingUid = Binder.getCallingUid(); final int callingPid = Binder.getCallingPid(); if (system) { // If this is coming from the system, we could very well have low-level // system locks held, so we want to do this all asynchronously. And we // never want this to become fatal, so there is that too. // // Note: "callingPid == Process.myPid())" wouldn't be reliable because even if the caller // is within the system server, if it calls Log.wtf() without clearning the calling // identity, callingPid would still be of a remote caller. So we explicltly pass the // process PID from the caller. if (system || (immediateCallerPid == Process.myPid())) { mHandler.post(new Runnable() { @Override public void run() { handleApplicationWtfInner(callingUid, callingPid, app, tag, crashInfo); Loading