[pull] androidx-main from androidx:androidx-main - #1312
Merged
Conversation
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
…es" into androidx-main
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
… into androidx-main
…p" into androidx-main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )