diff options
author | Hai Zhang <zhanghai@google.com> | 2020-11-09 16:38:28 -0800 |
---|---|---|
committer | Hai Zhang <zhanghai@google.com> | 2020-11-12 17:07:26 -0800 |
commit | 65d46e9b05bccaf1bca91cf7528393f150568c41 (patch) | |
tree | 786fad92bf560f7b28d1f61fff023653a5124ce5 /tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java | |
parent | a5a96475fbe70e91f784848fdfb493d56e39f446 (diff) |
Refactor getAppOpPermissionPackages() as API.
- Remove IPermissionManager.getAppOpPermissionPackages() and its usage
because we are not going to expose it as a new API on
PermissionManager.
- Make PermissionManagerServiceInternal.getAppOpPermissionPackages()
unchecked because it's an internal API. Internal APIs should be by
default unchecked and checks should be done manually when
necessary.
- The parameters and return value of
PermissionManagerServiceInternal.getAppOpPermissionPackages() are
also made non-null to be a good API, and EmptyArray.STRING is
returned in the empty case so there won't be a performance penalty.
IPackageManager.getAppOpPermissionPackages() will return an empty
array for null permissionName before calling
PermissionManagerServiceInternal.getAppOpPermissionPackages() for
compatibility, and clients should handle returned empty arrays as
good as null.
- Use PermissionManagerServiceInternal.getAppOpPermissionPackages()
only to support the @UnsupportedAppUsage of
IPackageManager.getAppOpPermissionPackages() and perform checks
there.
Bug: 158736025
Test: presubmit
Change-Id: I0f96e898daa4cf40706430f1b7fbd5737a1f97f8
Diffstat (limited to 'tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java')
0 files changed, 0 insertions, 0 deletions