Skip to content
Commit 96f0ef49 authored by Hai Zhang's avatar Hai Zhang
Browse files

Second refactoring for BasePermission.

- Made all fields private.
- Replaced ParsedPermission usage with PermissionInfo.

The BasePermission class was using ParsedPermission and PermissionInfo
to keep track of the same set of information. Since we only need to
support getPermissionInfo(), we can keep track of the information with
PermissionInfo alone, dropping dependency on ParsedPermission which
isn't and won't be an API.

The logic of addToTree() and updateDynamicPermission() became a bit
weird/broken after the package parser refactoring regarding how the
new ParsedPermission/PermissionInfo was derived, so Pie BasePermission
implementation was taken as a reference for what the intended behavior
actually was.

Bug: 158736025
Test: presubmit
Change-Id: I414d43c3e98e9267d74de35eb62b7d1b6524a13f
parent 63ab14cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment