From bb72ed19122c66c570ae08e8ef0f95b9844140f1 Mon Sep 17 00:00:00 2001 From: oxy Date: Tue, 8 Sep 2026 16:12:24 +0800 Subject: [PATCH] Revert "Prevent screen turning off during playback & Android 16 SDK (#422)" This reverts commit 3d9f0bbed3352a5964c713b7ec64489fdb8d926a. --- app/smartphone/build.gradle.kts | 2 +- .../com/m3u/smartphone/ui/business/channel/PlayerActivity.kt | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/smartphone/build.gradle.kts b/app/smartphone/build.gradle.kts index 1df7b90e4..a6fe46dc4 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 = 36 + targetSdk = 33 versionCode = 145 versionName = "1.15.1" 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 da4d654ae..1779679cd 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,7 +3,6 @@ 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 @@ -49,9 +48,6 @@ 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(