Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ff8c76cd authored by Miranda Kephart's avatar Miranda Kephart
Browse files

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
parent 9adec260
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