diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-09-22 22:18:40 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-09-22 22:18:40 +0000 |
| commit | fbffe3f137dfcd10f0166ed41c446ac7fc7fa4d3 (patch) | |
| tree | df3691be0d065683daf99010ca0bb8c30c1aa1eb /core/java | |
| parent | cc848e93c1f97ff7ff2a12d8f7fa727b89932e84 (diff) | |
| parent | 36744c716794df4b64f3975f165a2d7b2299316d (diff) | |
Merge "Refactor PermissionsState to be a data class for migration."
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/util/IntArray.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/util/IntArray.java b/core/java/android/util/IntArray.java index 5a74ec0e52c0..b77265b0ebf6 100644 --- a/core/java/android/util/IntArray.java +++ b/core/java/android/util/IntArray.java @@ -144,6 +144,17 @@ public class IntArray implements Cloneable { } /** + * Adds the values in the specified array to this array. + */ + public void addAll(int[] values) { + final int count = values.length; + ensureCapacity(count); + + System.arraycopy(values, 0, mValues, mSize, count); + mSize += count; + } + + /** * Ensures capacity to append at least <code>count</code> values. */ private void ensureCapacity(int count) { |
