summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Miranda Kephart <mkephart@google.com> 2024-04-25 15:02:27 -0400
committer Miranda Kephart <mkephart@google.com> 2024-04-26 17:49:11 +0000
commitff8c76cd9203723f23cee52525fe0908abf3b61b (patch)
treebf26c937288de51c04730b4dae305de03f2f70a1 /api/api.go
parent9adec260cfe2313686f116bf5185b9a132dda000 (diff)
Only register receiver for the length of a screenshot
We're currently registering a broadcast receiver in the init method of ScreenshotHelper, which never gets cleaned up. This can cause sysui to crash if many screenshots are taken using the accessibility shortcut, since that creates a new ScreenshotHelper instance for each screenshot, and the resulting receiver is never unregistered. This change switches to registering the broadcast receiver as part of the screenshot handling method, and unregistering it when we reset the screenshot connection. Bug: 326350415 Test: manual -- verified using logs that successive screenshots taken from the accessibility shortcut do not increase the total number of receivers registered by system UI Change-Id: I116cc97fac318ffa60e2cc3f9a9b033e96b2a3f6
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions