Loading core/java/android/util/LongArray.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class LongArray implements Cloneable { final int count = values.mSize; final int count = values.mSize; ensureCapacity(count); ensureCapacity(count); System.arraycopy(mValues, mSize, values.mValues, 0, count); System.arraycopy(values.mValues, 0, mValues, mSize, count); mSize += count; mSize += count; } } Loading Loading @@ -127,6 +127,9 @@ public class LongArray implements Cloneable { * Returns the value at the specified position in this array. * Returns the value at the specified position in this array. */ */ public long get(int index) { public long get(int index) { if (index >= mSize) { throw new ArrayIndexOutOfBoundsException(mSize, index); } return mValues[index]; return mValues[index]; } } Loading @@ -148,6 +151,9 @@ public class LongArray implements Cloneable { * Removes the value at the specified index from this array. * Removes the value at the specified index from this array. */ */ public void remove(int index) { public void remove(int index) { if (index >= mSize) { throw new ArrayIndexOutOfBoundsException(mSize, index); } System.arraycopy(mValues, index, mValues, index + 1, mSize - index); System.arraycopy(mValues, index, mValues, index + 1, mSize - index); } } Loading Loading
core/java/android/util/LongArray.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class LongArray implements Cloneable { final int count = values.mSize; final int count = values.mSize; ensureCapacity(count); ensureCapacity(count); System.arraycopy(mValues, mSize, values.mValues, 0, count); System.arraycopy(values.mValues, 0, mValues, mSize, count); mSize += count; mSize += count; } } Loading Loading @@ -127,6 +127,9 @@ public class LongArray implements Cloneable { * Returns the value at the specified position in this array. * Returns the value at the specified position in this array. */ */ public long get(int index) { public long get(int index) { if (index >= mSize) { throw new ArrayIndexOutOfBoundsException(mSize, index); } return mValues[index]; return mValues[index]; } } Loading @@ -148,6 +151,9 @@ public class LongArray implements Cloneable { * Removes the value at the specified index from this array. * Removes the value at the specified index from this array. */ */ public void remove(int index) { public void remove(int index) { if (index >= mSize) { throw new ArrayIndexOutOfBoundsException(mSize, index); } System.arraycopy(mValues, index, mValues, index + 1, mSize - index); System.arraycopy(mValues, index, mValues, index + 1, mSize - index); } } Loading