Remove non-tombstoned ANR path.
Bug: http://b/73140330
Test: boots with ANR
Change-Id: Ib58724a0a6b831c05cb59d053520a4169ea591fd
(cherry picked from commit 10a30bd9e82686119084463d7c217c2f85955c41)
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index c8e0a5e..82c4a7a 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -595,14 +595,6 @@
return null;
}
- // Don't run the FD monitor on builds that have a global ANR trace file. We're using
- // the ANR trace directory as a quick hack in order to get these traces in bugreports
- // and we wouldn't want to overwrite something important.
- final String dumpDirStr = SystemProperties.get("dalvik.vm.stack-trace-dir", "");
- if (dumpDirStr.isEmpty()) {
- return null;
- }
-
final StructRlimit rlimit;
try {
rlimit = android.system.Os.getrlimit(OsConstants.RLIMIT_NOFILE);
@@ -619,7 +611,7 @@
// We do this to avoid having to enumerate the contents of /proc/self/fd in order to
// count the number of descriptors open in the process.
final File fdThreshold = new File("/proc/self/fd/" + (rlimit.rlim_cur - FD_HIGH_WATER_MARK));
- return new OpenFdMonitor(new File(dumpDirStr), fdThreshold);
+ return new OpenFdMonitor(new File("/data/anr"), fdThreshold);
}
OpenFdMonitor(File dumpDir, File fdThreshold) {