diff options
author | Alexander Dorokhine <adorokhine@google.com> | 2021-06-18 10:48:58 -0700 |
---|---|---|
committer | Alexander Dorokhine <adorokhine@google.com> | 2021-06-18 10:48:58 -0700 |
commit | 9b26c3c9be866b1bf8b0199f20073e6eeab1a4dd (patch) | |
tree | 9fb9e7a2febcc4733c37eee870a898855957c7b8 /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 5c86c0c10e71a6bc47582dd266da987198a0baa8 (diff) |
Guard system usage reporting by checking the caller has system access.
Adding this check in a testable way requires refactoring VisibilityStore
to pull it out of management by the AppSearchImpl object. It is now
initialized as a sibling of AppSearchImpl, managed by
AppSearchUserInstanceManager.
This has several benefits:
* Breaks the complicated initialization inter-dependency between
AppSearchImpl and VisibilityStore
* Reduces duplicative singleton managers
* Allows AppSearchImpl to be tested more easily by accepting a
"hasSystemSurfaceable" boolean that can be set in tests
* Reduces the number of times we have to call into VisStore; we can
determine whether the caller has system access in advance instead of
repeating the check for every schema type
Bug: 180058203
Bug: 183031844
Test: GlobalSearchSessionCtsTest#testReportSystemUsage_ForbiddenFromNonSystem
Test: GlobalSearchSessionPlatformCtsTest#testReportSystemUsage
Test: VisibilityStoreTest
Change-Id: I84c84819f287628ccf8af369f5481a8e90255f62
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
0 files changed, 0 insertions, 0 deletions