-
- Downloads
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
Showing
- packages/SystemUI/res/values/strings.xml 2 additions, 0 deletionspackages/SystemUI/res/values/strings.xml
- packages/SystemUI/src/com/android/systemui/screenshot/RequestProcessor.kt 16 additions, 14 deletions...I/src/com/android/systemui/screenshot/RequestProcessor.kt
- packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java 2 additions, 2 deletions...com/android/systemui/screenshot/ScreenshotController.java
- packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java 0 additions, 96 deletions...ystemui/screenshot/ScreenshotNotificationsController.java
- packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.kt 111 additions, 0 deletions.../systemui/screenshot/ScreenshotNotificationsController.kt
- packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotServiceErrorReceiver.java 10 additions, 6 deletions...d/systemui/screenshot/ScreenshotServiceErrorReceiver.java
- packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt 59 additions, 21 deletions...com/android/systemui/screenshot/TakeScreenshotExecutor.kt
- packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java 14 additions, 10 deletions...om/android/systemui/screenshot/TakeScreenshotService.java
- packages/SystemUI/tests/src/com/android/systemui/screenshot/RequestProcessorTest.kt 6 additions, 8 deletions...c/com/android/systemui/screenshot/RequestProcessorTest.kt
- packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt 126 additions, 1 deletion...android/systemui/screenshot/TakeScreenshotExecutorTest.kt
- packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotServiceTest.kt 3 additions, 1 deletion.../android/systemui/screenshot/TakeScreenshotServiceTest.kt
- proto/src/system_messages.proto 4 additions, 0 deletionsproto/src/system_messages.proto
Loading
Please register or sign in to comment