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

Commit 2d94c573 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #11069176: Crash showing process stats" into klp-dev

parents 5c126892 d94d533b
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;
                        }