From a0314fb3cd55f9a71c2f7436cc811f72fef065de Mon Sep 17 00:00:00 2001 From: PiloUnk <198624632+PiloUnk@users.noreply.github.com> Date: Sun, 6 Sep 2026 18:52:32 +0200 Subject: [PATCH 1/2] fix(player): keep screen on via window flag instead of relying on View 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 --- .../com/m3u/smartphone/ui/business/channel/PlayerActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/smartphone/src/main/java/com/m3u/smartphone/ui/business/channel/PlayerActivity.kt b/app/smartphone/src/main/java/com/m3u/smartphone/ui/business/channel/PlayerActivity.kt index 1779679cd..da4d654ae 100644 --- a/app/smartphone/src/main/java/com/m3u/smartphone/ui/business/channel/PlayerActivity.kt +++ b/app/smartphone/src/main/java/com/m3u/smartphone/ui/business/channel/PlayerActivity.kt @@ -3,6 +3,7 @@ package com.m3u.smartphone.ui.business.channel import android.content.Intent import android.content.res.Configuration import android.os.Bundle +import android.view.WindowManager import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge @@ -48,6 +49,9 @@ class PlayerActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { enableEdgeToEdge() super.onCreate(savedInstanceState) + // The player View's own `keepScreenOn` propagation is unreliable on some OEMs + // (e.g. Samsung One UI), so this Activity keeps the window flag directly. + window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) handleIntent(intent) setContent { Toolkit( From d63a029963abda22aa435eebed163f037421dfcb Mon Sep 17 00:00:00 2001 From: PiloUnk <198624632+PiloUnk@users.noreply.github.com> Date: Sun, 6 Sep 2026 23:58:56 +0200 Subject: [PATCH 2/2] chore(smartphone): bump targetSdk to 36 (Android 16) 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 --- app/smartphone/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/smartphone/build.gradle.kts b/app/smartphone/build.gradle.kts index a6fe46dc4..1df7b90e4 100644 --- a/app/smartphone/build.gradle.kts +++ b/app/smartphone/build.gradle.kts @@ -29,7 +29,7 @@ android { defaultConfig { applicationId = "com.m3u.smartphone" minSdk = 26 - targetSdk = 33 + targetSdk = 36 versionCode = 145 versionName = "1.15.1"