Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d94d533b authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #11069176: Crash showing process stats

Change-Id: Ie568ebcb9863bed95c775b9b28654a5e2dc464cd
parent d6239b92
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -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;
                        }