Put a binder cache on DevicePolicyManager APIs
Bug: 190489030 Put a binder cache in front of IDevicePolicyManager APIs. The following APIs are cached: * getKeyguardDisabledFeatures() * hasDeviceOwner() * getProfileOwnerOrDeviceOwnerSupervisionComponent() * isOrganizationOwnedDeviceWithManagedProfile() * getDeviceOwnerOrganizationName() * getOrganizationNameForUser() * isNetworkLoggingEnabled() The caches use a shared key which means that all are invalidated at the same time. This is slightly less efficient than API-specific invalidation but it greatly simplifies the invalidation logic in the server. The cost of invalidating all caches at the same time is small if invalidation happens infrequently (less than one an hour, on average). The test classes are modified to disable caches in the local process. Test: * atest FrameworksServicesTests:DevicePolicyConstantsTest * atest FrameworksServicesTests:DevicePolicyEventLoggerTest * atest FrameworksServicesTests:DevicePolicyManagerServiceMigrationTest * atest FrameworksServicesTests:DevicePolicyManagerTest * atest FrameworksServicesTests:EnterpriseSpecificIdCalculatorTest * atest FrameworksServicesTests:OverlayPackagesProviderTest * atest FrameworksServicesTests:OwnersTest * atest FrameworksServicesTests:PolicyVersionUpgraderTest * atest FrameworksServicesTests:SecurityEventTest * atest FrameworksServicesTests:SystemUpdatePolicyTest * atest FrameworksServicesTests:TransferOwnershipMetadataManagerTest Change-Id: Iead8644cb413b45f3b6f3da81ff00a61788941a2
Loading
Please register or sign in to comment