Support widget intents on connected displays.
This change preserves display context for widget interactions across displays, ensuring activities launch on the originating display rather than defaulting to the primary display. It works by: 1. Modifying PendingIntentRecord.sendInner to include display ID information in broadcast extras via a filtered ActivityOptions bundle. 2. Enhancing ActivityThread.handleReceiver to create a DisplayContext based on the preserved launchDisplayId when available. This addresses the issue where widget interactions on secondary displays would incorrectly launch activities on the primary display due to display context being dropped during the broadcast intent process. Bug: 358368849 Test: atest FrameworksCoreTests:ActivityThreadTest Test: atest FrameworksMockingServicesTests:PendingIntentControllerTest Test: Click "Battery Widget" and check activity launched on connected display Flag: com.android.window.flags.support_widget_intents_on_connected_display Change-Id: I03ce2b379ad54b6c727adbc0b746eea75ceb4de3
Loading
Please register or sign in to comment