Skip to content
Commit e9aa7ee3 authored by Kevin Han's avatar Kevin Han
Browse files

Refactor decision logic out of storage classes (2/2)

To make the storage classes more generic, this CL refactors
RecentPermissionsDecisionStorage to store the more generic
PermissionEvent.

This adds another layer of inheritance/implementation. Previously:

RecentPermissionsDecisionsStorage (client interface)
  RecentPermissionsDecisionStorageImpl (XML db + perm decision logic)

Now:

PermissionEventStorage<T> (client interface)
  BasePermissionEventStorage<T> (XML database logic)
    PermissionDecisionStorageImpl (perm decision logic)

As part of this split, granularity of time storage has been moved to be
an implementation detail of implementations of
BasePermissionEventStorage which changes some of the optimizations around
not storing time changes less than a day.

Bug: 205642821
Test: atest PermissionControllerMockingTests
Change-Id: Ic6a611b93f51a46f7761844aac1ebd8ac22b6c10
parent bef34d8f
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