Skip to content
Snippets Groups Projects
Commit f1e3a6d6 authored by beiyifb's avatar beiyifb
Browse files

Do not kill ANR-ed debugged application

Test: adb shell am set-debug-app --persistent <package> Observe that debugged app is not killed during stepping.
Change-Id: I7a16a38cecbdf386bac04a4eda1680dd0dca6221
parent 82eae714
No related branches found
No related tags found
No related merge requests found
......@@ -51,11 +51,11 @@ import android.util.SparseBooleanArray;
import com.android.internal.annotations.CompositeRWLock;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.modules.expresslog.Counter;
import com.android.internal.os.ProcessCpuTracker;
import com.android.internal.os.TimeoutRecord;
import com.android.internal.os.anr.AnrLatencyTracker;
import com.android.internal.util.FrameworkStatsLog;
import com.android.modules.expresslog.Counter;
import com.android.server.ResourcePressureUtil;
import com.android.server.criticalevents.CriticalEventLog;
import com.android.server.stats.pull.ProcfsMemoryUtil.MemorySnapshot;
......@@ -298,6 +298,11 @@ class ProcessErrorStateRecord {
ArrayList<Integer> firstPids = new ArrayList<>(5);
SparseBooleanArray lastPids = new SparseBooleanArray(20);
if (mApp.isDebugging()) {
Slog.i(TAG, "Skipping debugged app ANR: " + this + " " + annotation);
return;
}
mApp.getWindowProcessController().appEarlyNotResponding(annotation, () -> {
latencyTracker.waitingOnAMSLockStarted();
synchronized (mService) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment