ams-appNotResponding
File tracesFile = dumpStackTraces(true, firstPids, processCpuTracker, lastPids,
NATIVE_STACKS_OF_INTEREST);
SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String newTracesPath = tracesFile.getPath();
int lpos = newTracesPath.lastIndexOf (".");
if (-1 != lpos) {
newTracesPath = newTracesPath.substring(0,lpos) + "_" + app.pid + "_" + app.processName + "_" +
sDateFormat.format(new Date()) + newTracesPath.substring(lpos);
tracesFile.renameTo(new File(newTracesPath));
}
本文介绍了一段关于在应用程序未响应时收集堆栈跟踪信息,并根据进程ID、进程名称及当前日期时间对文件进行重命名的代码逻辑。
802

被折叠的 条评论
为什么被折叠?



