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
This commit is contained in:
@@ -143,6 +143,17 @@ public class IntArray implements Cloneable {
|
||||
mSize += count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user