[Implementation] Android system color should follow Maui bar colors - #35869
[Implementation] Android system color should follow Maui bar colors#35869Dhivya-SF4094 wants to merge 2 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35869Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35869" |
|
/review -b feature/enhanced-reviewer -p android |
kubaflo
left a comment
There was a problem hiding this comment.
Could you please check the ai's suggestions?
|
/review -b feature/enhanced-reviewer -p android |
|
@jfversluis we should target it to net11 don't you think? |
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 3 findings
See inline comments for details.
| //TODO : Make it public in NET 11. | ||
| internal static void ConfigureTranslucentSystemBars(this Window? window, Activity activity) | ||
| { | ||
| window.UpdateSystemBarAppearance(activity, updateStatusBar: true, updateNavigationBar: true); |
There was a problem hiding this comment.
[major] Safe Area / Platform-Specific Code — ConfigureTranslucentSystemBars is the startup-only icon-appearance initializer, but it now delegates to UpdateSystemBarAppearance which unconditionally calls UpdateSystemBarBackgrounds. On first call, UpdateSystemBarBackgrounds lazily captures the original bar colors, then immediately calls RestoreNavigationBarColor (because navigationBarBackgroundColor is null). RestoreNavigationBarColor substitutes the theme ColorBackground for any transparent (edge-to-edge, _navigationBarColor == 0) nav bar — so on Android 10–14 with gesture navigation, the nav bar transitions from transparent to the themed opaque color at app startup, before MAUI has set any chrome color.
The original ConfigureTranslucentSystemBars only set AppearanceLightStatusBars/AppearanceLightNavigationBars. This is a new regression for gesture-navigation apps on pre-15 devices.
Suggested fix: Either (a) do not call UpdateSystemBarBackgrounds from ConfigureTranslucentSystemBars — only apply the icon-appearance flags — or (b) add a skipBackgroundUpdate: true param that gates the background path so startup stays icon-only. The transparent-to-themed substitution should only fire on explicit MAUI clear-color paths.
| // Only substitute the transparent edge-to-edge default navigation bar color. | ||
| // Preserve any explicit captured native value (including opaque black 0xFF000000) | ||
| // so temporary MAUI overrides can be restored exactly. | ||
| if (_navigationBarColor == 0 && window.Context?.Theme is { } theme) |
There was a problem hiding this comment.
[major] Safe Area / Platform-Specific Code — The transparent-to-themed-color substitution at line 230–238 is intentional for the MAUI-clear-chrome path (user sets then clears BarBackgroundColor). However, because ConfigureTranslucentSystemBars (startup) also routes through RestoreNavigationBarColor, this code fires before MAUI has ever owned the navigation bar. There is no guard to distinguish "restoring after MAUI explicitly set a color" from "first-ever call with no MAUI ownership". A boolean flag on OriginalSystemBarColors (e.g., HasMauiSetNavigationBarColor) that is flipped when SetNavigationBarColor is called from MAUI and is checked here before doing the substitution would fix the dual-path problem without changing the restore semantics for explicit MAUI-clear operations.
| // 1) The developer hasn't touched the icon-appearance flags, so MAUI derives a readable | ||
| // icon style from the bar background. A light bar background needs dark icons, which | ||
| // maps to AppearanceLight*Bars == true. | ||
| platformWindow.UpdateSystemBarAppearance( |
There was a problem hiding this comment.
[minor] Regression Prevention — SystemBarIconAppearanceFollowsBarColorButRespectsDeveloperOverride calls UpdateSystemBarAppearance with Colors.LightGreen twice (lines 91–96 and 106–111), setting StatusBarColor and NavigationBarColor on the shared DefaultContext activity window. The test resets icon-appearance tracking (ResetSystemBarIconAppearanceTracking) but does not restore the original bar background colors, leaving LightGreen on the shared window after the test completes. If future sibling tests in WindowHandlerTests check bar colors on the same DefaultContext window they will see unexpected values. Capture the original bar colors before the first UpdateSystemBarAppearance call and restore them in a try/finally (or after the inner lambda) to keep the shared window clean.
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@Dhivya-SF4094 — new AI review results are available based on this last commit:
d9a75f0. To request a fresh review after new comments or commits, comment/review rerun.
🚀 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
🗂️ Review Sessions — click to expand
🧪 Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: ANDROID · Base: main · Merge base: 4567a055
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
📱 NavigationPageTests (BarBackgroundColorUpdatesAppBarStatusBarArea, BarBackgroundColorUpdatesAndroidNavigationBarOnInitialLoad) Category=NavigationPage |
🛠️ BUILD ERROR | ✅ PASS — 1481s |
📱 TabbedPageTests (TopTabbedPageBarBackgroundColorAppliedOnInitialLoad, TopTabbedPageBarBackgroundColorColorsAppBarStatusBarArea) Category=TabbedPage |
🛠️ BUILD ERROR | ✅ PASS — 307s |
📱 WindowHandlerTests (SystemBarIconAppearanceFollowsBarColorButRespectsDeveloperOverride) Category=Window |
🛠️ BUILD ERROR | ✅ PASS — 320s |
🔴 Without fix — 📱 NavigationPageTests (BarBackgroundColorUpdatesAppBarStatusBarArea, BarBackgroundColorUpdatesAndroidNavigationBarOnInitialLoad): 🛠️ BUILD ERROR · 266s
Determining projects to restore...
Restored /home/vsts/work/1/s/src/TestUtils/src/DeviceTests/TestUtils.DeviceTests.csproj (in 8.65 sec).
Restored /home/vsts/work/1/s/src/Core/src/Core.csproj (in 8.75 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/DeviceTests.Runners/TestUtils.DeviceTests.Runners.csproj (in 1.44 sec).
Restored /home/vsts/work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 11 ms).
Restored /home/vsts/work/1/s/src/Essentials/src/Essentials.csproj (in 19 ms).
Restored /home/vsts/work/1/s/src/Core/tests/DeviceTests.Shared/Core.DeviceTests.Shared.csproj (in 62 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/DeviceTests.Runners.SourceGen/TestUtils.DeviceTests.Runners.SourceGen.csproj (in 2.34 sec).
Restored /home/vsts/work/1/s/src/Core/maps/src/Maps.csproj (in 1.66 sec).
Restored /home/vsts/work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 70 ms).
Restored /home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 82 ms).
Restored /home/vsts/work/1/s/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj (in 1.34 sec).
Restored /home/vsts/work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 71 ms).
Restored /home/vsts/work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 51 ms).
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Release/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Release/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Release/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extension method 'UpdateSystemBarAppearance' accepting a first argument of type 'Window' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
TestUtils.DeviceTests -> /home/vsts/work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-android/Microsoft.Maui.TestUtils.DeviceTests.dll
Build FAILED.
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extension method 'UpdateSystemBarAppearance' accepting a first argument of type 'Window' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
0 Warning(s)
1 Error(s)
Time Elapsed 00:04:05.77
🟢 With fix — 📱 NavigationPageTests (BarBackgroundColorUpdatesAppBarStatusBarArea, BarBackgroundColorUpdatesAndroidNavigationBarOnInitialLoad): PASS ✅ · 1481s
(truncated to last 15,000 chars)
wModelSavedState.Android.dll -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState.Android.dll.so
[124/133] System.Threading.dll -> System.Threading.dll.so
[125/133] System.Xml.Linq.dll -> System.Xml.Linq.dll.so
[47/133] Xamarin.AndroidX.Loader.dll -> Xamarin.AndroidX.Loader.dll.so
[126/133] System.Xml.ReaderWriter.dll -> System.Xml.ReaderWriter.dll.so
[127/133] System.Xml.XDocument.dll -> System.Xml.XDocument.dll.so
[128/133] System.dll -> System.dll.so
[48/133] Xamarin.AndroidX.Navigation.Common.Android.dll -> Xamarin.AndroidX.Navigation.Common.Android.dll.so
[129/133] netstandard.dll -> netstandard.dll.so
[130/133] Mono.Android.Runtime.dll -> Mono.Android.Runtime.dll.so
[49/133] Xamarin.AndroidX.Navigation.Fragment.dll -> Xamarin.AndroidX.Navigation.Fragment.dll.so
[50/133] Xamarin.AndroidX.Navigation.Runtime.Android.dll -> Xamarin.AndroidX.Navigation.Runtime.Android.dll.so
[131/133] Java.Interop.dll -> Java.Interop.dll.so
[51/133] Xamarin.AndroidX.Navigation.UI.dll -> Xamarin.AndroidX.Navigation.UI.dll.so
[52/133] Xamarin.AndroidX.RecyclerView.dll -> Xamarin.AndroidX.RecyclerView.dll.so
[53/133] Xamarin.AndroidX.SavedState.SavedState.Android.dll -> Xamarin.AndroidX.SavedState.SavedState.Android.dll.so
[54/133] Xamarin.AndroidX.SwipeRefreshLayout.dll -> Xamarin.AndroidX.SwipeRefreshLayout.dll.so
[55/133] Xamarin.AndroidX.ViewPager.dll -> Xamarin.AndroidX.ViewPager.dll.so
[56/133] Xamarin.AndroidX.ViewPager2.dll -> Xamarin.AndroidX.ViewPager2.dll.so
[132/133] Mono.Android.dll -> Mono.Android.dll.so
[57/133] Xamarin.Google.Android.Material.dll -> Xamarin.Google.Android.Material.dll.so
[58/133] Xamarin.GooglePlayServices.Base.dll -> Xamarin.GooglePlayServices.Base.dll.so
[59/133] Xamarin.GooglePlayServices.Basement.dll -> Xamarin.GooglePlayServices.Basement.dll.so
[60/133] Xamarin.GooglePlayServices.Maps.dll -> Xamarin.GooglePlayServices.Maps.dll.so
[61/133] Xamarin.GooglePlayServices.Tasks.dll -> Xamarin.GooglePlayServices.Tasks.dll.so
[62/133] Xamarin.Kotlin.StdLib.dll -> Xamarin.Kotlin.StdLib.dll.so
[63/133] Xamarin.KotlinX.Coroutines.Core.Jvm.dll -> Xamarin.KotlinX.Coroutines.Core.Jvm.dll.so
[64/133] Xamarin.KotlinX.Serialization.Core.Jvm.dll -> Xamarin.KotlinX.Serialization.Core.Jvm.dll.so
[65/133] xunit.abstractions.dll -> xunit.abstractions.dll.so
[66/133] xunit.assert.dll -> xunit.assert.dll.so
[67/133] xunit.core.dll -> xunit.core.dll.so
[68/133] xunit.execution.dotnet.dll -> xunit.execution.dotnet.dll.so
[69/133] xunit.runner.utility.netcoreapp10.dll -> xunit.runner.utility.netcoreapp10.dll.so
[70/133] System.Collections.Concurrent.dll -> System.Collections.Concurrent.dll.so
[71/133] System.Collections.Immutable.dll -> System.Collections.Immutable.dll.so
[133/133] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
[72/133] System.Collections.NonGeneric.dll -> System.Collections.NonGeneric.dll.so
[73/133] System.Collections.Specialized.dll -> System.Collections.Specialized.dll.so
[74/133] System.Collections.dll -> System.Collections.dll.so
[75/133] System.ComponentModel.Primitives.dll -> System.ComponentModel.Primitives.dll.so
[76/133] System.ComponentModel.TypeConverter.dll -> System.ComponentModel.TypeConverter.dll.so
[77/133] System.ComponentModel.dll -> System.ComponentModel.dll.so
[78/133] System.Console.dll -> System.Console.dll.so
[79/133] System.Diagnostics.Debug.dll -> System.Diagnostics.Debug.dll.so
[80/133] System.Diagnostics.DiagnosticSource.dll -> System.Diagnostics.DiagnosticSource.dll.so
[81/133] System.Diagnostics.Process.dll -> System.Diagnostics.Process.dll.so
[82/133] System.Diagnostics.Tools.dll -> System.Diagnostics.Tools.dll.so
[83/133] System.Diagnostics.TraceSource.dll -> System.Diagnostics.TraceSource.dll.so
[84/133] System.Diagnostics.Tracing.dll -> System.Diagnostics.Tracing.dll.so
[85/133] System.Drawing.Primitives.dll -> System.Drawing.Primitives.dll.so
[86/133] System.Drawing.dll -> System.Drawing.dll.so
[87/133] System.Formats.Asn1.dll -> System.Formats.Asn1.dll.so
[88/133] System.Globalization.dll -> System.Globalization.dll.so
[89/133] System.IO.Compression.Brotli.dll -> System.IO.Compression.Brotli.dll.so
[90/133] System.IO.Compression.dll -> System.IO.Compression.dll.so
[91/133] System.IO.FileSystem.dll -> System.IO.FileSystem.dll.so
[92/133] System.IO.Pipelines.dll -> System.IO.Pipelines.dll.so
[93/133] System.IO.dll -> System.IO.dll.so
[94/133] System.Linq.Expressions.dll -> System.Linq.Expressions.dll.so
[95/133] System.Linq.dll -> System.Linq.dll.so
[96/133] System.Memory.dll -> System.Memory.dll.so
[97/133] System.Net.Http.dll -> System.Net.Http.dll.so
[98/133] System.Net.NameResolution.dll -> System.Net.NameResolution.dll.so
[99/133] System.Net.Primitives.dll -> System.Net.Primitives.dll.so
[100/133] System.Net.Requests.dll -> System.Net.Requests.dll.so
[101/133] System.Net.Sockets.dll -> System.Net.Sockets.dll.so
[102/133] System.Numerics.Vectors.dll -> System.Numerics.Vectors.dll.so
[103/133] System.ObjectModel.dll -> System.ObjectModel.dll.so
[104/133] System.Private.Uri.dll -> System.Private.Uri.dll.so
[105/133] System.Private.Xml.Linq.dll -> System.Private.Xml.Linq.dll.so
[106/133] System.Private.Xml.dll -> System.Private.Xml.dll.so
[107/133] System.Reflection.Extensions.dll -> System.Reflection.Extensions.dll.so
[108/133] System.Reflection.TypeExtensions.dll -> System.Reflection.TypeExtensions.dll.so
[109/133] System.Reflection.dll -> System.Reflection.dll.so
[110/133] System.Runtime.Extensions.dll -> System.Runtime.Extensions.dll.so
[111/133] System.Runtime.InteropServices.RuntimeInformation.dll -> System.Runtime.InteropServices.RuntimeInformation.dll.so
[112/133] System.Runtime.InteropServices.dll -> System.Runtime.InteropServices.dll.so
[113/133] System.Runtime.Loader.dll -> System.Runtime.Loader.dll.so
[114/133] System.Runtime.Numerics.dll -> System.Runtime.Numerics.dll.so
[115/133] System.Runtime.dll -> System.Runtime.dll.so
[116/133] System.Security.Cryptography.dll -> System.Security.Cryptography.dll.so
[117/133] System.Text.Encoding.dll -> System.Text.Encoding.dll.so
[118/133] System.Text.Encodings.Web.dll -> System.Text.Encodings.Web.dll.so
[119/133] System.Text.Json.dll -> System.Text.Json.dll.so
[120/133] System.Text.RegularExpressions.dll -> System.Text.RegularExpressions.dll.so
[121/133] System.Threading.Tasks.dll -> System.Threading.Tasks.dll.so
[122/133] System.Threading.Thread.dll -> System.Threading.Thread.dll.so
[123/133] System.Threading.ThreadPool.dll -> System.Threading.ThreadPool.dll.so
[124/133] System.Threading.dll -> System.Threading.dll.so
[125/133] System.Xml.Linq.dll -> System.Xml.Linq.dll.so
[126/133] System.Xml.ReaderWriter.dll -> System.Xml.ReaderWriter.dll.so
[127/133] System.Xml.XDocument.dll -> System.Xml.XDocument.dll.so
[128/133] System.dll -> System.dll.so
[129/133] netstandard.dll -> netstandard.dll.so
[130/133] Java.Interop.dll -> Java.Interop.dll.so
[131/133] Mono.Android.Runtime.dll -> Mono.Android.Runtime.dll.so
[132/133] Mono.Android.dll -> Mono.Android.dll.so
[133/133] System.Private.CoreLib.dll -> System.Private.CoreLib.dll.so
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:07:31.15
[11.0.0-prerelease.26230.4+92962e5c46ac08a66ded4c5696209cc60f1a232f] XHarness command issued: android test --app /home/vsts/work/1/s/artifacts/bin/Controls.DeviceTests/Release/net10.0-android/com.microsoft.maui.controls.devicetests-Signed.apk --package-name com.microsoft.maui.controls.devicetests --device-id emulator-5554 -o artifacts/log --timeout 01:00:00 -v --arg TestFilter=Category=NavigationPage
�[40m�[37mdbug�[39m�[22m�[49m: ADBRunner using ADB.exe supplied from /home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/tools/net10.0/any/../../../runtimes/any/native/adb/linux/adb
�[40m�[37mdbug�[39m�[22m�[49m: Full resolved path:'/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb'
�[40m�[32minfo�[39m�[22m�[49m: Will attempt to find device supporting architectures: 'arm64-v8a', 'x86_64'
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb start-server'
�[40m�[37mdbug�[39m�[22m�[49m:
�[40m�[32minfo�[39m�[22m�[49m: Finding attached devices/emulators...
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb devices -l'
�[40m�[37mdbug�[39m�[22m�[49m: Found 1 possible devices
�[40m�[37mdbug�[39m�[22m�[49m: Evaluating output line for device serial: emulator-5554 device product:sdk_gphone_x86_64 model:sdk_gphone_x86_64 device:generic_x86_64_arm64 transport_id:1
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 shell getprop ro.product.cpu.abilist'
�[40m�[37mdbug�[39m�[22m�[49m: Found 1 possible devices. Using 'emulator-5554'
�[40m�[32minfo�[39m�[22m�[49m: Active Android device set to serial 'emulator-5554'
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 -s emulator-5554 shell getprop ro.product.cpu.abi'
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 -s emulator-5554 shell getprop ro.build.version.sdk'
�[40m�[32minfo�[39m�[22m�[49m: Waiting for device to be available (max 5 minutes)
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 wait-for-device'
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 -s emulator-5554 shell getprop sys.boot_completed'
�[40m�[37mdbug�[39m�[22m�[49m: sys.boot_completed = '1'
�[40m�[37mdbug�[39m�[22m�[49m: Waited 0 seconds for device boot completion
�[40m�[37mdbug�[39m�[22m�[49m: Working with emulator-5554 (API 30)
�[40m�[37mdbug�[39m�[22m�[49m: Check current adb install and/or package verification settings
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 shell settings get global verifier_verify_adb_installs'
�[40m�[37mdbug�[39m�[22m�[49m: verifier_verify_adb_installs = 0
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 shell settings get global package_verifier_enable'
�[40m�[37mdbug�[39m�[22m�[49m: package_verifier_enable =
�[40m�[1m�[33mwarn�[39m�[22m�[49m: Installing debug apks on a device might be rejected with INSTALL_FAILED_VERIFICATION_FAILURE. Make sure to set 'package_verifier_enable' to '0'
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[41m�[30mfail�[39m�[22m�[49m: Waiting for command timed out: execution may be compromised
�[41m�[30mfail�[39m�[22m�[49m: Error: Exit code: -2
Std out:
�[40m�[32minfo�[39m�[22m�[49m: Attempting to install /home/vsts/work/1/s/artifacts/bin/Controls.DeviceTests/Release/net10.0-android/com.microsoft.maui.controls.devicetests-Signed.apk
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 install /home/vsts/work/1/s/artifacts/bin/Controls.DeviceTests/Release/net10.0-android/com.microsoft.maui.controls.devicetests-Signed.apk'
�[41m�[30mfail�[39m�[22m�[49m: Waiting for command timed out: execution may be compromised
�[40m�[1m�[33mwarn�[39m�[22m�[49m: Installation failed; Will make one attempt to restart ADB server and the device, then retry the install
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 kill-server'
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 start-server'
�[40m�[37mdbug�[39m�[22m�[49m:
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 reboot'
�[41m�[1m�[37mcrit�[39m�[22m�[49m: Failed to reboot the device
Exit code: 1
Std out:
Std err:
error: device offline
Microsoft.DotNet.XHarness.Android.AdbFailureException: Failed to reboot the device
Exit code: 1
Std out:
Std err:
error: device offline
at Microsoft.DotNet.XHarness.Android.Execution.ProcessExecutionResults.ThrowIfFailed(String failureMessage) in /_/src/Microsoft.DotNet.XHarness.Android/Execution/IAdbProcessManager.cs:line 24
at Microsoft.DotNet.XHarness.Android.AdbRunner.RebootAndroidDevice() in /_/src/Microsoft.DotNet.XHarness.Android/AdbRunner.cs:line 130
at Microsoft.DotNet.XHarness.Android.AdbRunner.InstallApk(String apkPath) in /_/src/Microsoft.DotNet.XHarness.Android/AdbRunner.cs:line 690
at Microsoft.DotNet.XHarness.CLI.Commands.Android.AndroidInstallCommand.InvokeHelper(ILogger logger, String apkPackageName, String appPackagePath, IReadOnlyCollection`1 requestedArchitectures, String deviceId, Nullable`1 apiVersion, TimeSpan bootTimeoutSeconds, AdbRunner runner, IDiagnosticsData diagnosticsData) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/Android/AndroidInstallCommand.cs:line 138
at Microsoft.DotNet.XHarness.CLI.Commands.Android.AndroidTestCommand.InvokeCommand(ILogger logger) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/Android/AndroidTestCommand.cs:line 42
at Microsoft.DotNet.XHarness.CLI.Android.AndroidCommand`1.InvokeInternal(ILogger logger) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/Android/AndroidCommand.cs:line 32
XHarness exit code: 91 (ADB_FAILURE)
Tests completed with exit code: 91
🔴 Without fix — 📱 TabbedPageTests (TopTabbedPageBarBackgroundColorAppliedOnInitialLoad, TopTabbedPageBarBackgroundColorColorsAppBarStatusBarArea): 🛠️ BUILD ERROR · 67s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Release/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Release/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Release/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extension method 'UpdateSystemBarAppearance' accepting a first argument of type 'Window' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
TestUtils.DeviceTests -> /home/vsts/work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-android/Microsoft.Maui.TestUtils.DeviceTests.dll
Build FAILED.
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extension method 'UpdateSystemBarAppearance' accepting a first argument of type 'Window' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
0 Warning(s)
1 Error(s)
Time Elapsed 00:01:02.27
🟢 With fix — 📱 TabbedPageTests (TopTabbedPageBarBackgroundColorAppliedOnInitialLoad, TopTabbedPageBarBackgroundColorColorsAppBarStatusBarArea): PASS ✅ · 307s
(truncated to last 15,000 chars)
ET : [FILTER] Included test (filtered by Trait; 'Category':'WebView'): [Memory] VisualDiagnosticsOverlay Does Not Leak
06-20 13:08:46.199 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Window'): [Memory] VisualDiagnosticsOverlay Does Not Leak
06-20 13:08:46.199 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'WindowOverlay'): [Memory] VisualDiagnosticsOverlay Does Not Leak
06-20 13:08:46.199 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Xaml'): [Memory] VisualDiagnosticsOverlay Does Not Leak
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Accessibility'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Application'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Behavior'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Border'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'BoxView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Button'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'CarouselView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'CheckBox'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'CollectionView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Compatibility'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ContentView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'DatePicker'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Dispatcher'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Editor'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Element'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Entry'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'FlexLayout'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'FlyoutPage'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Frame'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Gesture'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'HybridWebView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Image'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Label'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Layout'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Lifecycle'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ListView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Map'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'MenuFlyout'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Mapper'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Excluded test (filtered by Trait; 'Category':'Memory'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Modal'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'NavigationPage'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Path'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Picker'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ScrollView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'SearchBar'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Shape'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Shell'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Slider'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'SwipeView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'TextInput'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Toolbar'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'TemplatedView'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'View'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'VisualElement'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.200 6333 6364 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'VisualElementTree'): [Memory] TweenersWillNotLeakDuringInfiniteAnimation
06-20 13:08:46.226 6333 6364 I DOTNET : [Test environment: 64-bit .NET .NET 10.0 [collection-per-class, non-parallel]]
06-20 13:08:46.226 6333 6364 I DOTNET : [Test framework: xUnit.net 2.9.0.0]
06-20 13:08:46.241 6333 6364 I DOTNET : Test collection for Microsoft.Maui.DeviceTests.TabbedPageTests
06-20 13:08:47.071 6333 6374 I DOTNET : [PASS] SettingJustSelectedATabColorOnBottomTabsDoesntCrash
06-20 13:08:51.296 6333 6381 I DOTNET : [PASS] Bar Text Color
06-20 13:08:51.770 6333 6386 I DOTNET : [PASS] ChangingBottomTabAttributesDoesntRecreateBottomTabs
06-20 13:08:51.839 6333 6391 I DOTNET : [PASS] ScaleConsistent
06-20 13:08:52.070 6333 6396 I DOTNET : [PASS] TopTabbedPageBarBackgroundColorAppliedOnInitialLoad
06-20 13:09:00.447 6333 6412 I DOTNET : [PASS] Selected/Unselected Color
06-20 13:09:00.768 6333 6417 I DOTNET : [PASS] SettingCurrentPageToNotBePositionZeroWorks
06-20 13:09:00.996 6333 6422 I DOTNET : [PASS] SettingCurrentPageToNotBePositionZeroWorks
06-20 13:09:01.214 6333 6427 I DOTNET : [PASS] SettingCurrentPageToNotBePositionZeroWorks
06-20 13:09:01.420 6333 6432 I DOTNET : [PASS] SettingCurrentPageToNotBePositionZeroWorks
06-20 13:09:01.449 6333 6438 I DOTNET : [PASS] RotationYConsistent
06-20 13:09:01.455 6333 6438 I DOTNET : [PASS] RotationXConsistent
06-20 13:09:02.240 6333 6445 I DOTNET : [PASS] NavigatingAwayFromTabbedPageResizesContentPage
06-20 13:09:02.854 6333 6450 I DOTNET : [PASS] NavigatingAwayFromTabbedPageResizesContentPage
06-20 13:09:02.881 6333 6450 I DOTNET : [PASS] ScaleXConsistent
06-20 13:09:12.019 6333 6458 I DOTNET : [PASS] MovingBetweenMultiplePagesWithNestedNavigationPages
06-20 13:09:19.464 6333 6463 I DOTNET : [PASS] MovingBetweenMultiplePagesWithNestedNavigationPages
06-20 13:09:27.001 6333 6468 I DOTNET : [PASS] MovingBetweenMultiplePagesWithNestedNavigationPages
06-20 13:09:36.601 6333 6473 I DOTNET : [PASS] MovingBetweenMultiplePagesWithNestedNavigationPages
06-20 13:09:36.964 6333 6478 I DOTNET : [PASS] BottomNavigationViewExtendsToScreenBottom
06-20 13:09:39.100 6333 6483 I DOTNET : [PASS] Does Not Leak
06-20 13:09:39.270 6333 6488 I DOTNET : [PASS] TopTabbedPageBarBackgroundColorColorsAppBarStatusBarArea
06-20 13:09:42.827 6333 6494 I DOTNET : [PASS] DisconnectEachPageHandlerAfterNavigation
06-20 13:09:45.455 6333 6502 I DOTNET : [PASS] DisconnectEachPageHandlerAfterNavigation
06-20 13:09:48.162 6333 6507 I DOTNET : [PASS] DisconnectEachPageHandlerAfterNavigation
06-20 13:09:51.983 6333 6513 I DOTNET : [PASS] DisconnectEachPageHandlerAfterNavigation
06-20 13:09:52.298 6333 6518 I DOTNET : [PASS] Custom RecyclerView Adapter Doesn't Crash
06-20 13:09:52.321 6333 6518 I DOTNET : [PASS] RotationConsistent
06-20 13:09:52.367 6333 6518 I DOTNET : [PASS] ScaleYConsistent
06-20 13:09:52.520 6333 6523 I DOTNET : [PASS] Using SelectedTab Color doesnt crash
06-20 13:09:53.069 6333 6528 I DOTNET : [PASS] RemovingAllPagesDoesntCrash
06-20 13:09:53.637 6333 6533 I DOTNET : [PASS] RemovingAllPagesDoesntCrash
06-20 13:09:54.129 6333 6538 I DOTNET : [PASS] RemovingAllPagesDoesntCrash
06-20 13:09:54.711 6333 6543 I DOTNET : [PASS] RemovingAllPagesDoesntCrash
06-20 13:09:55.738 6333 6548 I DOTNET : [PASS] PoppingTabbedPageDoesntCrash
06-20 13:09:56.658 6333 6553 I DOTNET : [PASS] PoppingTabbedPageDoesntCrash
06-20 13:09:57.711 6333 6558 I DOTNET : [PASS] PoppingTabbedPageDoesntCrash
06-20 13:09:58.551 6333 6564 I DOTNET : [PASS] PoppingTabbedPageDoesntCrash
06-20 13:09:59.447 6333 6572 I DOTNET : [PASS] Remove CurrentPage And Then Re-Add Doesnt Crash
06-20 13:10:00.158 6333 6580 I DOTNET : [PASS] Remove CurrentPage And Then Re-Add Doesnt Crash
06-20 13:10:00.913 6333 6585 I DOTNET : [PASS] Remove CurrentPage And Then Re-Add Doesnt Crash
06-20 13:10:01.759 6333 6590 I DOTNET : [PASS] Remove CurrentPage And Then Re-Add Doesnt Crash
06-20 13:10:01.776 6333 6590 I DOTNET : Microsoft.Maui.DeviceTests.TabbedPageTests 75.2318356 ms
06-20 13:10:01.784 6333 6590 I DOTNET : Test collection for Microsoft.Maui.DeviceTests.AlertDialogTests
06-20 13:10:01.815 6333 6590 I DOTNET : [PASS] AlertDialogButtonColorDarkTheme
06-20 13:10:01.868 6333 6590 I DOTNET : [PASS] AlertDialogButtonColorLightTheme
06-20 13:10:01.868 6333 6590 I DOTNET : Microsoft.Maui.DeviceTests.AlertDialogTests 0.0834951 ms
06-20 13:10:01.989 6333 6364 I DOTNET : Xml file was written to the provided writer.
06-20 13:10:01.990 6333 6364 I DOTNET : Tests run: 593 Passed: 44 Inconclusive: 0 Failed: 0 Ignored: 549
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
{
"version": 1,
"machineName": "runnervmx1lvo",
"exitCode": 0,
"exitCodeName": "SUCCESS",
"platform": "android",
"instrumentationExitCode": 0,
"device": "emulator-5554",
"deviceOsVersion": "API 30",
"architecture": "x86_64",
"files": [
{
"name": "testResults.xml",
"type": "test-results"
},
{
"name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
"type": "logcat"
}
]
}
<<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 0
Tests completed successfully
🔴 Without fix — 📱 WindowHandlerTests (SystemBarIconAppearanceFollowsBarColorButRespectsDeveloperOverride): 🛠️ BUILD ERROR · 62s
Determining projects to restore...
Restored /home/vsts/work/1/s/src/Core/tests/DeviceTests/Core.DeviceTests.csproj (in 462 ms).
10 of 11 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Release/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Release/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Release/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
TestUtils.DeviceTests -> /home/vsts/work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-android/Microsoft.Maui.TestUtils.DeviceTests.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14439164
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extension method 'UpdateSystemBarAppearance' accepting a first argument of type 'Window' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
Build FAILED.
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extension method 'UpdateSystemBarAppearance' accepting a first argument of type 'Window' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:57.75
🟢 With fix — 📱 WindowHandlerTests (SystemBarIconAppearanceFollowsBarColorButRespectsDeveloperOverride): PASS ✅ · 320s
(truncated to last 15,000 chars)
7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'SwipeView'): [Label] Font Family and Weight Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Switch'): [Label] Font Family and Weight Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Formatting'): [Label] Font Family and Weight Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'TimePicker'): [Label] Font Family and Weight Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'View'): [Label] Font Family and Weight Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'WebView'): [Label] Font Family and Weight Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'MauiContext'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Application'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'BoxView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'WindowOverlay'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ActivityIndicator'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Border'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Button'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'CheckBox'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ContentView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Element'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'DatePicker'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Dispatcher'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Editor'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Entry'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'FlowDirection'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'FlyoutView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Fonts'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Graphics'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'GraphicsView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Image'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ImageButton'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ImageSource'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'IndicatorView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Label'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Layout'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Memory'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'NavigationPage'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Excluded test (filtered by Trait; 'Category':'Picker'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ProgressBar'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ScrollView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'SearchBar'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ShapeView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Slider'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Stepper'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'SwipeView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Switch'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Formatting'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'TimePicker'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'View'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.007 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'WebView'): [Picker] Font Family Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'MauiContext'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Application'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'BoxView'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'WindowOverlay'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ActivityIndicator'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Border'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Button'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'CheckBox'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ContentView'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Element'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'DatePicker'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Dispatcher'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Editor'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Entry'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'FlowDirection'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'FlyoutView'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Fonts'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Graphics'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'GraphicsView'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Image'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ImageButton'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ImageSource'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'IndicatorView'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Label'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Layout'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Memory'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'NavigationPage'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Excluded test (filtered by Trait; 'Category':'Picker'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'ProgressBar'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.008 7162 7192 I DOTNET : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Picker] Font Size Initializes Correctly
06-20 13:15:23.040 7162 7192 I DOTNET : [Test environment: 64-bit .NET .NET 10.0 [collection-per-class, non-parallel]]
06-20 13:15:23.040 7162 7192 I DOTNET : [Test framework: xUnit.net 2.9.0.0]
06-20 13:15:23.052 7162 7192 I DOTNET : Test collection for Microsoft.Maui.DeviceTests.WindowHandlerTests
06-20 13:15:23.120 7162 7192 I DOTNET : [PASS] SystemBarIconAppearanceFollowsBarColorButRespectsDeveloperOverride
06-20 13:15:23.206 7162 7192 I DOTNET : [PASS] TitleSetsOnWindow
06-20 13:15:23.222 7162 7192 I DOTNET : [PASS] UsingTheSameWindowThrowsInvalidOperationException
06-20 13:15:23.225 7162 7192 I DOTNET : Microsoft.Maui.DeviceTests.WindowHandlerTests 0.0780826 ms
06-20 13:15:23.259 7162 7192 I DOTNET : Xml file was written to the provided writer.
06-20 13:15:23.260 7162 7192 I DOTNET : Tests run: 1280 Passed: 3 Inconclusive: 0 Failed: 0 Ignored: 1277
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
{
"version": 1,
"machineName": "runnervmx1lvo",
"exitCode": 0,
"exitCodeName": "SUCCESS",
"platform": "android",
"instrumentationExitCode": 0,
"device": "emulator-5554",
"deviceOsVersion": "API 30",
"architecture": "x86_64",
"files": [
{
"name": "testResults.xml",
"type": "test-results"
},
{
"name": "adb-logcat-com.microsoft.maui.core.devicetests-default.log",
"type": "logcat"
}
]
}
<<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.core.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.core.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.core.devicetests
XHarness exit code: 0
Tests completed successfully
⚠️ Failure Details
- 🛠️ NavigationPageTests (BarBackgroundColorUpdatesAppBarStatusBarArea, BarBackgroundColorUpdatesAndroidNavigationBarOnInitialLoad) without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extens...
- 🛠️ TabbedPageTests (TopTabbedPageBarBackgroundColorAppliedOnInitialLoad, TopTabbedPageBarBackgroundColorColorsAppBarStatusBarArea) without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extens...
- 🛠️ WindowHandlerTests (SystemBarIconAppearanceFollowsBarColorButRespectsDeveloperOverride) without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs(113,11): error CS1061: 'Window' does not contain a definition for 'UpdateSystemBarAppearance' and no accessible extens...
📁 Fix files reverted (8 files)
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellBottomNavViewAppearanceTracker.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellTabLayoutAppearanceTracker.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellToolbarAppearanceTracker.cssrc/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cssrc/Controls/src/Core/Platform/Android/TabbedPageManager.cssrc/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cssrc/Controls/src/Core/Toolbar/Toolbar.Android.cssrc/Core/src/Platform/Android/WindowExtensions.cs
New files (not reverted):
src/Controls/src/Core/Platform/Android/AndroidSystemChrome.cs
📱 UI Tests — ViewBaseTests
Detected UI test categories: ViewBaseTests
❌ Deep UI tests — 116 passed, 2 failed across 1 category on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
ViewBaseTests |
116/119 (2 ❌) | 2 diff PNGs |
❌ ViewBaseTests — 2 failed tests
VerifyBackgroundColorSet
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyBackgroundColorSet.png (1.02% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nulla
...
VerifyBackgroundColorCleared
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyBackgroundColorCleared.png (1.02% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, N
...
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
🛫 Pre-Flight — Context & Validation
Issue: N/A - No linked issue found in PR metadata
PR: #35869 - [Implementation] Android system color should follow Maui bar colors
Platforms Affected: Android
Files Changed: 9 implementation, 3 test
Key Findings
- PR adds centralized Android system chrome synchronization across Shell, NavigationPage/Toolbar, TabbedPage, modal navigation, and core Window system-bar helpers.
- Prompt-provided gate result: tests fail without a fix and pass with the PR fix; gate was not rerun.
- Public PR comments include
/review -b feature/enhanced-reviewer -p androidrequests and a question about targeting net11; no inline review comments were available via unauthenticated public API. - Code review found a startup-path regression risk: initial translucent system bar configuration can restore/write opaque system bar colors before MAUI owns them.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 2 | Suggestions: 0
Key code review findings:
- ❌
WindowExtensions.ConfigureTranslucentSystemBarsnow writes/restores system bar background colors on startup; for transparent gesture navigation this can substitute theme background before MAUI owns the nav bar color. ⚠️ TabbedPageManager.GetEffectiveBarBackground()returnsnulldespite a non-nullableBrushsignature in nullable-disabled code.⚠️ Toolbar mapper paths can redundantly call chrome updates during initialization.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #35869 | Central AndroidSystemChrome helper integrated across Shell/Toolbar/TabbedPage/Modal plus WindowExtensions ownership tracking |
✅ PASSED (Gate) | AndroidSystemChrome.cs, WindowExtensions.cs, navigation/tab/modal/toolbar Android files, device tests |
Original PR |
🔬 Code Review — Deep Analysis
Code Review — PR #35869
Independent Assessment
What this changes: Introduces AndroidSystemChrome, a centralized static helper that updates Android status bar and navigation bar appearance based on MAUI bar/background colors. It wires the helper into Shell toolbar/tab/bottom-nav trackers, TabbedPageManager, ModalNavigationManager, Toolbar.Android, and ToolbarExtensions, and expands WindowExtensions.ConfigureTranslucentSystemBars to update system bar backgrounds and icon contrast with ownership tracking.
Inferred motivation: Android system chrome does not consistently follow MAUI navigation/tab/toolbar colors, breaking visual consistency on edge-to-edge Android displays.
Reconciliation with PR Narrative
Author claims: The PR centralizes system chrome updates, integrates the behavior across navigation, tabbed, toolbar, Shell, and modal flows, preserves explicit developer runtime overrides, and adds Android device tests.
Agreement/disagreement: The description matches the implementation. The main disagreement is risk severity: routing startup ConfigureTranslucentSystemBars through background restore logic may alter transparent gesture-navigation defaults even when MAUI has not set a bar color.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
| Implementation overwrote developer icon-appearance overrides | Prior automated review noted by code-review sub-agent | ✅ Fixed | WindowExtensions.cs tracks last MAUI-written light status/navigation values and preserves divergent out-of-band values. |
Blast Radius Assessment
- Runs for all instances: Yes.
ConfigureTranslucentSystemBarsis called by Android window startup paths for all apps on API 30+. - Startup impact: Yes. The PR changes startup behavior from icon flags only to also restoring/writing system bar background colors.
- Static/shared state: Yes, but keyed through
ConditionalWeakTable<Window, ...>/ConditionalWeakTable<AppBarLayout, ...>, so entries are weakly scoped to platform instances.
CI Status
- Required-check result: undetermined;
ghCLI is unauthenticated in this environment. - Classification: undetermined.
- Action taken: confidence capped low. The prompt-provided gate says targeted tests fail without the fix and pass with the PR fix.
Findings
❌ Error — Startup system-bar restore can make transparent gesture navigation opaque
src/Core/src/Platform/Android/WindowExtensions.cs:54-57 routes initial API 30+ startup configuration through UpdateSystemBarAppearance(..., updateNavigationBar: true) with no MAUI navigation-bar color. That invokes restore logic before MAUI has ever owned the navigation bar color. If the original Android navigation bar color is transparent (0), RestoreNavigationBarColor substitutes the theme background color, which can make gesture navigation opaque for plain ContentPage apps or cause a startup flicker before later NavigationPage/TabbedPage updates.
⚠️ Warning — Nullable contract mismatch in GetEffectiveBarBackground
src/Controls/src/Core/Platform/Android/TabbedPageManager.cs has Brush GetEffectiveBarBackground() returning null when no background is set. The file has nullable disabled, so it compiles, but the contract is misleading for future maintenance.
⚠️ Warning — Toolbar initialization repeats system chrome updates
src/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cs updates system chrome from background, text, and icon mapper paths, causing redundant UI-thread work during common toolbar initialization. This is a performance/efficiency concern, not the root functional bug.
Failure-Mode Probing
- Plain API 30+ app with no navigation/tab/shell bar: startup path still runs and may write an opaque navigation bar even though no MAUI bar color exists.
- NavigationPage/TabbedPage/Shell: later chrome updates can correct the color, but initial frames may use startup restore output.
- Developer sets icon appearance out-of-band: icon appearance tracking preserves divergent values and appears fixed.
- TabbedPage top tabs before fragment attach: PR uses
RunOnCommitto update after parent attachment, which addresses the known timing race.
Verdict: NEEDS_CHANGES
Confidence: low
Summary: The central utility approach is coherent, but startup color ownership needs to be separated from restoration after MAUI-owned overrides. Alternative candidates should focus on preserving transparent defaults unless MAUI has actually written a bar color, or on avoiding background writes from startup configuration entirely.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix-1 | Keep ConfigureTranslucentSystemBars icon-only at startup; write system-bar backgrounds only from explicit MAUI chrome update paths when a MAUI color is supplied. Null/no color leaves native transparent system bars untouched instead of restoring/substituting theme background. |
✅ PASS | 8 files in diff, reusing the PR's new AndroidSystemChrome utility file |
Passed targeted Android Controls device tests for NavigationPage and TabbedPage. Self-review clean ([]). Demonstrably better than PR fix for the review-identified startup regression because it removes the restore-to-theme-background path. |
| PR | PR #35869 | Central AndroidSystemChrome helper integrated across Shell/Toolbar/TabbedPage/Modal plus WindowExtensions background restore/ownership tracking |
✅ PASSED (Gate) | 12 files | Original PR. Gate result was provided by caller and not rerun. Code review found startup transparent gesture-navigation regression risk. |
Candidate 1 Narrative
Approach: Split startup icon appearance from explicit MAUI chrome color ownership.
ConfigureTranslucentSystemBars remains a startup helper that sets only light/dark status and navigation icon appearance from the Android theme. It does not write status-bar or navigation-bar background colors. The explicit chrome paths (AndroidSystemChrome.UpdateTopChrome, UpdateBottomChrome, UpdateWindowChrome) remain responsible for updating system-bar backgrounds when NavigationPage, TabbedPage, Shell, Toolbar, or modal content supplies a MAUI color.
Why different from PR: The PR's WindowExtensions.UpdateSystemBarBackgrounds captures original bar colors and restores/substitutes them whenever a null MAUI color is passed. Candidate 1 removes that restoration model from startup/background updates: null means "do not touch the native system-bar background." This avoids converting transparent gesture navigation bars to an opaque theme background before MAUI owns the color.
Diff: Saved in CustomAgentLogsTmp/PRState/35869/PRAgent/try-fix/attempt-1/fix.diff.
Test results: Saved in CustomAgentLogsTmp/PRState/35869/PRAgent/try-fix/attempt-1/test-output.log.
- NavigationPage category: 22 passed, 0 failed.
- TabbedPage category: 44 passed, 0 failed.
- XHarness exit code: 0 on Android API 30 emulator.
Failure analysis: N/A. Candidate passed targeted regression tests.
Self-review: 0 findings; reviewer-findings.json is [].
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 1 | Yes | Candidate 1: icon-only startup plus explicit chrome background writes. |
Exhausted: No — stopped because Candidate 1 passed all targeted tests and is demonstrably better than the PR's current fix for the identified startup regression.
Selected Fix: Candidate #1 — It preserves Android transparent gesture-navigation startup behavior while still satisfying the NavigationPage and TabbedPage Android system chrome regression tests.
📝 Recommended PR Title & Description
Assessment: ✏️ Recommend updating — the description is thorough but stale for the winning fix because it does not document the startup icon-only boundary, and it contains an inaccurate statement that icon contrast continues to follow default Android system handling.
Recommended title
[Android] System chrome: Follow MAUI navigation and tab bar colors
Recommended description
This PR is an improved version of #35463.
### Description of Change
This pull request introduces a new internal Android system chrome utility, `AndroidSystemChrome`, to centralize updates to Android status bar and navigation bar appearance when MAUI-owned navigation UI changes. The changes ensure that NavigationPage, TabbedPage, Shell, toolbar, and modal navigation colors are consistently reflected in Android system chrome.
### Root Cause
Android status bar and navigation bar appearance was updated by separate navigation, tab, toolbar, modal, and window paths. Because those paths did not share a single chrome update model, MAUI bar color changes could update the visible toolbar/tab UI without consistently updating the surrounding Android system bar areas.
### Fix
- Added `AndroidSystemChrome` to resolve effective top/bottom chrome colors from `Brush`/`Paint` values, including solid colors and gradient edge sampling.
- Updated `ShellBottomNavViewAppearanceTracker`, `ShellTabLayoutAppearanceTracker`, and `ShellToolbarAppearanceTracker` to route top/bottom system chrome updates through `AndroidSystemChrome`.
- Updated toolbar extension flows so toolbar bar background, icon color, and text color changes refresh the Android status bar chrome.
- Updated `TabbedPageManager` so top and bottom tab placement updates apply system chrome consistently, including after fragment transaction commit for initial top tab layout.
- Updated modal navigation handling so modal page backgrounds and `NavigationPage` bar properties update the modal window status/navigation bars.
- Updated `WindowExtensions.UpdateSystemBarAppearance` to derive readable system bar icon appearance from MAUI-owned bar colors, while preserving explicit developer runtime overrides when the current platform value has diverged from MAUI's last write.
- Kept `ConfigureTranslucentSystemBars` as a startup icon-appearance-only path so transparent gesture navigation bars are not made opaque before MAUI owns a system bar color.
### Key Technical Details
- `AndroidSystemChrome.UpdateTopChrome` updates AppBar/status bar appearance.
- `AndroidSystemChrome.UpdateBottomChrome` updates Android navigation bar appearance.
- `AndroidSystemChrome.UpdateWindowChrome` handles modal/window-level status and navigation bar updates.
- `WindowExtensions.UpdateSystemBarAppearance` tracks MAUI's last-written icon appearance per platform `Window` so later MAUI updates do not overwrite out-of-band developer changes.
- System bar icon contrast is derived from the effective MAUI-owned bar/background context when available, and falls back to the app theme when MAUI does not know the bar background.
### API 25 Limitation
On Android API 25 and earlier, navigation bar icon color is not publicly configurable. If a light navigation bar background is applied, navigation icons can appear low-contrast because icon rendering remains system-controlled and light-colored. This is an Android platform limitation, not a MAUI implementation bug.
Android introduced dark navigation bar icon support in API 26 via:
- `View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR`
- `windowLightNavigationBar`
Before API 26, apps can change navigation bar background color, but cannot request dark navigation bar icons through supported public APIs.
### Impact
- API 26 and later: MAUI can update both navigation bar background and icon appearance using platform-supported APIs.
- API 25 and earlier: MAUI can update background color only; icon appearance remains controlled by Android.
Because of this platform limitation, no framework-level icon-color fix is planned for API 25.
### Testing and Verification
- Added Android device tests for `NavigationPage` to verify `BarBackgroundColor` updates the AppBar/status bar area and Android navigation bar on initial load.
- Added Android device tests for `TabbedPage` to verify top tab `BarBackgroundColor` is applied on initial load and updates the AppBar/status bar area.
- Added Android window handler coverage to verify system bar icon appearance follows MAUI-owned bar colors while preserving developer overrides.
### Issues Fixed
No linked issue.
🏁 Report — Final Recommendation
Comparative Candidate Report — PR #35869
Candidates
| Candidate | Regression tests | Review result | Assessment |
|---|---|---|---|
pr |
✅ Passed gate | ❌ Major startup regression risk | The raw PR fixes the Android bar color propagation scenarios, but ConfigureTranslucentSystemBars() now routes through the background restore path at startup. That can turn a transparent gesture navigation bar opaque before MAUI owns any chrome color. |
pr-plus-reviewer |
✅ Inherits passing PR gate; reviewer changes are targeted | ✅ Best balance | Applies the expert reviewer's targeted fixes in a sandbox: startup becomes icon-appearance-only again, explicit chrome update paths still own background writes/restores, and the new window test restores shared activity state. |
try-fix-1 |
✅ Passed targeted Android NavigationPage and TabbedPage device tests | ✅ Self-review clean | Also fixes the startup regression by making startup icon-only and avoiding null-background restore writes. However, it removes the PR's original system bar color restore model entirely, so clearing a MAUI-owned color would leave the native bar unchanged rather than restoring the captured native/default value. |
Ranking
pr-plus-reviewer— winning candidate.try-fix-1— passes regression tests and fixes the startup issue, but changes clear/restore semantics more broadly than necessary.pr— passes the gate but remains below the passing alternatives because it has an expert-confirmed startup-path regression risk.
Winner
Winner: pr-plus-reviewer
pr-plus-reviewer is the single best candidate because it keeps the PR's centralized Android system chrome design, preserves explicit MAUI restore semantics, and surgically fixes the startup transparent gesture-navigation regression identified by expert review. It also improves test isolation without expanding the implementation blast radius.
Head-to-head with #35463Thanks for the thorough work here, @Dhivya-SF4094. I did a deep comparison of this PR against #35463 (from which this branch is forked). Both can't merge — only one should — and the recommendation is to consolidate on #35463 and close this one, tracking the icon-contrast idea separately. What this PR adds over #35463: automatic system-bar icon contrast — Why #35463 is preferred for the framework change
The part of this PR that's genuinely valuableYou're right that removing the theme-based contrast in #35463 can leave a light bar background with invisible light icons. That readability gap is worth solving — but ideally as a separate, opt-in follow-up rather than bundled into this behavioral breaking change. Suggested pathClose this in favor of #35463 (retargeted to |
This PR is an improved version of #35463
In PR #35463, the original automatic icon contrast logic was removed after review because it could overwrite developer-defined values for AppearanceLightStatusBars and AppearanceLightNavigationBars. While this preserved explicit developer settings, it also introduced a usability regression: Android defaults to light-colored system bar icons, so applying a light system bar background could result in white icons on a light background, reducing readability.
PR #35869 addresses both problems by restoring automatic icon appearance handling through per-window ownership tracking. MAUI now derives an appropriate icon appearance from the effective bar color when it owns the value, while preserving any explicit developer or theme overrides. The implementation tracks the last value written by MAUI and only updates the system bar icon flags if they have not been modified externally.
Additional improvements include:
Android platform limitation: navigation bar icon color cannot be controlled on API 25 and earlier because Android only introduced dark navigation bar icon support in API 26. Consequently, MAUI updates the navigation bar background on these versions but cannot change the icon appearance. This is documented as an Android platform limitation rather than a framework bug.
References
Screenshots
Light and Dark Navigation Bar and Status Bar Icons