mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-09 12:34:55 +08:00
@@ -6,37 +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() {
|
||||
// TODO: remove
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
|
||||
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 onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
if (AndroidHelper.isFoldable) {
|
||||
|
||||
Reference in New Issue
Block a user