Skip to content

[pull] androidx-main from androidx:androidx-main - #1312

Merged
pull[bot] merged 10 commits into
MaxMood96:androidx-mainfrom
androidx:androidx-main
Jul 27, 2026
Merged

[pull] androidx-main from androidx:androidx-main#1312
pull[bot] merged 10 commits into
MaxMood96:androidx-mainfrom
androidx:androidx-main

Conversation

@pull

@pull pull Bot commented Jul 27, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

halilozercan and others added 10 commits July 22, 2026 12:51
When ComposeView is attached to WindowManager across process boundaries from an overlay service (using TYPE_APPLICATION_SUB_PANEL), calling View.getApplicationWindowToken() inside Popup during creation can return a sub-window token rather than the parent application window token. Attempting to attach a popup window to an existing sub-window without the valid host application token causes WindowManagerService to reject the popup.

By checking whether composeView.rootView.layoutParams is a sub-window (1000..1999) and extracting its token first, PopupLayout safely inherits the valid parent window token when hosted in a sub-window.

Refactored token resolution logic into an internal resolveWindowToken helper and added fast JVM unit tests in PopupWindowTokenTest.

Note: This resubmits the Popup fix from aosp/4167709 while excluding the Dialog integration.

Test: ./gradlew :compose:ui:ui:testAndroidHostTest
Test: ./gradlew :compose:ui:ui:cAT
Fixes: 521173005
Change-Id: Ib0f525d48929c7795b62e4b44f6208b1d493826d
…doesNotCrash to simulate the test failure flow

- Rename updateResolutionWithActiveChildVideoCapture_doesNotCrash to updateRotationWithActiveChildVideoCapture_doesNotCrash
- Trigger StreamSharing's error listener instead of only invoke steamSharing.onSuggestedStreamSpecUpdated()

Bug: 531986316
Test: StreamSharingTest
Change-Id: I3976b0640c28f65bc0b19d6a493755cf65d52f30
* Expose Preview.setMirrorMode, Preview.getMirrorMode and VideoCapture.setMirrorMode to public APIs.
* Remove ExperimentalMirrorMode annotation and class as mirror mode APIs are promoted out of experimental state.

Relnote: "Added `Preview.setMirrorMode`, `Preview.getMirrorMode` and `VideoCapture.setMirrorMode` to public APIs, and removed the `ExperimentalMirrorMode` annotation."

Bug: 519794349
Bug: 470629643
Test: ./gradlew 📷camera-core:testReleaseUnitTest 📷camera-video:testReleaseUnitTest
Change-Id: I4ed60c216e3af602b136402499806ea85b9d881a
…apture_doesNotCrash to simulate the test failure flow" into androidx-main
When an Activity handles configuration changes without recreation (e.g., configChanges="fontScale|density"), content inside sub-windows like Popup displayed font sizes and UI scaling lagging behind by one configuration change step (showing the previous step's scale).

This desync occurred because AndroidComposeView.updateConfiguration(newConfig) constructed its Density object via Density(context), which queried context.resources.configuration. When onConfigurationChanged is dispatched to window view trees, context.resources has not yet been updated by the OS framework. By ignoring the incoming newConfig parameter and querying stale context.resources, AndroidComposeView calculated Density using outdated values.

This change fixes the root cause by providing a configuration context natively generated via context.createConfigurationContext(newConfig). As a result, AndroidComposeView's density state evaluates securely using metrics accurately synchronized to the new configuration asynchronously, allowing Popup, Dialog, and root Activity views to update instantly without CompositionLocal hacks.

Test: ./gradlew :compose:ui:ui:connectedAndroidDeviceTest -Pandroid.testInstrumentationRunnerArguments.class=androidx.compose.ui.window.PopupTest
Fixes: 468061905

Change-Id: Id4fc080dbb61c5d73ad0f2e92910ee84d0386df7
When an activity is paused or a surface edge is recreated, the camera or
UI thread releases the SurfaceTexture. Although onFrameAvailable checks
`mIsReleaseRequested.get()`, a race condition can occur if the `SurfaceTexture`
is released after the check passes but before `surfaceTexture.updateTexImage()`
executes on the GL thread.

Calling `updateTexImage()` on a released `SurfaceTexture` results in a native
failure throwing `java.lang.RuntimeException` ("Error during updateTexImage"),
which crashes the application.

This change catches `RuntimeException` during `updateTexImage()` in both
`DefaultSurfaceProcessor` and `DualSurfaceProcessor`, logging a warning and
returning early to safely ignore frame updates for released surfaces.

Bug: 539364433
Test: ./gradlew 📷camera-core:testReleaseUnitTest
Change-Id: If0ffda8ff073bc3061dba4648484589a500b0b99
@pull pull Bot locked and limited conversation to collaborators Jul 27, 2026
@pull pull Bot added the ⤵️ pull label Jul 27, 2026
@pull
pull Bot merged commit f227751 into MaxMood96:androidx-main Jul 27, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant