Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-04 13:57:39 +08:00
parent 0483096f93
commit 8476e0b37c
5 changed files with 4 additions and 631 deletions

View File

@@ -6,34 +6,8 @@ import android.os.Build
import android.os.Bundle
import android.view.WindowManager.LayoutParams
import com.ryanheise.audioservice.AudioServiceActivity
import io.flutter.SystemChrome
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
class MainActivity : AudioServiceActivity() {
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
val methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "PiliPlus")
methodChannel.setMethodCallHandler { call, result ->
when (call.method) {
"SystemChrome.setEnabledSystemUIMode" -> {
SystemChrome.onMethodCall(
this, "SystemChrome.setEnabledSystemUIMode", call.argument("arguments")
)
}
"SystemChrome.setEnabledSystemUIOverlays" -> {
SystemChrome.onMethodCall(
this, "SystemChrome.setEnabledSystemUIOverlays", call.argument("arguments")
)
}
else -> result.notImplemented()
}
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {