Skip to content

fix(android): Hand the window back from a stacked activity - #25901

Merged
ramezgerges merged 5 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/android-activity-handback
Nov 23, 2026
Merged

ramezgerges merged 5 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/android-activity-handback

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #24862

PR Type:

🐞 Bugfix

What changed? 🚀

On Skia Android, an intent delivered to a running app whose activity uses the default standard launch mode (for example a protocol activation) stacks a second instance of the activity. That copy takes the window over. Since #24042 it renders, but finishing it (Back) closed the window with it and left the original activity frozen on a stale frame. The protocol activation docs ask for SingleTask, which avoids the stacking, but an app that doesn't set it should still work.

This fixes the hand-back and the rendering problems that the stacked case exposed:

  1. Window hand-back (ApplicationActivity): when the activity coming back to the foreground (OnStart, or OnResume when the copy finished before it was even stopped) finds that the activity driving its window is finishing, it takes the window back (accessibility helper, native elements, a fresh frame) instead of letting the window close with the copy.
  2. Only the driving activity presents the window (UnoVulkanView, UnoCanvasView, UnoWebGpuView): every activity that has held the window renders the same CompositionTarget, so a frame from a covered activity's view replayed the driving view's recordings into its own device and consumed the target's frame state.
  3. No lost render requests across a hand-over (CompositionTarget, render views): a record attempted while the new activity's view had no renderer yet was dropped with nothing asking again, and after a renderer swap the RequestNewFrame was absorbed by a request still latched for the previous view. A view now asks for a fresh record once it has negotiated a renderer (the contract the WASM host already follows), and a renderer swap also asks the host for a native frame.
  4. Software renderer: GL objects deleted in the wrong context (AndroidSoftwareGraphicsContext): disposed programs and textures went through a process-wide queue that any GL thread drained. GL names are per EGL context, so when one activity's context was torn down, the other activity deleted its own objects that shared those numbers, and every later blit was black. The queue is gone, since each activity owns its own view, GL thread and context: a context deletes its objects only while its own EGL context is current, and otherwise leaves them to that context's destruction; the CPU buffer is always freed. A teardown that the GL thread never ran now runs once the view detaches, after GLSurfaceView has joined that thread.
  5. GL: the retained frame was blitted through Skia's scissor (GLRetainedFramebuffer, shared by the Android, Win32 and X11 GL hosts): glBlitFramebuffer is clipped by the scissor test, which Skia leaves enabled around the damage it last painted. After a partial repaint only that strip reached the default framebuffer, so a new surface (the stacked activity, or the original after the hand-back) showed black apart from the damaged strip. The blit now disables the scissor test first.
  6. GL: stack overflow on activity re-creation (UnoCanvasView): the renderer teardown disposed the renderer's Java peer, but GLSurfaceView can still call OnDrawFrame until its thread exits; the call was bound to a fresh invoker that called back into Java and recursed until the stack overflowed. This reproduces on master with any activity re-creation on the GL renderer (e.g. Given_ApplicationActivity.When_Recreated_*). The peer is now left alive so the existing torn-down guard handles late frames.

Validation

  • Runtime test Given_ApplicationActivity.When_Stacked_Activity_Finishes_Then_Window_Returns_To_Original: stacks a test-only StackedWindowActivity (added to the SamplesApp Android head, default launch mode) over the running activity, finishes it, and checks the window is handed back without closing and still presents frames. Before the OnResume hand-back the window closed and the app exited.
  • Given_ApplicationActivity on the API 34 emulator: Vulkan 6/6 passed; GL and software 5 passed + the Vulkan-only test inconclusive (on master, GL crashes the app in When_Recreated_Dispatcher_Stays_Responsive).
  • Skia desktop (Windows): Given_CompositionTarget + Given_Visual_Damage 29 passed, 1 inconclusive (WebGPU-only), 1 skipped.
  • Manual, API 34 emulator, SamplesApp with SingleTask removed: cold launch → uno-samples-test:// deep link → Back → open a page → second deep link → Back → exit, on the Vulkan, GL (adb shell setprop debug.uno.samples.renderer gl) and software renderers. Every step renders and responds on all three. Before: frozen stale frame after Back (all renderers), black stacked activity on GL, black page after navigation on software.

Known limitation

Each activity's Vulkan view creates its own VkInstance/VkDevice. On the emulator (SwiftShader through gfxstream), repeated stack/finish cycles sometimes freeze or crash the emulator host process, after Skia allocation failures (BindBufferMemory -1). Rendering is correct up to that point; this looks like an emulator limitation and was not reproducible on other renderers. Sharing one device across activities would avoid it and is left for a follow-up.

PR Checklist ✅

🤖 Generated with Claude Code

@github-actions github-actions Bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/automation Categorizes an issue or PR as relevant to project automation labels Nov 1, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 242671 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewMode.png-dark
    • Application_DispatcherShutdownMode.png
    • AppWindowTitleBar Properties.png
    • Attributed_text_FontSize_Changing.png-dark
    • AuthenticationBroker_Cancel.png
    • AutomationPropertiesExtensions_Role.png
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics_Automated.png-dark
    • Basics_Automated.png
    • BeginTime_MultipleAnimations.png-dark
    • BeginTime_MultipleAnimations.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png
    • BorderTopwithmargins.png-dark
    • BorderTopwithmargins.png
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • ApplicationViewMode.png-dark
    • AppWindowClosing.png-dark
    • AppXamlDefinedResources.png-dark
    • Attributed_text_FontSize_Changing.png
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_Name.png-dark
    • AutoSizedPathCentered.png
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • BackGesture.png-dark
    • BackGesture.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • Battery.png-dark
    • Battery.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 242671 has failed on Uno.UI - CI.

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from 5dea343 to d0f16ca Compare November 2, 2026 15:09
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 242862 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AppBarButtonTest.png
    • AppBar_KeyBoard.png
    • ApplicationViewSpanningRectsPage.png
    • AppWindowFeatures.png
    • AppWindowTitleBar Properties.png-dark
    • Arrange_Performance01.png-dark
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithleftmargin.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutomationProperties_Relations.png-dark
    • AutomationProperties_Relations.png
    • AutoSuggestBox_Icons.png-dark
    • AutoSuggestBox_Icons.png
    • BasicEnability.png-dark
    • BasicEnability.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AnimatedBackVisualSourceSamplePage.png
    • AppBarButtonWithIconTest.png-dark
    • AppBar_KeyBoard.png-dark
    • ApplicationViewSpanningRectsPage.png-dark
    • AppWindowClosing.png-dark
    • AppWindowPositionAndSize.png
    • Arrange_Performance01.png
    • AuthenticationBroker_Cancel.png-dark
    • AuthenticationBroker_Cancel.png
    • AutoBorderStretchwithtopmargin.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_Relations.png-dark
    • AutomationProperties_Relations.png
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • AutoSuggestBox_Reason.png-dark
    • AutoSuggestBox_Reason.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from d0f16ca to cef80dc Compare November 3, 2026 15:26
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from cef80dc to e7ad6fd Compare November 3, 2026 16:30
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@Xiaoy312 Xiaoy312 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The scissor, GL-peer and software-context fixes look right and are well explained. A few non-blocking notes inline.

One more nit outside the diff: the comment on LaunchMode = SingleTask in src/SamplesApp/SamplesApp/Platforms/Android/MainActivity.Android.cs still says the window "moves to it and closes with it". With this PR it no longer closes, so SingleTask is now about routing the intent through OnNewIntent.

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243326 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppBarToggleButtonTest.png-dark
    • AnimatedBackVisualSourceSamplePage.png-dark
    • ApplicationViewSizing.png
    • AppBarButtonTest.png
    • AppWindowPositionAndSize.png-dark
    • ApplicationViewMode.png
    • Attributed_text_Simple.png
    • AppWindowFeatures.png-dark
    • AuthenticationBroker_Demo.png
    • AppWindowTitleBar Properties.png
    • AutomationPropertiesExtensions_Role.png-dark
    • Attributed_text_Simple.png-dark
    • AutoSizedTopLeft.png
    • AuthenticationBroker_Demo.png-dark
    • AutoSuggestBox_Reason.png-dark
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoSuggestBox_Reason.png
    • AutomationPropertiesExtensions_Role.png
    • BasicEnability.png-dark
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png
    • AppBar_KeyBoard.png-dark
    • ApplicationViewSpanningRectsPage.png
    • AppWindowFeatures.png
    • AppWindowPresenters.png
    • AppXamlDefinedResources.png
    • Attributed_text_FontSize_Changing.png
    • AuthenticationBroker_Cancel.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutomationProperties_Relations.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutoSuggestBox_Keyboard.png-dark
    • AutoSuggestBox_Keyboard.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png
    • BorderImageBrush.png-dark
    • BorderImageBrush.png

@MartinZikmund MartinZikmund added the 7.0 PRs only. For issues, use the Release field. label Nov 4, 2026
@MartinZikmund

Copy link
Copy Markdown
Member

@Mergifyio backport release/stable/7.0

@mergify

mergify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

backport release/stable/7.0

✅ Backports have been created

Details

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from e7ad6fd to f7cd365 Compare November 4, 2026 18:21
@ramezgerges

Copy link
Copy Markdown
Contributor Author

Thanks @Xiaoy312. The SingleTask comment in the sample's MainActivity is updated in 2a55e4c: it now says it routes the intent through OnNewIntent.

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243719 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png
    • AndroidWindowInsets.png-dark
    • AppBarButtonTest.png
    • AnimatedIconPage.png
    • ApplicationViewMode.png-dark
    • AppBarToggleButtonTest.png
    • Application_DispatcherShutdownMode.png
    • ApplicationViewSpanningRectsPage.png
    • AppWindowTitleBar Properties.png
    • AppWindowFeatures.png
    • Attributed_text_FontSize_Changing.png-dark
    • AppXamlDefinedResources.png
    • AuthenticationBroker_Cancel.png-dark
    • Attributed_text_FontSize_Changing.png
    • AutomationPropertiesExtensions_Role.png
    • AutoBorderStretchwithleftmargin.png-dark
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutomationProperties_Landmark.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • AutomationProperties_Landmark.png
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppBarToggleButtonTest.png-dark
    • Application_DispatcherShutdownMode.png-dark
    • AppWindowPresenters.png
    • ArcSegment.png-dark
    • AuthenticationBroker_Cancel.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutomationProperties_Landmark.png-dark
    • AutomationProperties_Name.png
    • AutomationProperties_Relations.png-dark
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • AutoSuggestBox_SoftKeboard.png-dark
    • AutoSuggestBox_SoftKeboard.png
    • BasicEnability.png-dark
    • BasicEnability.png
    • Battery.png-dark
    • Battery.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from 2a55e4c to b98c7f5 Compare November 5, 2026 17:54
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244089 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png
    • AnimatedVisualsTestbedPage.png
    • ApplicationViewSpanningRectsPage.png
    • AppWindowPositionAndSize.png-dark
    • ArcSegment.png-dark
    • Attributed_text_Simple.png
    • AutoBorderStretchwithleftmargin.png-dark
    • AutomationPropertiesExtensions_Role.png
    • AutoSuggestBox_Description.png-dark
    • AutoSuggestBox_Description.png
    • BackGesture.png-dark
    • BackGesture.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • Battery.png-dark
    • Battery.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AppBarButtonTest.png
    • AppBarToggleButtonTest.png
    • ApplicationViewSpanningRectsPage.png
    • AppWindowPositionAndSize.png
    • AppXamlDefinedResources.png
    • Attributed_text_FontSize_Changing.png
    • AuthenticationBroker_Demo.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutoBorderStretchwithtopmargin.png-dark
    • AutoSizedPathCentered.png-dark
    • AutoSizedPathCentered.png
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics.png-dark
    • Basics.png
    • BezierSegment.png-dark
    • BezierSegment.png

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from b98c7f5 to 320ae3b Compare November 6, 2026 16:37
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244372 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png
    • AnimatedVisualsTestbedPage.png-dark
    • ApplicationViewSizing.png-dark
    • AppWindowClosing.png
    • AppWindowPresenters.png-dark
    • ArcSegment.png
    • AuthenticationBroker_Cancel.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • AutoSuggestBox_Reason.png-dark
    • AutoSuggestBox_Reason.png
    • BasicEnability.png-dark
    • BasicEnability.png
    • BeginTime_MultipleAnimations.png-dark
    • BeginTime_MultipleAnimations.png
    • BitmapIcon_Sizing.png-dark
    • BitmapIcon_Sizing.png
  • skia-windows-screenshots: 2458 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png
    • AppBarButtonTest.png-dark
    • AppBarToggleButtonTest.png-dark
    • ApplicationViewSpanningRectsPage.png-dark
    • AppWindowClosing.png
    • AppWindowPresenters.png
    • Arrange_Performance01.png
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithleftmargin.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • AutoSuggestBox_Description.png-dark
    • AutoSuggestBox_Description.png
    • BackGesture.png-dark
    • BackGesture.png
    • BasicEnability.png-dark
    • BasicEnability.png

@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from 320ae3b to 41828a3 Compare November 9, 2026 19:51
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244913 found UI Test snapshots differences: skia-linux-screenshots: 215, skia-windows-screenshots: 302

Details
  • skia-linux-screenshots: 215 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedVisualsTestbedPage.png-dark
    • AppWindowTitleBar Properties.png-dark
    • Basics.png-dark
    • Basics.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • ButtonClippingTestsControl.png-dark
    • BreadcrumbBarPage.png-dark
    • ButtonClippingTestsControl.png
    • BreadcrumbBarPage.png
    • Buttons.png-dark
    • Buttons.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedVisualsTestbedPage.png
    • AppWindowTitleBar Properties.png
  • skia-windows-screenshots: 302 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_StructureAndProps.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_Binding.png
    • Border_CornerRadius_BorderThickness.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Buttons.png-dark
    • Buttons.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • AutomationProperties_AutomationId.png-dark
    • Basics.png-dark
    • Basics.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png

@mergify

mergify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

ramezgerges and others added 5 commits November 11, 2026 10:14
glBlitFramebuffer is clipped by the scissor test, which Skia leaves enabled
around the damage it last painted. After a partial repaint only that strip
reached the default framebuffer, so a new surface showed black elsewhere.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Disposed programs and textures went through a process-wide queue drained by
any GL thread. GL names are per EGL context, so another activity's context
deleted its own objects that shared the numbers, and its blits went black.

Each activity owns its render view, GL thread and context, so the queue is
gone: a context deletes its objects only when its own EGL context is current,
and otherwise leaves them to that context's destruction. The CPU buffer is
always freed. A teardown that the GL thread never ran now runs once the view
detaches, after GLSurfaceView has joined that thread.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
GLSurfaceView can still call OnDrawFrame after the renderer is torn down.
Disposing the peer bound that call to a fresh invoker calling back into Java,
which recursed until the stack overflowed (any activity re-creation on GL).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An intent delivered in the standard launch mode stacks a second instance of
the activity, which takes the window over. When it finished, the window
closed with it and left the original frozen. The original now takes the
window back, only the driving activity presents it, and a render request
lost across the hand-over is asked for again.

Fixes unoplatform#24862

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A finishing activity that still owns the window now hands it to the most
recently active copy still alive, instead of closing it, when that copy
did not reclaim it first (one left stopped in another task). A copy that
resumes also takes the window from one that is not resumed, as when the
user switches back through Recents.

Also sets IsSoftwareRenderer before posting the re-record, reuses the
resolved host on a renderer swap, and waits for the stacked activity's
destruction before asserting the window stayed open.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@ramezgerges
ramezgerges force-pushed the dev/rara/android-activity-handback branch from 41828a3 to ff26512 Compare November 11, 2026 15:15
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 245443 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 367

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppBarButtonTest.png-dark
    • AndroidWindowInsets.png
    • AppBarToggleButtonTest.png
    • AppBarButtonTest.png
    • ApplicationViewSpanningRectsPage.png
    • ApplicationViewMode.png
    • AppWindowPositionAndSize.png-dark
    • AppWindowFeatures.png
    • ArcSegment.png-dark
    • AppWindowTitleBar Properties.png
    • Attributed_text_FontSize_Changing.png
    • Attributed_text_Supserscript.png-dark
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithleftmargin.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_AutomationId.png
    • AutomationPropertiesExtensions_Role.png-dark
    • AutomationProperties_Relations.png
    • AutoSuggestBoxChosenSuggestion.png-dark
  • skia-windows-screenshots: 367 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationProperties_AutomationId.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • AnimatedVisualsTestbedPage.png
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • ClipboardTests.png-dark
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedVisualsTestbedPage.png-dark
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 246903 found UI Test snapshots differences: skia-linux-screenshots: 230, skia-windows-screenshots: 321

Details
  • skia-linux-screenshots: 230 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • AutomationProperties_AutomationId.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • AppWindowTitleBar Properties.png
    • Accessibility_Showcase.png-dark
    • AnimatedVisualsTestbedPage.png
    • AppWindowTitleBar Properties.png-dark
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
  • skia-windows-screenshots: 321 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_Showcase.png-dark
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedVisualsTestbedPage.png
    • BasicAcrylicBrushTest2.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • Basics.png-dark
    • BenchmarkDotNet.png
    • AutomationProperties_AutomationId.png
    • AutomationProperties_StructureAndProps.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • BasicAcrylicBrushTest.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png

@ramezgerges
ramezgerges merged commit 5d26eed into unoplatform:master Nov 23, 2026
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.0 PRs only. For issues, use the Release field. area/automation Categorizes an issue or PR as relevant to project automation area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protocol activation delivered to a running Skia Android app leaves it rendering black (second MainActivity stacked)

5 participants