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

Skip to content
Commit fe1006fb authored by Nicolò Mazzucato's avatar Nicolò Mazzucato
Browse files

Refactor screenshot logging in case of external display

This makes a few changes to make error logging more explicit in case of
connected displays.

- RequestProcessor now throws a typed exception, so we can avoid
catching unrelated errors in TakeScreenshotExecutor
- ScreenshotNotificationsController can be created only with a factory,
providing a displayId. The display ID is used to append "(External
Display)" string for error notifications happening on any display that
is not the default one.
- There can be a maximum of 2 error notifications: one for the default
display (as before), and another that is shown in case of any error in
any external display connected.
- Error reporting for ScreenshotData processing or ScreenshotController
issues has been completely moved to TakeScreenshotExecutor and scoped to
 display ID. TakeScreenshotService still reports some early failures
 unrelated to displays.
- As we can't specify the displayId in UiEventLogger: if the failure is
generic and we reach it from TakescreenshotService, only one
SCREENSHOT_REQUESTED_... is reported. However, if the screenshot request
 reaches TakeScreenshotExecutor, then one event per display will be
 reported.

Test: RequestProcessorTest, TakeScreenshotExecutorTest, TakeScreenshotServiceTest
Bug: 296575569
Bug: 290910794
Change-Id: If187e9713b344605466a2dcb78267ededccfcc85
parent a10767e3
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