This repository was archived by the owner on Oct 8, 2026. It is now read-only.
Repository navigation
Prevent screen turning off during playback & Android 16 SDK - #422
Merged
Merged
Conversation
…w propagation PlayerView.setKeepScreenOn(true) depends on the view staying attached and visible to propagate FLAG_KEEP_SCREEN_ON to the window, which is unreliable on some OEMs (e.g. Samsung One UI), causing the screen to turn off during playback. Since PlayerActivity is dedicated to playback, set the window flag directly in onCreate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
targetSdk was still 33 (Android 13) while compileSdk is 37, which triggers Android's install-time compatibility warning on newer OS versions. Align with the samples/testing modules, which already target 36. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner
|
Reverted. Resume old prevent state before leaving playback. And do not change targetSdkVersion. |
Contributor
Author
|
Indeed, didn't see the various states. Sorry for that! Would this be better? |
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.
Summary
Two independent smartphone-app fixes, pushed as separate commits on
master:a0314fb3— Keep the screen on during channel playback by settingWindowManager.LayoutParams.FLAG_KEEP_SCREEN_ONdirectly onPlayerActivity's window, instead of relying solely onPlayerView.setKeepScreenOn(true). The View-level propagation to thewindow flag is unreliable on some OEM builds (observed on Samsung One UI
on a Galaxy S23), causing the screen to time out and turn off mid-playback
even though
keepScreenOnwas alwaystruein this Activity.d63a0299— Bumpapp/smartphone'stargetSdkfrom 33 to 36 (Android 16).It was left far behind
compileSdk(37), which triggers Android'sinstall-time "this app may not work well" compatibility warning on recent
OS versions.
samples/andtesting/extension-referencealready target 36.AI Agent Checklist
Before submitting this PR, confirm:
AGENTS.md.AGENTS.mdfiles.Instructions Read
List the instruction files read for this change:
AGENTS.mdapp/AGENTS.mddocs/ai/playbooks/playback-pipeline.mddocs/ai/playbooks/apk-size.mddocs/ai/VALIDATION_MATRIX.mdValidation
Commands run:
Results:
Commands not run:
Reason:
Risk Notes
Mention any risk areas:
Playback behavior: PlayerActivity's window now carries
FLAG_KEEP_SCREEN_ON for its whole lifecycle (cleared automatically on
destroy); the existing PlayerView.setKeepScreenOn call is left in place
as a no-op-redundant safeguard, not removed.
API compatibility: targetSdk 36 opts the app into Android
14/15/16 behavior changes gated by targetSdk (e.g. predictive back,
enforced edge-to-edge). Edge-to-edge is already explicitly handled via
enableEdgeToEdge(); other targetSdk-gated behaviors were not
exhaustively audited beyond a successful compile/assemble of both build
types.
Binary size: no dependencies added; release artifact size unchanged
in kind (still minified/shrunk as before).
TV focus behavior / Resource-i18n / Database migration: not applicable,
no app/tv, i18n, or Room changes in either commit.