From cbf4d7bb7b04237bd47204acc4a1227e55057088 Mon Sep 17 00:00:00 2001 From: Jakub Florkowski Date: Mon, 22 Dec 2025 20:54:54 +0100 Subject: [PATCH] [Issue-Resolver] Fix Android drawable mutation crash in controls Prevents crashes on Android caused by modifying shared drawables without mutation in ActivityIndicator, Entry, Switch, and SearchBar. Adds safe drawable mutation helpers in DrawableExtensions and updates all affected controls to use them. Includes comprehensive UI and stress tests to verify the fix and prevent regressions. --- .../TestCases.HostApp/Issues/Issue33070.xaml | 128 ++++++++++++++++ .../Issues/Issue33070.xaml.cs | 137 ++++++++++++++++++ .../Tests/Issues/Issue33070.cs | 119 +++++++++++++++ .../Android/ActivityIndicatorExtensions.cs | 4 +- .../Platform/Android/DrawableExtensions.cs | 124 ++++++++++++++++ .../Platform/Android/EditTextExtensions.cs | 6 +- .../Platform/Android/SearchViewExtensions.cs | 26 ++-- .../src/Platform/Android/SwitchExtensions.cs | 6 +- 8 files changed, 531 insertions(+), 19 deletions(-) create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue33070.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue33070.xaml.cs create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33070.cs diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue33070.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue33070.xaml new file mode 100644 index 000000000000..4d433d443913 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue33070.xaml @@ -0,0 +1,128 @@ + + + + + +