Skip to content
Commit 7deb904f authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

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
parent 0aa176c0
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