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

Commit c26b093c authored by Jake Wharton's avatar Jake Wharton Committed by Android (Google) Code Review
Browse files

Merge "Expose removeAt(int) for parity with other sparse collections."

parents 584b923f d77bce88
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44280,6 +44280,7 @@ package android.util {
    method public int indexOfValue(boolean);
    method public int keyAt(int);
    method public void put(int, boolean);
    method public void removeAt(int);
    method public int size();
    method public boolean valueAt(int);
  }
+5 −1
Original line number Diff line number Diff line
@@ -117,7 +117,11 @@ public class SparseBooleanArray implements Cloneable {
        }
    }

    /** @hide */
    /**
     * Removes the mapping at the specified index.
     * <p>
     * For indices outside of the range {@code 0...size()-1}, the behavior is undefined.
     */
    public void removeAt(int index) {
        System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1));
        System.arraycopy(mValues, index + 1, mValues, index, mSize - (index + 1));