summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Azhara Assanova <azharaa@google.com> 2024-04-30 17:23:35 +0000
committer Azhara Assanova <azharaa@google.com> 2024-09-13 09:45:35 +0000
commit5029ea510d6d09ff972197616105fb2746e91409 (patch)
tree1904a9f310641fad4857619f9e858b7a680933a3 /libs/input/PointerController.cpp
parent039abeb9632e7786b471710e2efc609018ca1b07 (diff)
Implement logging for ContentOrFileUriEventReported
This change covers event type 1 CONTENT_URI_WITHOUT_CALLER_READ_PERMISSION, i.e. when an app launches an activity with requireContentUriPermissionFromCaller set to "none", and the launching app passes content URIs it doesn't have permission to read. Processing activity launches can happen concurrently, hence it's important to distinguish which content URIs belong to a specific activity launch. For that, this change uses Request#hashCode to uniquely identify launches inside UriGrantsManagerService to collect the required content URIs for logging. Once the activity launch is completed and the WindowManager lock is released (to ensure no deadlocking), ActivityStarter will notify UriGrantsManagerService that the activity launch has been completed. If the launch was successful, then UriGrantsManagerService will log the event and clear the collected content URIs. If the launch was unsuccessful, then UriGrantsManagerService will simply clear the collected content URIs. To collect the content URIs, UriGrantsManagerService uses a new array map from launch ids to sets of content URIs and guards it by a lock. To accommodate that, all the methods around requireContentUriPermissionFromCaller have also been renamed to indicate whether they should be called in the unlocked or locked state. Bug: 314273739 Test: statsd_testdrive 933 Flag: EXEMPT metrics Change-Id: I8a78d8d9d079c93e50de39235e269294aff02884
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions