Repository navigation
[net11] Re-apply the SystemUI emulation overlay when the status bar is shorter than the display cutout - #40765
Merged
Merged
Conversation
…s shorter than the display cutout On pixel_3_xl emulators (Material3, SafeAreaEdges), SystemUI sometimes keeps the status bar height it computed before its emulation overlay was re-applied at user unlock: the StatusBar window stays 84px while the display cutout is 171px for the whole run. Since #40603, Android screenshots are cropped by the reported status bar height, so every Material3 screenshot comes out 1440x2824 instead of the 1440x2737 baselines (413 failures in builds 1703317 and 1701569). Before each UI test attempt, compare the StatusBar window height to the display cutout top and, if shorter, disable and enable the enabled SystemUI emulation overlay, which makes SystemUI recompute the height. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
@dalexsoto stamp |
kubaflo
temporarily deployed
to
copilot-pat-pool
November 28, 2026 16:51 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kubaflo
temporarily deployed
to
copilot-pat-pool
November 28, 2026 16:51 — with
GitHub Actions
Inactive
kubaflo
had a problem deploying
to
copilot-pat-pool
November 28, 2026 16:52 — with
GitHub Actions
Failure
kubaflo
temporarily deployed
to
copilot-pat-pool
November 28, 2026 16:54 — with
GitHub Actions
Inactive
kubaflo
temporarily deployed
to
copilot-pat-pool
November 28, 2026 16:54 — with
GitHub Actions
Inactive
kubaflo
temporarily deployed
to
copilot-pat-pool
November 28, 2026 16:54 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Target Branch
mainnet11, for reviewFor .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.Description of Change
UI-test infrastructure fix (
eng/devices/android.cake). No product, test, baseline or tolerance changes.Symptom. Android Material3 (API 36,
pixel_3_xl) fails almost every screenshot test intermittently by boot. Build 1703317 (sr3) had 413 failures and 17 passes, and build 1701569 (sr4) failed the same way. Every failure isUnable to extract difference percentagefromsize differs (baseline 1440x2737, actual 1440x2824).Cause.
getSystemBars, read from theStatusBarwindow frame indumpsys window).sys.boot_completed. SystemUI sometimes recomputes its status bar height from the framework overlay before its own emulation overlay is re-applied, and keeps the stale 84px.Fix. Before each UI test attempt (
EnsureDeviceForUITestAttempt, which runs after APK install and the test build):com.android.systemui.emulation.*overlay is enabled, compare theStatusBarwindow height with thedumpsys displaycutout top.Devices without an emulation overlay, or without a top cutout, are untouched.
Local validation (
pixel_3_xlAVD, API 36, shell uid 2000):cmd overlay disable+enable com.android.internal.emulation.pixel_3_xldeterministically leaves the CI state: StatusBar[0,0][1440,84]withDisplayCutout{insets=Rect(0, 171 - 0, 0)}. This held 9/9 acrossgoogle_apisuserdebug andgoogle_apis_playstoreuser images, and the stale state persisted for over 30 s.dotnet cakewith the sameCake.Android.Adb3.2.0 addin on the CI-equivalentgoogle_apis_playstoreuser image:171px / 171pxand does nothing.84px / 171px, re-appliescom.android.systemui.emulation.pixel_3_xl, and reportsStatus bar height is 171px after 1 seconds.dotnet cake eng/devices/android.cakecompiles.Per repository policy, there are no tests for pipeline/device scripts. CI on this PR and the next Material3 runs are the end-to-end validation.
Issues Fixed
Fixes the Material3 Android screenshot-size failures seen after #40603 (builds 1703317 and 1701569).