google / google/ExoPlayer

Omitting configChanges in AndroidManifest.xml breaks split-screen on Android 11

Open
#8,209 6 comments 0 reactions 1 assignee Claimed by @marcbaechinger View on GitHub
bug: in platform
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Issue description
The ExoPlayer demo app in its AndroidManifest.xml uses the attribute
`android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"`
for its PlayerActivity. But in my app I can't use that attribute. Not having that attribute is fine on Android 10 and below, but I noticed on Android 11, not having that attribute becomes a problem with split screen (and likely PiP, too). Going into split-screen mode while a video is playing and adjusting the split-screen slider, without that AndroidManifest.xml attribute, will make the phone not have a good time. This might be an issue specific to Android 11 but I figured I'd report it here.

### Reproduction steps
* Checkout the tip of the ExoPlayer release branch (the commit I used to repro this is 59b34ede6165d029d86a677fea73a5dd0dd55c74).
* Open the demo app's AndroidManifest.xml and remove this line entirely for the PlayerActivity node:
`android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"`
* Load up the ExoPlayer demo app on an Android 11 device or emulator.
* Open any video in the demo app.
* Enter split-screen mode and open any other app to be the bottom half of the screen.
* Adjust the split-screen slider.

Expected:
Video gracefully adjusts to the new screen size.

Actual:
Video struggles to adjust to the new screen size.

### Link to test content
https://streamable.com/yanb66

### A full bug report captured from the device
I can email this if needed/wanted.

### Version of ExoPlayer being used
2.12.1, but also affects 2.9.x and likely any other version.

### Device(s) and version(s) of Android being used
Google Pixel 3XL running Android 11
Android Emulator running Android 11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.