summaryrefslogtreecommitdiff
path: root/libs/androidfw/BackupData.cpp
diff options
context:
space:
mode:
author Ioana Alexandru <aioana@google.com> 2023-07-12 10:01:17 +0000
committer Ioana Alexandru <aioana@google.com> 2023-07-24 19:01:25 +0000
commit7deb904fdfd7cbd098c47ae0e22f40bfd3e5053e (patch)
tree2785742cf7ebfbbe683f1ff1032962cb2c489546 /libs/androidfw/BackupData.cpp
parent0aa176c0c2d462ae346f35cb45049fc3c33df092 (diff)
Add early exits to visitGrantableUri/calculateGrantableUris.
This is to improve the performance of the URI checks by avoiding unnecessary calls. Also added a trace so that we can track this moving forward, and figure out if it needs to be improved further. Note that the tests had to be updated because calculateGrantableUris initially got called in the constructor before we mocked the UriGrantsManager (which should, by the way, only be visible for testing), which populates mGrantableUris, so the early exit kicked in. Normally, calculateGrantableUris should only be called once in the constructor, so that's what we should be testing. Test: atest NotificationRecordTest NotificationManagerServiceTest Fix: 284193006 Bug: 281044385 Change-Id: I44005e4a3d083c9ed9e8dda6918f5c9a2b932d93
Diffstat (limited to 'libs/androidfw/BackupData.cpp')
0 files changed, 0 insertions, 0 deletions