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

Commit db24d142 authored by Alan Viverette's avatar Alan Viverette
Browse files

Fix LongArray.addAll() to use correct arraycopy argument order

BUG: 11709513
Change-Id: I831e74ccb008739ab315c68618c04f870f9a36a5
parent 26606007
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class LongArray implements Cloneable {
        final int count = values.mSize;
        ensureCapacity(count);

        System.arraycopy(mValues, mSize, values.mValues, 0, count);
        System.arraycopy(values.mValues, 0, mValues, mSize, count);
        mSize += count;
    }

@@ -127,6 +127,9 @@ public class LongArray implements Cloneable {
     * Returns the value at the specified position in this array.
     */
    public long get(int index) {
        if (index >= mSize) {
            throw new ArrayIndexOutOfBoundsException(mSize, index);
        }
        return mValues[index];
    }

@@ -148,6 +151,9 @@ public class LongArray implements Cloneable {
     * Removes the value at the specified index from this array.
     */
    public void remove(int index) {
        if (index >= mSize) {
            throw new ArrayIndexOutOfBoundsException(mSize, index);
        }
        System.arraycopy(mValues, index, mValues, index + 1, mSize - index);
    }