Repository navigation
Conversation
- Add android.allow_multiple_resumed_activities meta-data to enable multi-resume on Android 9 (API 28) and Android 10, preventing frame drops and rendering suspension when interacting with another app in split-screen or floating multi-window mode. - Implement onMultiWindowModeChanged to trigger dynamic resolution re-scheduling when entering/exiting multi-window mode. - Avoid force-hiding status and navigation bars while in multi-window mode to preserve split-screen boundaries and car system dock controls. - Add supportsPictureInPicture and ensure resizeableActivity is declared consistently across activities.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Support Android Multi-Resume and adaptive multi-window mode to prevent frame drops, rendering pauses, and layout clipping when running CarPlay side-by-side in split screen or floating windows.
Motivation & Problem
In split-screen mode on Android 9 (API 28) and Android 10, when the user touches another application (e.g. car launcher or navigation map), Android transitions
CarPlayHostActivityinto thePAUSEDstate. On many car head units (Qualcomm, MTK, Rockchip BSPs), paused activities suffer compositor frame throttling, Surface buffer starvation, and rendering freezes.Forcibly hiding status and navigation bars inside split screen can corrupt window decorations and cut off the vehicle's system bar / dock controls.
Entering/exiting split screen changes dimensions without activity recreation, requiring stream rescheduling.
Key Changes
<meta-data android:name="android.allow_multiple_resumed_activities" android:value="true" />under<application>inAndroidManifest.xmlto keep both windows in theRESUMEDstate on Android 9/10.applyFullscreenMode(), avoid force-hiding system bars whenisInMultiWindowModeis true.onMultiWindowModeChangedinCarPlayHostActivityto re-apply bars and postscheduleDisplaySize()onvideoView.android:supportsPictureInPicture="true"andandroid:resizeableActivity="true".