Attempt to deprecate redundant usesPermission data structures.
Considering a map of permision name to the ParsedUsesPermission object is already stored, we no longer need to keep track of a set of permission names. This can just be derived from the keyset of the map. The getRequestedPermissions() method is kept to avoid several changes throughout the codebase; it also helps provide a nice abstraction to get the permission names without accessing the map and calling for the keyset explicitly. Similarly, the list to store the ParsesUsesPermission objects can be deprecated in favor of deriving the information through the map's values. Some use cases had to be adjusted to not use the get() method since the .values() of the map returns a Collection not a List. Bug: 419394776 Test: presubmit; verified a few sys health tests via ABTD Flag: EXEMPT refactor Change-Id: Ic3abefb5f8c1b2b40620969d4038a4c555fe9cc0
Loading
Please register or sign in to comment