Skip to content

Commit

Permalink
Revert "ProcessStats: Handle IndexOutOfBoundsException"
Browse files Browse the repository at this point in the history
This reverts commit 2ec0406.
  • Loading branch information
temasek committed Feb 21, 2016
1 parent 50853c2 commit aa74af4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/java/com/android/internal/app/ProcessStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -2841,9 +2841,6 @@ void addDuration(int state, long dur) {
mDurationsTable = mStats.mAddLongTable;
mDurationsTableSize = mStats.mAddLongTableSize;
}
if (((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK) >= mStats.mLongs.size()) {
return;
}
long[] longs = mStats.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
if (DEBUG) Slog.d(TAG, "Duration of " + mName + " state " + state + " inc by " + dur
+ " from " + longs[(off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK]);
Expand Down Expand Up @@ -3224,9 +3221,6 @@ void addPss(int state, int inCount, long minPss, long avgPss, long maxPss, long
mPssTable = mStats.mAddLongTable;
mPssTableSize = mStats.mAddLongTableSize;
}
if (((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK) >= mStats.mLongs.size()) {
return;
}
long[] longs = mStats.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
idx = (off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK;
long count = longs[idx+PSS_SAMPLE_COUNT];
Expand Down

0 comments on commit aa74af4

Please sign in to comment.