diff options
| author | Hai Zhang <zhanghai@google.com> | 2020-09-11 11:47:51 -0700 |
|---|---|---|
| committer | Hai Zhang <zhanghai@google.com> | 2020-09-21 22:25:50 -0700 |
| commit | 36744c716794df4b64f3975f165a2d7b2299316d (patch) | |
| tree | f26567390978d40ebd2a296db013151edceef804 /core/java/android/util/IntArray.java | |
| parent | 26b039a88f05523d8d7e7738680f465b270f1b3c (diff) | |
Refactor PermissionsState to be a data class for migration.
PackageManager Settings will now read permission state from
PermissionManager as well, to maintain compatibility for dump and the
package list file. As a result, we no longer need to write back to
this legacy state before dump and writing package list. We still need
to do so before we finish persistence migration though.
The new AppIdPermissionState will be a system API once we finish
migration of BasePermission.
Bug: 158736025
Test: presubmit
Change-Id: I3c7f20cef54084255108a0a889d8a3d7e3ab9d88
Diffstat (limited to 'core/java/android/util/IntArray.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) { |
