diff options
Diffstat (limited to 'core/java/android/util/SparseArray.java')
-rw-r--r-- | core/java/android/util/SparseArray.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java index 1c8b330..4c13460 100644 --- a/core/java/android/util/SparseArray.java +++ b/core/java/android/util/SparseArray.java @@ -90,6 +90,17 @@ public class SparseArray<E> { delete(key); } + /** + * Removes the mapping at the specified index. + * @hide + */ + public void removeAt(int index) { + if (mValues[index] != DELETED) { + mValues[index] = DELETED; + mGarbage = true; + } + } + private void gc() { // Log.e("SparseArray", "gc start with " + mSize); |