From d94d533b5a9ec44899a4bc0e09796a5ec82a250e Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 3 Oct 2013 17:32:19 -0700 Subject: Fix issue #11069176: Crash showing process stats Change-Id: Ie568ebcb9863bed95c775b9b28654a5e2dc464cd --- .../java/com/android/server/am/ProcessStatsService.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/java/com/android/server/am/ProcessStatsService.java b/services/java/com/android/server/am/ProcessStatsService.java index 7dc006c..dbc05fa 100644 --- a/services/java/com/android/server/am/ProcessStatsService.java +++ b/services/java/com/android/server/am/ProcessStatsService.java @@ -97,6 +97,19 @@ public final class ProcessStatsService extends IProcessStats.Stub { }); } + @Override + public boolean onTransact(int code, Parcel data, Parcel reply, int flags) + throws RemoteException { + try { + return super.onTransact(code, data, reply, flags); + } catch (RuntimeException e) { + if (!(e instanceof SecurityException)) { + Slog.wtf(TAG, "Process Stats Crash", e); + } + throw e; + } + } + public ProcessStats.ProcessState getProcessStateLocked(String packageName, int uid, String processName) { return mProcessStats.getProcessStateLocked(packageName, uid, processName); @@ -477,7 +490,7 @@ public final class ProcessStatsService extends IProcessStats.Stub { - moreStats.mTimePeriodStartRealtime, sb); Slog.i(TAG, sb.toString()); } else { - Slog.w(TAG, "Failure reading " + files.get(i) + "; " + Slog.w(TAG, "Failure reading " + files.get(i-1) + "; " + moreStats.mReadError); continue; } -- cgit v1.1