summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameInfoVisualizer.cpp
diff options
context:
space:
mode:
author Eric Biggers <ebiggers@google.com> 2024-03-22 01:35:05 +0000
committer Eric Biggers <ebiggers@google.com> 2024-04-01 17:38:12 +0000
commita5d7857df0ecccb33ce74a52def4fa4c12e36e9b (patch)
treef0ddf8bf0fc544d2cb891719372b0145e86748a7 /libs/hwui/FrameInfoVisualizer.cpp
parent4f490c581c5f46eef7e84062f19cfb37cafdce48 (diff)
Use consistent helper class for keystore authorization
Currently the IKeystoreAuthorization service is intended to be accessed through the helper class android.security.Authorization. However, because Authorization provides only static methods, it can only be unit-tested by static mocking, which is only available in mockingservicestests. BiometricService works around this in two different ways: (a) using IKeystoreAuthorization directly, and (b) using android.security.KeyStore, which is an obsolete class which is now almost empty and just contains a couple random helpers. I'd like to remove it to avoid confusion with java.security.KeyStore. This CL solves the testability problem in a consistent way by renaming Authorization to KeyStoreAuthorization and changing all public static methods to instance methods. It updates all callers of the keystore authorization service to go through a KeyStoreAuthorization instance. Finally, it updates the unit tests for TrustManagerService and BiometricService to inject a mock KeyStoreAuthorization. Bug: 326508120 Test: atest TrustManagerServiceTest Test: atest FrameworksServicesTests:{BiometricServiceTest,AuthSessionTest} Test: atest CtsBiometricsTestCases:BiometricSimpleTests Flag: N/A. Refactoring with no behavior change intended. Change-Id: I68504f447b1b880c08a60cf027b13f77a6567ec9
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions